phetsims / expression-exchange

"Expression Exchange" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
2 stars 2 forks source link

support ?shuffleListeners #161

Closed jbphet closed 1 year ago

jbphet commented 1 year ago
expression-exchange : fuzz : unbuilt : shuffleListeners
https://bayes.colorado.edu/continuous-testing/ct-snapshots/1679497807752/expression-exchange/expression-exchange_en.html?continuousTest=%7B%22test%22%3A%5B%22expression-exchange%22%2C%22fuzz%22%2C%22unbuilt%22%2C%22shuffleListeners%22%5D%2C%22snapshotName%22%3A%22snapshot-1679497807752%22%2C%22timestamp%22%3A1679504598450%7D&brand=phet&ea&fuzz&shuffleListeners&memoryLimit=1000
Query: brand=phet&ea&fuzz&shuffleListeners&memoryLimit=1000
Uncaught Error: Assertion failed: Dependencies should be defined, has this Property been disposed?
Error: Assertion failed: Dependencies should be defined, has this Property been disposed?
at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1679497807752/assert/js/assert.js:28:13)
at assert (DerivedProperty.ts:140:14)
at definedDependencies (DerivedProperty.ts:154:56)
at (TinyEmitter.ts:116:42)
at emit (ReadOnlyProperty.ts:312:22)
at _notifyListeners (ReadOnlyProperty.ts:263:13)
at unguardedSet (ReadOnlyProperty.ts:247:11)
at set (Property.ts:54:10)
at (PressListener.ts:745:4)
at apply (PhetioAction.ts:158:16)
id: Bayes Puppeteer
Snapshot from 3/22/2023, 9:10:07 AM
jbphet commented 1 year ago

I asked about this on Slack, and @zepumph said "It's me! Thanks", and @samreid referenced https://github.com/phetsims/axon/issues/215. Assigning to @zepumph I guess.

zepumph commented 1 year ago

Yes thanks. I'm working on it over in that issue. I'll rename to correspond with all other issues that are like this.

zepumph commented 1 year ago

I added a potential workaround, but it is much too central in our code. I'm not sure how to proceed if this fixes things, but I'll first wait to see if CT cleans up from it.

zepumph commented 1 year ago

Ok, that did seem to clear things up, perhaps it is a disposal listener order or something like that. I will want to take more of a look instead of just adding this to PressListener.

zepumph commented 1 year ago

By looking at the trail, I see that it is from the disposal of BreakApartButton. I'll see if I can experiment with other structures in that disposal order.

zepumph commented 1 year ago

Ok, so the issue is pretty general about Properties that dispose a DerivedProperty that uses the original property (as breakApartButton exposes). I will pick things up over there. We will reopen this if a sim-specific problem emerges, but it likely won't.

zepumph commented 1 year ago

https://github.com/phetsims/axon/commit/92e4db211f0bbe2c38605c9e4ab4158ea886b1d6 caused some CT errors that are fixed with the above commit.