phetsims / blackbody-spectrum

"Blackbody Spectrum" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
1 stars 3 forks source link

x must be a finite number: Infinity #73

Closed chrisklus closed 5 years ago

chrisklus commented 5 years ago

From https://github.com/phetsims/blackbody-spectrum/issues/33.

Steps to reproduce:

  1. Load the sim with showPointerAreas enabled
  2. Check the "Graph Values" checkbox
  3. Slide the point node all the way left until an assertion fails

Found on Chrome/MacOS 10.13

assert.js:22 Uncaught Error: Assertion failed: x must be a finite number: Infinity
at window.assertions.assertFunction (assert.js:22)
at Shape.rect (Shape.js?bust=1550268402403:920)
at Function.Shape.bounds (Shape.js?bust=1550268402403:2088)
at PointerAreaOverlay.js?bust=1550268402403:40
at TrailPointer.js?bust=1550268402403:227
at TrailPointer.depthFirstUntil (TrailPointer.js?bust=1550268402403:267)
at TrailPointer.eachTrailBetween (TrailPointer.js?bust=1550268402403:225)
at Trail.eachTrailUnder (Trail.js?bust=1550268402403:622)
at PointerAreaOverlay.addShapes (PointerAreaOverlay.js?bust=1550268402403:30)
at PointerAreaOverlay.update (ShapeBasedOverlay.js?bust=1550268402403:71)

@arnabp I'm not sure how relevant this is to the sim code, but maybe look into it a bit to find out more.

arnabp commented 5 years ago

Found the cause to be the attempted creation of a pointer area around dashed line path which had y values approaching -1e-20. Fixed and closing.