phetsims / forces-and-motion-basics

"Forces and Motion: Basics" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/forces-and-motion-basics
GNU General Public License v3.0
7 stars 10 forks source link

CT value should be instanceof Object value = null #285

Closed KatieWoe closed 3 years ago

KatieWoe commented 3 years ago
forces-and-motion-basics : phet-io-state-fuzz : unbuilt
https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/phet-io-wrappers/state/?sim=forces-and-motion-basics&phetioDebug&fuzz&wrapperContinuousTest=%7B%22test%22%3A%5B%22forces-and-motion-basics%22%2C%22phet-io-state-fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1611202429594%22%2C%22timestamp%22%3A1611205656656%7D
Uncaught Error: Assertion failed: value should be instanceof Object, value=null
Error: Assertion failed: value should be instanceof Object, value=null
at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/assert/js/assert.js:25:13)
at Object.isValueValidValueType (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/axon/js/ValidatorDef.js:342:39)
at Object.isValueValid (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/axon/js/ValidatorDef.js:266:28)
at validate (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/axon/js/validate.js:25:26)
at IOType.toStateObject (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/tandem/js/types/IOType.js:133:7)
at Object.getData (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/axon/js/Property.js:271:35)
at Property.phetioStartEvent (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/tandem/js/PhetioObject.js:381:46)
at Property._notifyListeners (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/axon/js/Property.js:266:10)
at PhaseCallback.listener (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/axon/js/Property.js:330:47)
at PropertyStateHandler.attemptToApplyPhases (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/axon/js/PropertyStateHandler.js:285:41)
id: Bayes Chrome
Snapshot from 1/20/2021, 9:13:49 PM

----------------------------------

forces-and-motion-basics : phet-io-state-fuzz : unbuilt
https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/phet-io-wrappers/state/?sim=forces-and-motion-basics&phetioDebug&fuzz&wrapperContinuousTest=%7B%22test%22%3A%5B%22forces-and-motion-basics%22%2C%22phet-io-state-fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1611202429594%22%2C%22timestamp%22%3A1611216593220%7D
Uncaught Error: Assertion failed: value should be instanceof Object, value=null
Error: Assertion failed: value should be instanceof Object, value=null
at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/assert/js/assert.js:25:13)
at Object.isValueValidValueType (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/axon/js/ValidatorDef.js:342:39)
at Object.isValueValid (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/axon/js/ValidatorDef.js:266:28)
at validate (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/axon/js/validate.js:25:26)
at IOType.toStateObject (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/tandem/js/types/IOType.js:133:7)
at Object.getData (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/axon/js/Property.js:271:35)
at Property.phetioStartEvent (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/tandem/js/PhetioObject.js:381:46)
at Property._notifyListeners (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/axon/js/Property.js:266:10)
at PhaseCallback.listener (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/axon/js/Property.js:330:47)
at PropertyStateHandler.attemptToApplyPhases (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/axon/js/PropertyStateHandler.js:285:41)
id: Bayes Chrome
Snapshot from 1/20/2021, 9:13:49 PM

----------------------------------

forces-and-motion-basics : phet-io-state-fuzz : unbuilt
https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/phet-io-wrappers/state/?sim=forces-and-motion-basics&phetioDebug&fuzz&wrapperContinuousTest=%7B%22test%22%3A%5B%22forces-and-motion-basics%22%2C%22phet-io-state-fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1611202429594%22%2C%22timestamp%22%3A1611241759213%7D
Uncaught Error: Assertion failed: value should be instanceof Object, value=null
Error: Assertion failed: value should be instanceof Object, value=null
at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/assert/js/assert.js:25:13)
at Object.isValueValidValueType (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/axon/js/ValidatorDef.js:342:39)
at Object.isValueValid (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/axon/js/ValidatorDef.js:266:28)
at validate (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/axon/js/validate.js:25:26)
at IOType.toStateObject (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/tandem/js/types/IOType.js:133:7)
at Object.getData (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/axon/js/Property.js:271:35)
at Property.phetioStartEvent (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/tandem/js/PhetioObject.js:381:46)
at Property._notifyListeners (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/axon/js/Property.js:266:10)
at PhaseCallback.listener (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/axon/js/Property.js:330:47)
at PropertyStateHandler.attemptToApplyPhases (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1611202429594/axon/js/PropertyStateHandler.js:285:41)
id: Bayes Chrome
Snapshot from 1/20/2021, 9:13:49 PM
jessegreenberg commented 3 years ago

Trying to hit this in state wrapper, I first hit image

It is trying to check

this.animationStateProperty.get().destination === 'home'

in Item.step. Value in wrapper is null. I don't see anywhere in sim where value is set to null, so must be something related to conveying the Property value over state.

jessegreenberg commented 3 years ago

This was resolved in the above commit, the phetioType for ActionStateProperty's value needed to be ObjectLiteralIO rather than ObjectIO. Related to phetsims/phet-io#1616.