phetsims / molecule-shapes

"Molecule Shapes" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/molecule-shapes
GNU General Public License v3.0
5 stars 6 forks source link

Uncaught Error: Assertion failed: tried to removeListener on something that wasn't a listener #221

Closed samreid closed 2 years ago

samreid commented 2 years ago

From CT:

molecule-shapes-basics : fuzz : unbuilt
https://bayes.colorado.edu/continuous-testing/ct-snapshots/1661714801238/molecule-shapes-basics/molecule-shapes-basics_en.html?continuousTest=%7B%22test%22%3A%5B%22molecule-shapes-basics%22%2C%22fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1661714801238%22%2C%22timestamp%22%3A1661720765662%7D&brand=phet&ea&fuzz&memoryLimit=1000
Query: brand=phet&ea&fuzz&memoryLimit=1000
Uncaught Error: Assertion failed: tried to removeListener on something that wasn't a listener
Error: Assertion failed: tried to removeListener on something that wasn't a listener
at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1661714801238/assert/js/assert.js:28:13)
at assert (TinyEmitter.ts:149:6)
at removeListener (TinyProperty.ts:154:9)
at unlink (ReadOnlyProperty.ts:418:22)
at unlink (LonePairView.js:123:28)
at dispose (MoleculeView.js:133:19)
at dispose (BondGroupNode.js:91:7)
at getBondDataURL (BondGroupNode.js:155:29)
at (ModelMoleculesScreenView.js:58:25)
at (ModelMoleculesScreen.js:39:15)
id: Bayes Puppeteer
Snapshot from 8/28/2022, 1:26:41 PM
samreid commented 2 years ago

I committed a fix that seems to correct the symptom, but I'm unclear on when initialize is used, so I'm not sure if this is a good long-term solution.

jonathanolson commented 2 years ago

Looks good, thanks!