X Tutup
Skip to content

Remove call to PhysicsServer3D from Jolt Physics implementation#113622

Merged
akien-mga merged 1 commit intogodotengine:masterfrom
mihe:jolt/no-nested-mt-flushes
Dec 5, 2025
Merged

Remove call to PhysicsServer3D from Jolt Physics implementation#113622
akien-mga merged 1 commit intogodotengine:masterfrom
mihe:jolt/no-nested-mt-flushes

Conversation

@mihe
Copy link
Contributor

@mihe mihe commented Dec 5, 2025

Fixes #113620.

The Jolt Physics implementation of PhysicsServer3D::joint_disable_collisions_between_bodies currently calls out to PhysicsServer3D inside of it, by calling PhysicsServer3D::body_add_collision_exception. This seems to cause deadlocks as of #112506, for reasons that are currently unclear.

However, there's no need to go through PhysicsServer3D (and thus PhysicsServer3DWrapMT) since we'll always be on the server thread at this point anyway. Simply switching to use JoltPhysicsServer3D resolves the problem.

@akien-mga akien-mga merged commit dec5a37 into godotengine:master Dec 5, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4.6-dev5: HingeJoint3D freezes Editor if Jolt Physics is running on Separate Thread

2 participants

X Tutup