phetsims / collision-lab

"Collision Lab" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
6 stars 4 forks source link

CT cannot normalize a zero magnitude vector #106

Closed KatieWoe closed 4 years ago

KatieWoe commented 4 years ago
collision-lab : xss-fuzz
https://bayes.colorado.edu/continuous-testing/ct-snapshots/1592539701703/collision-lab/collision-lab_en.html?continuousTest=%7B%22test%22%3A%5B%22collision-lab%22%2C%22xss-fuzz%22%5D%2C%22snapshotName%22%3A%22snapshot-1592539701703%22%2C%22timestamp%22%3A1592565076486%7D&brand=phet&ea&fuzz&stringTest=xss&memoryLimit=1000
Query: brand=phet&ea&fuzz&stringTest=xss&memoryLimit=1000
Uncaught Error: Cannot normalize a zero-magnitude vector
Error: Cannot normalize a zero-magnitude vector
at Vector2.normalized (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1592539701703/dot/js/Vector2.js:262:13)
at Line.getStartTangent (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1592539701703/kite/js/segments/Line.js:215:54)
at Line.get startTangent [as startTangent] (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1592539701703/kite/js/segments/Line.js:219:36)
at Line.areStrokedBoundsDilated (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1592539701703/kite/js/segments/Segment.js:106:27)
at Shape.getStrokedBounds (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1592539701703/kite/js/Shape.js:1560:23)
at ArrowNode.computeShapeBounds (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1592539701703/scenery/js/nodes/Path.js:358:34)
at ArrowNode.updateSelfBounds (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1592539701703/scenery/js/nodes/Path.js:285:47)
at ArrowNode.validateSelfBounds (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1592539701703/scenery/js/nodes/Node.js:1152:40)
at ArrowNode.validateBounds (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1592539701703/scenery/js/nodes/Node.js:1176:31)
at ChangeInMomentumVectorNode.validateBounds (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1592539701703/scenery/js/nodes/Node.js:1191:29)
id: Bayes Chrome
Snapshot from 6/18/2020, 10:08:21 PM
brandonLi8 commented 4 years ago

Thanks @KatieWoe.

brandonLi8 commented 4 years ago

This is evidently related to #51 but for Change in Momentum Vectors.

brandonLi8 commented 4 years ago

Should be fixed in the commit above. This issue already didn't show up on most CT snapshots. So I'm going to close this and reopen if this pops up again.