phetsims / charges-and-fields

"Charges And Fields" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
8 stars 7 forks source link

CT: matrix should be a finite Matrix3 #195

Closed jessegreenberg closed 2 years ago

jessegreenberg commented 2 years ago

Showing up ever few columns on CT. After about 20 minutes of fuzzing locally I was able to see this.

<html>
<body>
<!--StartFragment-->

  | eval | @ | VM3644:1
-- | -- | -- | --
  | window.assertions.assertFunction | @ | assert.js:23
  | setMatrix | @ | Node.ts:2609
  | set matrix | @ | Node.ts:2619
  | (anonymous) | @ | MultiListener.js? [sm]:120
  | emit | @ | TinyEmitter.ts:93
  | _notifyListeners | @ | Property.ts:295
  | set | @ | Property.ts:227
  | translateToTarget | @ | AnimatedPanZoomListener.js? [sm]:686
  | translateDelta | @ | AnimatedPanZoomListener.js? [sm]:670
  | animateToTargets | @ | AnimatedPanZoomListener.js? [sm]:958
  | step | @ | AnimatedPanZoomListener.js? [sm]:226
  | (anonymous) | @ | Sim.js? [sm]:308
  | execute | @ | PhetioAction.ts:120
  | stepSimulation | @ | Sim.js? [sm]:955
  | stepOneFrame | @ | Sim.js? [sm]:945
  | runAnimationLoop | @ | Sim.js? [sm]:920
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909
  | requestAnimationFrame (async) |   |  
  | runAnimationLoop | @ | Sim.js? [sm]:909

<!--EndFragment-->
</body>
</html>
jessegreenberg commented 2 years ago

Matrix looks like: [4, 0, 0, 0, 4, 0, NaN, NaN, 1]

initialPoint in translateToTarget is Vector2(NaN, Infinity)

deltaVector in translateDelta is Vector2(NaN, Infinity).

jessegreenberg commented 2 years ago

I added an assertion to try to get more information but haven't seen the error again in > 1 hour of local fuzzing.

jessegreenberg commented 2 years ago

The new assertion is showing up on CT and has been noted in phetsims/scenery#1398. Since that is what will be appearing on CT lets move over there.