Closed jonathanolson closed 7 years ago
Found as part of https://github.com/phetsims/scenery/issues/601.
@pixelzoom, if this isn't too difficult, can you address this sooner rather than later? I only ask with the hope of cleaning up weekly automated testing (in which this error has been repeatedly occurring).
@phet-steele fixed (?) in above commit. I'm traveling and did this rapidly, so apologies if it doesn't address the problem for some reason. Please verify in master.
@pixelzoom this did not fix the problem. It can wait until you return from traveling. Thank you for your time anyway!
@phetsteel It did indeed fix the problem, but introduced a new problem (different error message):
Assertion failed: This Node has already been disposed, and cannot be disposed again
Note to self: reproduce this by running in requirejs mode with ?ea&fuzzMouse
.
To reproduce without fuzzMouse
, run with ?ea
:
This will cause the assertion failure. Looks like it's because SnapshotDialog.hide
also calls dispose
, so dispose
is getting called twice.
Here's what happens in the steps above:
So apparently something is keeping a reference to the the first SnapshotDialog that it shouldn't be keeping. Now I need to investigate whether that something is joist or the sim.
There was a missing numberOfSnapshotsProperty.unlink
in SnapshotDialog that was causing a reference to the dialog to be kept. Fixed in above commit.
@phet-steele please verify in master.
Fixed!
Presumably due to #10 and https://github.com/phetsims/joist/issues/366:
currently fails assertions with: