phetsims / buoyancy

"Buoyancy" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
2 stars 2 forks source link

`?showDebug` assertion when toggling between Bottle and Boat in Application Screen View #84

Closed AgustinVallejo closed 3 months ago

AgustinVallejo commented 3 months ago

When using the &showDebug and switching between Bottle and Boat we get this message

assert.js:28 Uncaught Error: Assertion failed: Attempted to removeChild with a node that was not a child.
    at window.assertions.assertFunction (assert.js:28:13)
    at DebugView.removeChild (Node.ts:907:15)
    at DebugView.ts:79:12
    at TinyEmitter.emit (TinyEmitter.ts:123:9)
    at Emitter.emit (Emitter.ts:62:22)
    at createObservableArray.ts:359:80
    at Array.forEach (<anonymous>)
    at Proxy.splice (createObservableArray.ts:359:21)
    at arrayRemove (arrayRemove.ts:17:9)
    at Proxy.remove (createObservableArray.ts:393:38)
zepumph commented 3 months ago

Fixed with a cleanup step. Likely this case had never been run because density doesn't have this kind of scene-swap.