CT should not be called if disposed
Closed this issue · 8 comments
Query: brand=phet&ea&fuzzBoard&a11y&memoryLimit=1000
Uncaught Error: Assertion failed: should not be called if disposed
Error: Assertion failed: should not be called if disposed
at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/snapshot-1561528310946/assert/js/assert.js:22:13)
at TinyEmitter.emit (https://bayes.colorado.edu/continuous-testing/snapshot-1561528310946/axon/js/TinyEmitter.js?bust=1561549596721:50:17)
at BooleanProperty._notifyListeners (https://bayes.colorado.edu/continuous-testing/snapshot-1561528310946/axon/js/Property.js?bust=1561549596721:247:27)
at BooleanProperty.set (https://bayes.colorado.edu/continuous-testing/snapshot-1561528310946/axon/js/Property.js?bust=1561549596721:160:14)
at BooleanProperty.set value [as value] (https://bayes.colorado.edu/continuous-testing/snapshot-1561528310946/axon/js/Property.js?bust=1561549596721:316:34)
at PressListener.interrupt (https://bayes.colorado.edu/continuous-testing/snapshot-1561528310946/scenery/js/listeners/PressListener.js?bust=1561549596721:429:43)
at TextPushButton.interruptInput (https://bayes.colorado.edu/continuous-testing/snapshot-1561528310946/scenery/js/nodes/Node.js?bust=1561549596721:1936:40)
at TextPushButton.blur (https://bayes.colorado.edu/continuous-testing/snapshot-1561528310946/scenery/js/accessibility/Accessibility.js?bust=1561549596721:531:18)
at Function.set focus [as focus] (https://bayes.colorado.edu/continuous-testing/snapshot-1561528310946/scenery/js/display/Display.js?bust=1561549596721:1730:23)
at Object.blur (https://bayes.colorado.edu/continuous-testing/snapshot-1561528310946/scenery/js/input/A11yPointer.js?bust=1561549596721:65:33)
id: Bayes Chrome
Approximately 6/25/2019, 11:51:50 PM
build-an-atom : phet-io-tests : assert
9 out of 9 tests passed. 0 failed.
Approximately 6/25/2019, 11:51:50 PM
build-an-atom : phet-io-tests : no-assert
9 out of 9 tests passed. 0 failed.
Approximately 6/25/2019, 11:51:50 PM
This issue happened three times, and hasn't happened since. The root of the stack is in A11yPointer.js
in the 'blur' function, so this seems like this is accessibility related. I looked at that file and some others that are related and didn't see any recent changes. I also fuzz tested locally for ~20 minutes without hitting this issue, so I'm not sure where to go with it from here.
@jessegreenberg - do you have any immediate insights? If not, I'd suggest assigning it back to QA to watch and see if it recurs before we spend any more time on it.
Thanks, this is a11y related, I will take a look. I was able to hit it after running the sim with ?fuzzBoard&a11y, but it still took a while (~4 minutes of fuzzing in the background).
I found that this can be reproduced just by clicking the "Next" button with a spacebar in the game screen.
This has likely always been an issue but the assertion was added somewhat recently for phetsims/axon#242. From that issue there is a comment that mentiones
pointed out that this seems to happen when clicking a button causes it to dispose itself.
Which is exactly what is happening here.
There are two ways to hit this currently -
- The PressListener can be disposed before PressListener
interrupt
function is called internally by scenery because the button receives ablur
event, and on blurinterruptInput
is called. - The PressListener can be disposed before the end of
_a11yLooksPressedInterval
when the button disposes itself and so we try to set the value ofa11yClickingProperty
after it has been disposed.
The buttons are working after the above commit, and I haven't seen the issue show up while running ?fuzzBoard. Ill check again after a few CT iterations and then close if it doesn't show up again.
Verified fixed, closing