Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teapot causes a crash and freeze #176

Closed
KatieWoe opened this issue Jan 16, 2019 · 4 comments
Closed

Teapot causes a crash and freeze #176

KatieWoe opened this issue Jan 16, 2019 · 4 comments

Comments

@KatieWoe
Copy link
Contributor

Test device:
Dell Laptop
Operating System:
Win 10
Browser:
firefox (reproduced on chrome)
Problem description:
For phetsims/qa#258
It is possible for the sim to crash and freeze when the teapot is used under certain circumstances.
Steps to reproduce:

  1. Go to the second screen
  2. Select teapot and solar panel
  3. Make sure energy chunks are off
  4. Heat teapot and keep heated
  5. Wait until steam cloud is large
  6. Select Energy chunks. Sim will freeze at this point

Screenshots:
crashingfire

Troubleshooting information (do not edit):

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
Flags: pixelRatioScaling
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0
Language: en-US
Window: 1536x760
Pixel Ratio: 2.5/1
WebGL: WebGL 1.0
GLSL: WebGL GLSL ES 1.0
Vendor: Mozilla (Mozilla)
Vertex: attribs: 16 varying: 30 uniform: 4096
Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32)
Max viewport: 32767x32767
OES_texture_float: true
Dependencies JSON: {}

@chrisklus
Copy link
Contributor

Nice find @KatieWoe! I can reproduce on my Macbook Pro as well, both Chrome and Firefox.

@chrisklus
Copy link
Contributor

There was no handling in preloadEnergyChunks for the case when the tea kettle has no system to give its energy chunks to, so the freeze was caused by the sim being stuck in a while loop. When the tea kettle is hooked up to the generator, the chunks that don't get selected for transfer get put into an exemptFromTransferEnergyChunks array, so I pushed the preloading chunks into there as well when they have no next system to go to.

This fixed the bug, but there is a bit of a gap between the preloaded energy chunks and the following chunks that come out of the burner once symbols are on because of the way preloadEnergyChunks was implemented. Fixing this gap is low priority, so I've created a second issue for it, see #178

@KatieWoe could you test on your device and confirm this is working?

@KatieWoe
Copy link
Contributor Author

Looks good @chrisklus

@chrisklus
Copy link
Contributor

Sweet, thanks. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants