phetsims / energy-forms-and-changes

"Energy Forms And Changes" is an educational simulation in HTML5, by PhET Interactive Simulations.
MIT License
5 stars 5 forks source link

Adding brick to liquid, heating, then resetting causes chunks to be off, move to same spot #168

Closed ghost closed 5 years ago

ghost commented 5 years ago

Test Device

MacBook Air

Operating System

macOS 10.14.2

Browser

71.0.3578.98

Problem Description

For https://github.com/phetsims/QA/issues/258. This is bug with convoluted steps. https://github.com/phetsims/energy-forms-and-changes/issues/165 and https://github.com/phetsims/energy-forms-and-changes/issues/166 occur as a result of this bug.

Steps to Reproduce

  1. Put olive oil or water on a burner.
  2. Put brick or iron in the liquid. (I've found that it's easier to reproduce with energy chunks enabled and a thermometer near the top of the beaker, but others have managed without these.)
  3. Enable fast forward. (Some testers have found this bug without this step.)
  4. Heat the liquid.
  5. You should see about 1/3 of the liquid disappear.
  6. Reset the sim. (Bug will occur without this, but this does not solve and sometimes worsens bug.)
  7. Enable energy chunks. (They should look weird or nonexistent in the liquid you heated.)

Screenshots

screen shot 2019-01-16 at 9 35 12 am

screen shot 2019-01-16 at 8 58 22 am

Troubleshooting Information Name: ‪Energy Forms And Changes‬ URL: https://phet-dev.colorado.edu/html/energy-forms-and-changes/1.0.0-dev.15/phet/energy-forms-and-changes_en_phet.html Version: 1.0.0-dev.15 2019-01-15 20:46:49 UTC Features missing: touch User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 Language: en-US Window: 1440x821 Pixel Ratio: 1/1 WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium) GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 15 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 80) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {}
KatieWoe commented 5 years ago

The results of this bug can differ a bit each time we see it. I'm using this comment to detail some of the bugs seen when after these steps are followed.

  1. The chunks may either disappear, or be changed to be off center and partially gone
  2. A string of glitchy chunks follow the beaker around as it is dragged, especially if you have attempted to heat the beaker after the glitch occurred
  3. Some elements overlap with each other, such as the brick and iron being in the same place.
  4. Moving elements can cause them to phase through beakers, into the burner, etc
  5. If a thermometer is in the water or oil when the bug occurs, the thermometer may jump to a new location on the screen
  6. Even if the thermometer doesn't do this, it may stop reading temperature of the liquid
  7. Resetting sim with button does not clear the issue
  8. dragging thermometer over objects can push them around without attaching thermometer
  9. Liquids can be placed on top of each other and overlap
  10. burner can take energy from adjacent object
  11. Beakers may jump to random spots on screen when you attempt to move them

More screenshots that may help incoming.

KatieWoe commented 5 years ago

ironbrickinsameplace

resetoff

https://drive.google.com/file/d/1ctu1pBldtkRQ3Wrk1U_U14BTZee-nkyz/view?usp=sharing

kellywurtz commented 5 years ago

Also able to reproduce the disappearing olive oil bug on normal speed.

(Macbook Pro, Chrome 71.0.3578.98)

efac_disappearingoliveoil

rea-laura commented 5 years ago

Adding visual examples to bug side effects found in Katie's previous comment: All videos in google photo album: https://photos.app.goo.gl/ejfVQ4YoxBLw5CuU6

"4. Moving elements can cause them to phase through beakers, into the burner, etc"

here is another example of the problem she found. On iPad (12.1.1) this problem can sometimes even prevent the brick from being removed from the olive oil. When dragged upward, it instead moves down through the beaker and into the burner and gets trapped. (first video)

"8. dragging thermometer over objects can push them around without attaching thermometer" (second video)

"9. Liquids can be placed on top of each other and overlap" c2b9f633-c963-442b-9e83-1108011dcdad

"10. burner can take energy from adjacent object" (third video)

ariel-phet commented 5 years ago

Seems like these are high priority issues...especially reset not properly resetting the sim.

ghost commented 5 years ago

I've noticed that if you take the brick or iron out of the liquid and you further heat the liquid, the brick or iron will behave as if it's still in the liquid, i.e. by giving off energy chunks.

EDIT: Or maybe this is just a normal feature? The brick or iron is cooling?

chrisklus commented 5 years ago

I've noticed that if you take the brick or iron out of the liquid and you further heat the liquid, the brick or iron will behave as if it's still in the liquid, i.e. by giving off energy chunks.

@lmulhall-phet can you add visuals to confirm this behavior is incorrect? If the blocks are in a warm fluid and then removed, they should lose heat to the air as you've described. However, if it's clear that they're still heating up like they are in the liquid, that is indeed a problem.

ghost commented 5 years ago

@chrisklus I'm looking at it right now and I'm fairly certain what I'm seeing is the "blocks are warm, removed, then lose heat" behavior. Sorry. Thought it might help you guys suss out the problem if it turned out the sim thought the blocks were still in the liquid.

ghost commented 5 years ago

One more side effect of this bug: I've seen the whole beaker of olive oil disappear and then reappear in its starting position. @KatieWoe says @rea-laura observed the same thing or something similar.

jbphet commented 5 years ago

I dug into this, and it likely was due to some position vectors being changed out from under the thermal model elements (e.g. blocks and beakers). The only reasonable explanation that @chrisklus and I could come up with for this was that the vector pooling that was being done to reduce vector allocations wasn't working correctly, i.e. a vector was being freed that was still in use somewhere else. I removed all pool-based creation and freeing of vectors except for in the EnergyChunkDistributor (since it is a more controlled environment), and the problem appears to be resolved.

jbphet commented 5 years ago

Assigning to @lmulhall-phet to test on master.

ghost commented 5 years ago

@jbphet looks good on master.

chrisklus commented 5 years ago

@lmulhall-phet nice! Do you think we're ready to close?

KatieWoe commented 5 years ago

@chrisklus Our fastest method of causing the bug didn't work after ~5 min, so I think its good.

chrisklus commented 5 years ago

@KatieWoe sounds good, thank you. Closing.