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

Going back and forth between collections and adding molecules can crash sim #141

Closed
ghost opened this issue Jan 16, 2020 · 5 comments
Closed
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Jan 16, 2020

Test Device

Hanson

Operating System

Windows 10

Browser

Chrome 79.0.3945.117

Problem Description

If you follow steps 1-6 (see steps to reproduce), you should see molecules from collection A in the play area. You can manipulate these molecules, and if you try to put them back in their bucket, the sim crashes. There is a console error when the sim crashes.

build-a-molecule_en_phet.html:1110 Uncaught TypeError: Cannot read property 'atoms' of null
    at H.value (build-a-molecule_en_phet.html:1110)
    at H.value (build-a-molecule_en_phet.html:1110)
    at C.end [as _end] (build-a-molecule_en_phet.html:1110)
    at build-a-molecule_en_phet.html:1110
    at C.onRelease (build-a-molecule_en_phet.html:1110)
    at e.value (build-a-molecule_en_phet.html:1110)
    at C.release (build-a-molecule_en_phet.html:1110)
    at C.release (build-a-molecule_en_phet.html:1110)
    at C.pointerUp (build-a-molecule_en_phet.html:1110)
    at H.value (build-a-molecule_en_phet.html:1110)

Steps to Reproduce

  1. Complete a collection, call it collection A.
  2. Move to the next collection, call it collection B.
  3. Go back to collection A.
  4. Put a molecule in the play area.
  5. Go back to collection B.
  6. Go back collection A.

Visuals

Troubleshooting Information !!!!! DO NOT EDIT !!!!! Name: ‪Build a Molecule‬ URL: https://phet-dev.colorado.edu/html/build-a-molecule/0.0.0-dev.38/phet/build-a-molecule_en_phet.html Version: 0.0.0-dev.38 2020-01-09 14:39:10 UTC Features missing: touch User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 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: {}
@ghost ghost added the type:bug label Jan 16, 2020
@ghost ghost assigned Denz1994 Jan 16, 2020
@Denz1994
Copy link
Contributor

@Denz1994 Denz1994 assigned ghost Jan 16, 2020
@KatieWoe
Copy link
Contributor

KatieWoe commented Jan 16, 2020

It is, but the steps are a bit more involved now.

  1. Do all the steps in the issue above
  2. Try to drag the first atom around (this will start to cause odd behavior of the atoms
  3. Drag out another atom from the carousel
    bugstill
    stillbug

@ghost ghost removed their assignment Jan 16, 2020
Denz1994 added a commit that referenced this issue Feb 10, 2020
…e doc regarding currentCollectionProperty links. #141
@Denz1994
Copy link
Contributor

The issue here is that when swapping collections, the previous kits weren't being reset, but their listeners were being deleted. We have to reset the kit to a clean state and then delete its listeners so when we return back to that collection's kit there aren't any lingering molecules without listeners.

Can you confirm this isn't an issue anymore in this dev version @KatieWoe?

@KatieWoe
Copy link
Contributor

Looks good in that dev version (didn't test much beyond issue above, but looked good from what I saw). We'll keep an eye out in the next test, but I think this is good for now.

@KatieWoe KatieWoe assigned Denz1994 and unassigned KatieWoe Feb 10, 2020
@Denz1994
Copy link
Contributor

Good to know. Closing this issue.

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

No branches or pull requests

2 participants