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

Arrow doesn't disappear from half-life chart in some randomized listener cases #171

Closed jbphet closed 1 year ago

jbphet commented 1 year ago

This was found during the "Does the sim behave correctly when listener order is shuffled?" step of the code review, see https://github.com/phetsims/build-a-nucleus/issues/165.

When testing with shuffled listeners, the magenta arrow on the "Half-life" chart in the "Decay" screen is not always removed from the chart when the nucleus is cleared out.

To duplicate:

  1. Load the sim with the random seed 357123 (I saw this using several seeds, this is just one of them). The URL I used on my system was http://localhost:8080/build-a-nucleus/build-a-nucleus_en.html?brand=phet&ea&listenerOrder=random(357123).
  2. Add a proton using the up arrow button
  3. Remove the proton using the down arrow button (reset works for this too)
  4. Note that the arrow still shows on the chart and the half-life value shows the "Infinity" symbol.

image

When the listeners are not randomized, the same sequence yields the following:

image

zepumph commented 1 year ago

Fixed over in with https://github.com/phetsims/build-a-nucleus/issues/105 with https://github.com/phetsims/axon/commit/4f571cbc738bdcba5f9f49050c3f2a1eddde9110. Thanks for the report.