phetsims / resistance-in-a-wire

"Resistance in a Wire" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/resistance-in-a-wire
GNU General Public License v3.0
1 stars 4 forks source link

Uncaught Error: Assertion failed: trying to describe no change in size #159

Closed zepumph closed 6 years ago

zepumph commented 6 years ago
resistance-in-a-wire : fuzz : require.js : run
Uncaught Error: Assertion failed: trying to describe no change in size
Error: Assertion failed: trying to describe no change in size
    at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/snapshot-1529626949402/assert/js/assert.js:22:13)
    at getSizeChangeFromDelta (https://bayes.colorado.edu/continuous-testing/snapshot-1529626949402/resistance-in-a-wire/js/resistance-in-a-wire/view/ControlPanel.js?bust=1529672937782:254:15)
    at getSizeChangeAlert (https://bayes.colorado.edu/continuous-testing/snapshot-1529626949402/resistance-in-a-wire/js/resistance-in-a-wire/view/ControlPanel.js?bust=1529672937782:282:34)
    at Object.endDrag (https://bayes.colorado.edu/continuous-testing/snapshot-1529626949402/resistance-in-a-wire/js/resistance-in-a-wire/view/ControlPanel.js?bust=1529672937782:143:54)
    at end (https://bayes.colorado.edu/continuous-testing/snapshot-1529626949402/sun/js/HSlider.js?bust=1529672937782:217:19)
    at SimpleDragHandler.endDrag (https://bayes.colorado.edu/continuous-testing/snapshot-1529626949402/scenery/js/input/SimpleDragHandler.js?bust=1529672937782:273:26)
    at Object.up (https://bayes.colorado.edu/continuous-testing/snapshot-1529626949402/scenery/js/input/SimpleDragHandler.js?bust=1529672937782:129:16)
    at Input.dispatchToListeners (https://bayes.colorado.edu/continuous-testing/snapshot-1529626949402/scenery/js/input/Input.js?bust=1529672937782:1352:27)
    at Input.dispatchEvent (https://bayes.colorado.edu/continuous-testing/snapshot-1529626949402/scenery/js/input/Input.js?bust=1529672937782:1308:12)
    at Input.upEvent (https://bayes.colorado.edu/continuous-testing/snapshot-1529626949402/scenery/js/input/Input.js?bust=1529672937782:1071:12)
Approximately 6/21/2018, 4:22:29 PM
zepumph commented 6 years ago

Can be reproduced within seconds with http://localhost/resistance-in-a-wire/resistance-in-a-wire_en.html?brand=phet&ea&fuzzMouse&fuzzPointers=2&fuzzTouch&fuzzRate=1000

UPDATE: actually it's only sometimes immediate.

zepumph commented 6 years ago

After doing some research, I found that this can be triggered after any of the three slider drags, if the resulting resistance change was 0. So I updated the conditional to make sure that both the slider value and the resistance value changed. @jessegreenberg you originally wrote this, so could you please give a spot check on this to see if there is foul play.

zepumph commented 6 years ago

Note: I spot checked OL for similar trouble, and I don't think that we will have any trouble over there, because there is no assertion in the implementation, so it will just queue an alert that addresses the change in R or V but the current won't change. This seems fine to me to have this discrepancy between sims since it is such an edge case anyways with low risk in interfering with UX.

jessegreenberg commented 6 years ago

Change looks good to me @zepumph, thanks 👍

zepumph commented 6 years ago

Great I'll add them to a new RC for spot check.

zepumph commented 6 years ago

We could not test with fuzzMouse in the rc version, but this has not been showing up at all in master or CT. I think we are ready to close.