Closed pixelzoom closed 5 years ago
Not obvious why this happened, and the assertion messages don't contain enough info. I've added more details to the assertion messages and will have another look if it happens again. Until then, deferred.
Finally happened in CT on 6/22, here's the stack trace with more detailed assertion message. The equation in this case is 1(1x)
, which should be simplified to x
.
function-builder : fuzz : require.js-canvas : run
Query: brand=phet&ea&fuzz&rootRenderer=canvas
Uncaught Error: Assertion failed: adjacent times should have been collapsed: 1(1x)
Error: Assertion failed: adjacent times should have been collapsed: 1(1x)
at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/snapshot-1561207571677/assert/js/assert.js:22:13)
at new HelpfulEquationNode (https://bayes.colorado.edu/continuous-testing/snapshot-1561207571677/function-builder/js/common/view/equations/HelpfulEquationNode.js?bust=1561227512705:184:21)
at EquationPanel.updateEquations (https://bayes.colorado.edu/continuous-testing/snapshot-1561207571677/function-builder/js/common/view/equations/EquationPanel.js?bust=1561227512705:151:34)
at https://bayes.colorado.edu/continuous-testing/snapshot-1561207571677/function-builder/js/common/view/equations/EquationPanel.js?bust=1561227512705:115:14
at TinyEmitter.emit (https://bayes.colorado.edu/continuous-testing/snapshot-1561207571677/axon/js/TinyEmitter.js?bust=1561227512705:59:55)
at https://bayes.colorado.edu/continuous-testing/snapshot-1561207571677/axon/js/Emitter.js?bust=1561227512705:46:31
at Emitter.execute (https://bayes.colorado.edu/continuous-testing/snapshot-1561207571677/axon/js/Action.js?bust=1561227512705:177:20)
at Emitter.emit (https://bayes.colorado.edu/continuous-testing/snapshot-1561207571677/axon/js/Emitter.js?bust=1561227512705:71:21)
at MathBuilder.addFunctionInstance (https://bayes.colorado.edu/continuous-testing/snapshot-1561207571677/function-builder/js/common/model/builder/Builder.js?bust=1561227512705:153:35)
at MathBuilder.addFunctionInstance (https://bayes.colorado.edu/continuous-testing/snapshot-1561207571677/function-builder/js/common/model/builder/MathBuilder.js?bust=1561227512705:45:45)
id: Bayes Chrome
Approximately 6/22/2019, 8:46:11 AM
This hasn't happened in CT again, and I have not been able to reproduce manually or with ?ea&fuzz
. So this is probably some very rare corner case. If it does happen, it won't crash the sim, it will just show a non-simplified form of an equation. I'm going to close this, and we can reopen if it occurs again.
The occurred once, never seen it before, probably a corner case:
Relevant code is in
HelpfulEquationNode
constructor: