phetsims/neuron

Automated testing (test-server) require.js fuzzMouse error

Closed this issue · 2 comments

Error: Assertion failed: all ions setting changed when stimulus was locked out
    at window.assertions.assertFunction (http://192.168.0.2:8080/assert/js/assert.js:23:13)
    at Array. (http://192.168.0.2:8080/neuron/js/neuron/model/NeuronModel.js?bust=1452540525672:171:17)
    at Emitter.inherit.emit2 (http://192.168.0.2:8080/axon/js/Emitter.js?bust=1452540525672:139:49)
    at Property.inherit._notifyObservers (http://192.168.0.2:8080/axon/js/Property.js?bust=1452540525672:130:29)
    at Property.inherit._setAndNotifyObservers (http://192.168.0.2:8080/axon/js/Property.js?bust=1452540525672:118:14)
    at Property.inherit.set (http://192.168.0.2:8080/axon/js/Property.js?bust=1452540525672:86:16)
    at Property.inherit.reset (http://192.168.0.2:8080/axon/js/Property.js?bust=1452540525672:152:14)
    at http://192.168.0.2:8080/axon/js/PropertySet.js?bust=1452540525672:171:37
    at Array.forEach (native)
    at NeuronModel.inherit.reset (http://192.168.0.2:8080/axon/js/PropertySet.js?bust=1452540525672:170:17)

This occurs only during reset, and triggers an assert that was meant to make sure that the "allIonsSimulated" property is not changed during record, since that would be difficult to handle. I opted to change the order of property declarations in order to address this, the problem occurs only because of the order in which the properties are reset. This isn't a perfect solution, but seems better than getting rid of the assertion altogether, since it could prove useful during future maintenance.

I figured out a minimal set of action to duplicate this: Clear the "All Ions" checkbox, stimulate the neuron, then hit reset. With the fix in place, the assert no longer occurs. It was also not seen after several minutes of fuzz testing. Closing.