phetsims / build-a-nucleus

"Build a Nucleus" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 5 forks source link

Assertion failed: a particle should be removed in one of the above cases #129

Closed zepumph closed 1 year ago

zepumph commented 1 year ago

Found this while working on https://github.com/phetsims/build-a-nucleus/issues/115.

build-a-nucleus : pan-and-zoom-fuzz : unbuilt
http://128.138.93.172//continuous-testing/ct-snapshots/1692116762085/build-a-nucleus/build-a-nucleus_en.html?continuousTest=%7B%22test%22%3A%5B%22build-a-nucleus%22%2C%22pan-and-zoom-fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1692116762085%22%2C%22timestamp%22%3A1692118819380%7D&brand=phet&ea&fuzz&fuzzPointers=2&supportsPanAndZoom=true
Query: brand=phet&ea&fuzz&fuzzPointers=2&supportsPanAndZoom=true
Uncaught Error: Assertion failed: a particle should be removed in one of the above cases
Error: Assertion failed: a particle should be removed in one of the above cases
at window.assertions.assertFunction (http://128.138.93.172//continuous-testing/ct-snapshots/1692116762085/assert/js/assert.js:28:13)
at assert (BANScreenView.ts:806:18)
at step (Sim.ts:432:18)
at apply (PhetioAction.ts:161:16)
at execute (Sim.ts:1017:30)
at stepSimulation (Sim.ts:1007:11)
at stepOneFrame (Sim.ts:982:11)
[URL] http://128.138.93.172//continuous-testing/aqua/html/sim-test.html?url=..%2F..%2Fct-snapshots%2F1692116762085%2Fbuild-a-nucleus%2Fbuild-a-nucleus_en.html&simQueryParameters=brand%3Dphet%26ea%26fuzz%26fuzzPointers%3D2%26supportsPanAndZoom%3Dtrue&testInfo=%7B%22test%22%3A%5B%22build-a-nucleus%22%2C%22pan-and-zoom-fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1692116762085%22%2C%22timestamp%22%3A1692118819380%7D
[NAVIGATED] http://128.138.93.172//continuous-testing/aqua/html/sim-test.html?url=..%2F..%2Fct-snapshots%2F1692116762085%2Fbuild-a-nucleus%2Fbuild-a-nucleus_en.html&simQueryParameters=brand%3Dphet%26ea%26fuzz%26fuzzPointers%3D2%26supportsPanAndZoom%3Dtrue&testInfo=%7B%22test%22%3A%5B%22build-a-nucleus%22%2C%22pan-and-zoom-fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1692116762085%22%2C%22timestamp%22%3A1692118819380%7D
[NAVIGATED] about:blank
[NAVIGATED] http://128.138.93.172//continuous-testing/ct-snapshots/1692116762085/build-a-nucleus/build-a-nucleus_en.html?continuousTest=%7B%22test%22%3A%5B%22build-a-nucleus%22%2C%22pan-and-zoom-fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1692116762085%22%2C%22timestamp%22%3A1692118819380%7D&brand=phet&ea&fuzz&fuzzPointers=2&supportsPanAndZoom=true
[CONSOLE] enabling assert
[CONSOLE] continuous-test-load
[CONSOLE] Assertion failed: a particle should be removed in one of the above cases
[PAGE ERROR] Error: Error: Assertion failed: a particle should be removed in one of the above cases
at window.assertions.assertFunction (http://128.138.93.172//continuous-testing/ct-snapshots/1692116762085/assert/js/assert.js:28:13)
at ChartIntroScreenView.step (http://128.138.93.172//continuous-testing/ct-snapshots/1692116762085/chipper/dist/js/build-a-nucleus/js/common/view/BANScreenView.js:645:19)
at http://128.138.93.172//continuous-testing/ct-snapshots/1692116762085/chipper/dist/js/joist/js/Sim.js:353:19
at PhetioAction.execute (http://128.138.93.172//continuous-testing/ct-snapshots/1692116762085/chipper/dist/js/tandem/js/PhetioAction.js:132:17)
at Sim.stepSimulation (http://128.138.93.172//continuous-testing/ct-snapshots/1692116762085/chipper/dist/js/joist/js/Sim.js:856:31)
at Sim.stepOneFrame (http://128.138.93.172//continuous-testing/ct-snapshots/1692116762085/chipper/dist/js/joist/js/Sim.js:846:12)
at Sim.runAnimationLoop (http://128.138.93.172//continuous-testing/ct-snapshots/1692116762085/chipper/dist/js/joist/js/Sim.js:824:12)
[CONSOLE] continuous-test-error

id: "Sparky Node Puppeteer"
Snapshot from 8/15/2023, 10:26:02 AM
zepumph commented 1 year ago

@Luisav1 and I did some investigation, and every time this is hit, the particle atom is a wildly wrong atom. Here are some cases:

0p3n 9p2n Fluorine 11 3p0n Lithium 3 (eek), in this case it seemed to be from a beta + decay, because there was an electron animating out.

Looks like when you click an incoming particle into the atom, you can still press the chart decay button while it is animating in (for the old atom). This seems buggy. Let's work on that.

zepumph commented 1 year ago

@Luisav1 and hopeful that the above will clean things up. We will see though!

zepumph commented 1 year ago

We don't see this on CT anymore. Closing