enthought / enthought/traits

Dynamic and decorated listeners fail unpredictably but deterministically

Open
#21 3 comments 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
Python
Stars
462
Forks
90
PR merge metrics
No merged PRs in 30d

Description

This sporadic bug was detected in April-May 2011, on three separate customer applications by different developers (@jdmarch, @jwiggins, @terrel), and confirmed by @corranwebster and @rkern.

There are some rare situations (apparently mostly involving catching Chaco or Enable events, but we are not yet sure) where some dynamic and decorated listeners fail to be triggered when they should be. The workaround is to use (undecorated) specially named listener methods when you can.

This bug is deterministic in the sense that the same code always fails on the same machine and IIRC on multiple machines. It persisted when switching to an older version of Traits (Sept 210). It is unpredictable in the sense that a given use of the decorator will work fine, then begin to fail after another decorated listener is added elsewhere in the application.

@rkern speculated that this unpredictability was due to changes in the order of listeners in a traits internal dictionary.

There is no minimal working example, as the bug only appeared in fairly complex applications.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.