phetsims / neuron

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

Clearing potential chart and rewind produces strange behavior. #91

Closed orejolaphet closed 8 years ago

orejolaphet commented 9 years ago

If you pause the simulation while the Neuron begins to be stimulated, then Clear the Potential Chart weird behavior occurs after rewinding. (Pause around this point of the Stimulating Neuron process)

screen shot 2015-10-13 at 10 44 47 am

On Safari 9 and Chrome and Firefox Hitting rewind multiple times after this point will not draw the "ring" moving in reverse up the neuron. Instead after rewinding it will constantly generate Sodium ions moving out, Potassium ions entering, and even disappear. Hitting play afterwards will re stimulate the neuron w/o ring and Potential Chart will not be drawn with vertical bar.

screen shot 2015-10-13 at 10 42 42 am

Extra weirdness: This Freezes the Simulation on Safari 9 OS X 10.11 and Firefox 41.01 Win 7 On Firefox debugger brings attention to Line 464

Troubleshooting information (do not edit): Name: ‪Neuron‬ URL: http://www.colorado.edu/physics/phet/dev/html/neuron/1.0.0-dev.13/neuron_en.html Version: 1.0.0-dev.13 2015-10-09 19:02:48 UTC Features missing: touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11) AppleWebKit/601.1.56 (KHTML, like Gecko) Version/9.0 Safari/601.1.56 Language: en-us Window: 1240x712 Pixel Ratio: 2/1 WebGL: WebGL 1.0 (2.1 INTEL-10.8.77) GLSL: WebGL GLSL ES 1.0 (1.20) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 15 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 16) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {"assert":{"sha":"11bc6a6d","branch":"master"},"axon":{"sha":"47eaa1de","branch":"master"},"babel":{"sha":"931afbf1","branch":"master"},"brand":{"sha":"8a756e53","branch":"master"},"chipper":{"sha":"d93dfe7e","branch":"master"},"dot":{"sha":"09f891ac","branch":"master"},"griddle":{"sha":"bf88bc01","branch":"master"},"joist":{"sha":"3fbd99f9","branch":"master"},"kite":{"sha":"81ce58ca","branch":"master"},"neuron":{"sha":"1d73e47d","branch":"master"},"phet-core":{"sha":"f6348fba","branch":"master"},"phetcommon":{"sha":"0e4754fe","branch":"master"},"scenery":{"sha":"8c246268","branch":"master"},"scenery-phet":{"sha":"4cf23e85","branch":"master"},"sherpa":{"sha":"1759eade","branch":"master"},"sun":{"sha":"b66398a5","branch":"master"}}

jbphet commented 9 years ago

Good test case! I just tested, and this issue is not handled correctly in the Java version, so it is likely a problem that has always existed and just got ported with the Java code. This one may be tricky.

jbphet commented 8 years ago

The issue here is that the step back button is enabled in some cases when there is no data to step back to. Clearing the chart also clears the recorded data, so once cleared, stepping backwards has unintended consequences. This bug was apparently present in the Java sim, but was just never caught. I've changed the code that enables/disables the step back button so that step back is disallowed when there is no recorded data. This appears to fix the issue, but I'm leaving it open until #92 is also resolved, since they may be related.

ariel-phet commented 8 years ago

Appears fixed in 1.0.0-rc.1

Closing