Closed phet-steele closed 7 years ago
Obligatory "This failure shows up reliably in automated testing, so I haven't been able to fix any usage that triggers recently-added Scenery assertions, or check it for any failures related to recent Scenery changes."
I saw this again today:
expression-exchange
Uncaught Error: Assertion failed: x should be a finite number
Error: Assertion failed: x should be a finite number
at window.assertions.assertFunction (http://localhost/assert/js/assert.js:21:13)
at VariableCoinTermNode.setX (http://localhost/scenery/js/nodes/Node.js?bust=1480917756882:1823:17)
at VariableCoinTermNode.set x [as x] (http://localhost/scenery/js/nodes/Node.js?bust=1480917756882:1828:27)
at Array.handlePositionChanged (http://localhost/expression-exchange/js/common/view/AbstractCoinTermNode.js?bust=1480917756882:128:14)
at Emitter.emit2 (http://localhost/axon/js/Emitter.js?bust=1480917756882:139:49)
at Property._notifyObservers (http://localhost/axon/js/Property.js?bust=1480917756882:170:29)
at Property._setAndNotifyObservers (http://localhost/axon/js/Property.js?bust=1480917756882:158:14)
at Property.set (http://localhost/axon/js/Property.js?bust=1480917756882:126:16)
at Object. (http://localhost/expression-exchange/js/common/model/CoinTerm.js?bust=1480917756882:151:33)
at TWEEN.Tween.update (http://localhost/sherpa/lib/Tween-r12.js:317:25)
This problem appears to arise when CoinTerm.travelToDestination( destination )
is called and the coin term is already at the specified location. In this case, the TWEEN animation ends up trying to set a non-numeric position value. I'm not sure exactly why this is - it seems like an issue inside of TWEEN - but adding an if
clause that doesn't create the TWEEN animation if the coin term is already at the destination seems like a good thing to do in general, so that's what I've done. After making this change, I did roughly 10 minutes of fuzz testing and did not encounter the problem, so I think this is resolved. Closing.