phetsims / area-builder

"Area Builder" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/area-builder
GNU General Public License v3.0
1 stars 2 forks source link

CT item not found in array #117

Closed KatieWoe closed 3 years ago

KatieWoe commented 3 years ago
area-builder : multitouch-fuzz : unbuilt
https://bayes.colorado.edu/continuous-testing/ct-snapshots/1612753303239/area-builder/area-builder_en.html?continuousTest=%7B%22test%22%3A%5B%22area-builder%22%2C%22multitouch-fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1612753303239%22%2C%22timestamp%22%3A1612754555976%7D&brand=phet&ea&fuzz&fuzzPointers=2&memoryLimit=1000
Query: brand=phet&ea&fuzz&fuzzPointers=2&memoryLimit=1000
Uncaught Error: Assertion failed: item not found in Array
Error: Assertion failed: item not found in Array
at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1612753303239/assert/js/assert.js:25:13)
at arrayRemove (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1612753303239/phet-core/js/arrayRemove.js:19:13)
at Proxy.remove (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1612753303239/axon/js/createObservableArray.js:345:33)
at https://bayes.colorado.edu/continuous-testing/ct-snapshots/1612753303239/area-builder/js/game/model/AreaBuilderGameModel.js:130:28
at TinyEmitter.emit (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1612753303239/axon/js/TinyEmitter.js:71:18)
at https://bayes.colorado.edu/continuous-testing/ct-snapshots/1612753303239/axon/js/Emitter.js:35:29
at Emitter.execute (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1612753303239/axon/js/Action.js:225:18)
at Emitter.emit (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1612753303239/axon/js/Emitter.js:60:19)
at https://bayes.colorado.edu/continuous-testing/ct-snapshots/1612753303239/area-builder/js/common/model/MovableShape.js:58:38
at TinyEmitter.emit (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1612753303239/axon/js/TinyEmitter.js:71:18)
id: Bayes Chrome
Snapshot from 2/7/2021, 8:01:43 PM

----------------------------------

area-builder : multitouch-fuzz : unbuilt
https://bayes.colorado.edu/continuous-testing/ct-snapshots/1612753303239/area-builder/area-builder_en.html?continuousTest=%7B%22test%22%3A%5B%22area-builder%22%2C%22multitouch-fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1612753303239%22%2C%22timestamp%22%3A1612772427259%7D&brand=phet&ea&fuzz&fuzzPointers=2&memoryLimit=1000
Query: brand=phet&ea&fuzz&fuzzPointers=2&memoryLimit=1000
Uncaught Error: Assertion failed: item not found in Array
Error: Assertion failed: item not found in Array
at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1612753303239/assert/js/assert.js:25:13)
at arrayRemove (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1612753303239/phet-core/js/arrayRemove.js:19:13)
at Proxy.remove (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1612753303239/axon/js/createObservableArray.js:345:33)
at https://bayes.colorado.edu/continuous-testing/ct-snapshots/1612753303239/area-builder/js/explore/model/AreaBuilderExploreModel.js:139:28
at TinyEmitter.emit (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1612753303239/axon/js/TinyEmitter.js:71:18)
at https://bayes.colorado.edu/continuous-testing/ct-snapshots/1612753303239/axon/js/Emitter.js:35:29
at Emitter.execute (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1612753303239/axon/js/Action.js:225:18)
at Emitter.emit (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1612753303239/axon/js/Emitter.js:60:19)
at https://bayes.colorado.edu/continuous-testing/ct-snapshots/1612753303239/area-builder/js/common/model/MovableShape.js:58:38
at TinyEmitter.emit (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1612753303239/axon/js/TinyEmitter.js:71:18)
id: Bayes Chrome
Snapshot from 2/7/2021, 8:01:43 PM
pixelzoom commented 3 years ago

In 2/4/21 dev meeting, we established that this is due to multi-touch fuzz testing (?fuzzPointers=2) being enabled for https://github.com/phetsims/aqua/issues/106. area-builder, balancing-act, fractions-equality, and fractions-intro are all experiencing this problem. So whoever works on this, please consider your fix in the context of all of these sims.

jbphet commented 3 years ago

I spent some trying to figure out exactly why this was happening, but it was complex and rare, so I didn't quite get there. There was a case of this problem on each of the two screens, and on both screens the problem occurred when an emitter fired that said that a shape had returned to its home position and should therefore be removed, but for some reason it was already gone. I decided to add this.interruptSubtreeInput() to the ResetAllButton listener on the first screen and the "Start Over" button listener on the second, since the stack traces indicated that these were the situations when the problem occurred. After making this change, I ran the multi-touch fuzz test for 10 minutes without hitting the condition, so hopefully this fixed the issue.

I'll leave it open and follow up later to see if CT is clear.

jbphet commented 3 years ago

CT is clear, closing.

image