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

Uncaught TypeError: Cannot read properties of undefined (reading 'neighbors') #390

Open
zepumph opened this issue Sep 5, 2024 · 2 comments
Assignees
Labels
type:bug Something isn't working

Comments

@zepumph
Copy link
Member

zepumph commented Sep 5, 2024

Hit this while testing in #369:

http://localhost:8080/buoyancy/buoyancy_en.html?brand=phet-io&phetioStandalone&ea&debugger&preferencesStorage&fuzz&fuzzBoard&disableModals

I don't think we need to do much here, just want to track it in case it starts showing up more.

p2-0.7.1.js:12276 Uncaught TypeError: Cannot read properties of undefined (reading 'neighbors')
    at IslandManager.split (p2-0.7.1.js:12276:12)
    at World.internalStep (p2-0.7.1.js:13093:27)
    at World.step (p2-0.7.1.js:12895:18)
    at PhysicsEngine.step (PhysicsEngine.ts:119:16)
    at BuoyancyShapesModel.step (DensityBuoyancyModel.ts:398:17)
    at Sim.ts:444:22
    at PhetioAction.execute (PhetioAction.ts:162:17)
    at Sim.stepSimulation (Sim.ts:1068:31)
    at Sim.stepOneFrame (Sim.ts:1058:12)
    at Sim.runAnimationLoop (Sim.ts:1033:12)
@samreid
Copy link
Member

samreid commented Sep 7, 2024

Relevant code in the area:

    // Add connectivity data. Each equation connects 2 bodies.
    for(var k=0; k!==equations.length; k++){
        var eq=equations[k],
            i=bodies.indexOf(eq.bodyA),
            j=bodies.indexOf(eq.bodyB),
            ni=nodes[i],
            nj=nodes[j];
        ni.neighbors.push(nj);
        nj.neighbors.push(ni);
        ni.equations.push(eq);
        nj.equations.push(eq);
    }

@zepumph
Copy link
Member Author

zepumph commented Sep 12, 2024

I believe we have a reproducible case over in #399 (comment):

After Reset All, if you try to select "same volume" or a different shape on the shapes screen with the mouse this console error repeatedly pops up:
Screenshot 2024-09-12 at 5 07 53 PM

@zepumph zepumph self-assigned this Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants