You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The attached simple example A-Frame/Ammo scene has a kinematic parent and dynamic child, with functions (to type into the browser console) to attach (add lock constraint), detach (remove constraint), and move the kinematic parent. Running in Chrome on Windows 10, if physics has moved the dynamic child since loading the HTML, the attach() throws a memory fault at Ammo.destroy(bodyTransform) near the end of the ammo-constraint component createConstraint function.
e.g.
move() (pushes unattached child away) then attach()
throws the fault, while
attach(), move(), move(), detach(), move(), attach() (where the child only moves when attached)
works
The bodyTransform that is destroyed is set near the top of that function:
const bodyTransform = body.getCenterOfMassTransform().inverse().op_mul(targetBody.getWorldTransform());
Does that allocate, or should the function not be destroying it?
If I duplicate the logic of createConstraint() but leave out Ammo.destroy(bodyTransform), (and disable deactivation on child) it seems to work fine. Hopefully not leaking memory.
(Posted to kripken/ammo.js#421 but I guess this is the new active home?)
The attached simple example A-Frame/Ammo scene has a kinematic parent and dynamic child, with functions (to type into the browser console) to attach (add lock constraint), detach (remove constraint), and move the kinematic parent. Running in Chrome on Windows 10, if physics has moved the dynamic child since loading the HTML, the attach() throws a memory fault at Ammo.destroy(bodyTransform) near the end of the ammo-constraint component createConstraint function.
e.g.
move() (pushes unattached child away) then attach()
throws the fault, while
attach(), move(), move(), detach(), move(), attach() (where the child only moves when attached)
works
The bodyTransform that is destroyed is set near the top of that function:
const bodyTransform = body.getCenterOfMassTransform().inverse().op_mul(targetBody.getWorldTransform());
Does that allocate, or should the function not be destroying it?
If I duplicate the logic of createConstraint() but leave out Ammo.destroy(bodyTransform), (and disable deactivation on child) it seems to work fine. Hopefully not leaking memory.
Thank you.
crash.html.txt
The text was updated successfully, but these errors were encountered: