phetsims / build-an-atom

"Build an Atom" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/build-an-atom
GNU General Public License v3.0
11 stars 10 forks source link

CT all descendants must be disposed by the next frame #233

Closed KatieWoe closed 2 years ago

KatieWoe commented 2 years ago
build-an-atom : phet-io-state-fuzz : unbuilt
https://bayes.colorado.edu/continuous-testing/ct-snapshots/1646735645307/phet-io-wrappers/state/?sim=build-an-atom&phetioDebug&fuzz&wrapperContinuousTest=%7B%22test%22%3A%5B%22build-an-atom%22%2C%22phet-io-state-fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1646735645307%22%2C%22timestamp%22%3A1646750107219%7D
Uncaught Error: Uncaught Error: Assertion failed: All descendants must be disposed by the next frame: buildAnAtom.general.view.navigationBar.phetButton.phetMenu.optionsDialogCapsule.optionsDialog.content.highContrastParticlesCheckbox.fireListener.pressAction.executedEmitter
Error: Assertion failed: All descendants must be disposed by the next frame: buildAnAtom.general.view.navigationBar.phetButton.phetMenu.optionsDialogCapsule.optionsDialog.content.highContrastParticlesCheckbox.fireListener.pressAction.executedEmitter
at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1646735645307/assert/js/assert.js:25:13)
at https://bayes.colorado.edu/continuous-testing/ct-snapshots/1646735645307/chipper/dist/js/tandem/js/PhetioObject.js:531:19
at Array.forEach (<anonymous>)
at https://bayes.colorado.edu/continuous-testing/ct-snapshots/1646735645307/chipper/dist/js/tandem/js/PhetioObject.js:530:19
at Array.callback (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1646735645307/chipper/dist/js/axon/js/Timer.js:29:11)
at Timer.emit (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1646735645307/chipper/dist/js/axon/js/TinyEmitter.js:82:39)
at Sim.runAnimationLoop (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1646735645307/chipper/dist/js/joist/js/Sim.js:792:25)
id: Bayes Chrome
Snapshot from 3/8/2022, 3:34:05 AM
jbphet commented 2 years ago

I was kind of able to duplicate this by fuzzing the unbuilt version on my development machine. I say "kind of" because it wasn't exactly the same stack trace, but it was similar, see below. In both, press listeners and PhetIoObjects are involved. I did some looking around, and there is a recent commit to PressListener that references PhetIoObject, specifically https://github.com/phetsims/scenery/commit/fe972864d061e07203e5dd7ae4720916502a5e2f.

@zepumph - Can you please take a look and see if you think this change introduced this CT error? If not, assign back to me and I'll do more investigation.

Stack trace from local test:

window.assertions.assertFunction (assert.js:23)
emit (TinyEmitter.ts:72)
emit (Emitter.ts:66)
execute (PhetioAction.ts:97)
release (PressListener.ts:503)
pointerUp (PressListener.ts:815)
dispatchToListeners (Input.ts:1822)
dispatchEvent (Input.ts:1772)
upEvent (Input.ts:1572)
Input.mouseUpAction.PhetioAction.phetioPlayback (Input.ts:389)
execute (PhetioAction.ts:95)
mouseUp (Input.ts:1220)
mouseToggle (InputFuzzer.js? [sm]:266)
InputFuzzer.mouseToggleAction (InputFuzzer.js? [sm]:40)
fuzzEvents (InputFuzzer.js? [sm]:105)
fuzzInputEvents (SimDisplay.js? [sm]:179)
runAnimationLoop (Sim.js? [sm]:918)
requestAnimationFrame (async)
.
.
.
zepumph commented 2 years ago

I think this is the state-wrapper version of https://github.com/phetsims/joist/issues/790, fixed by https://github.com/phetsims/tandem/commit/3f93369bc64e4ffdb3a5e7fdfc3e97f9b7d108e1.

Sorry that you dove into my mistake here. I cannot reproduce in 2 minutes of fuzzing plus the time it took to write this message. I also noted that the CT state test for BAA has passed multiple times since the two-in-a-row failure of this problem yesterday.