Skip to content
New issue

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

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

Already on GitHub? # to your account

Memory access fault on constraint creation #421

Open
jackdigitalinsight opened this issue Sep 28, 2023 · 1 comment
Open

Memory access fault on constraint creation #421

jackdigitalinsight opened this issue Sep 28, 2023 · 1 comment

Comments

@jackdigitalinsight
Copy link

crash.html.txt

The attached simple example A-Frame/Ammo scene has a kinematic parent and dynamic child, with functions (to type in on the browser console) to attach (add 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 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

bodyTransform 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?

Thank you.

@jackdigitalinsight
Copy link
Author

Oh, moving this to https://github.com/c-frame/aframe-physics-system/issues, seems more active.

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

No branches or pull requests

1 participant