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
Issue description:
When I try to use PhysicsServer in different thread, game window eventually freezes and the only way to close it is with kill -9 -PID from terminal. I get no errors, no logs, only pointless mono dump.
It seems like it's related to the load, if I add items slowly (visuals with VisualServer and static bodies + shapes with PhysicsServer), crash happens later. If I add items fast, it happens much sooner.
Physics code is very basic:
RIDbody=PhysicsServer.BodyCreate();PhysicsServer.BodySetMode(body,PhysicsServer.BodyMode.Static);RIDshape=PhysicsServer.ShapeCreate(PhysicsServer.ShapeType.Box);PhysicsServer.ShapeSetData(shape,newVector3(cube.Size.x/2f,cube.Size.y/2f,cube.Size.z/2f));PhysicsServer.BodyAddShape(body,shape,newTransform(Basis.Identity,newVector3(0f,cube.Size.y/2f,0f)));PhysicsServer.BodySetSpace(body,Space);PhysicsServer.BodySetState(body,PhysicsServer.BodyState.Transform,cube.Position);// and laterPhysicsServer.FreeRid(cube.Shape);PhysicsServer.FreeRid(cube.Body);
Steps to reproduce:
Kind of hard to describe it here, I added reproduction project. But basic steps are the following:
Add a method that adds an item with VisualServer and PhysicsServer
Constantly run that method in a background thread
Minimal reproduction project: Issue.zip
PS! Physics code is commented out to show that VisualServer works perfectly. These few lines can be found in Cubes.cs Add and Remove methods. Remove the comments to witness the crash.
The text was updated successfully, but these errors were encountered:
Closing this as I'm not able to replicate it anymore on 4.0.rc.mono. Not sure what or which version fixed it.
Ran the minimal reproduction project (with few minor modifications) until 10,000 instances were added with static bodies.
In said project there's a 90% chance on every frame that cube + static body is added and 50% chance on every frame or when cube count is over set amount (10,000 in my case) that random cube is deleted. So it's quite volatile environment.
Godot version:
3.2.1 Mono
OS/device including version:
macOS 10.15.4
Issue description:
When I try to use PhysicsServer in different thread, game window eventually freezes and the only way to close it is with
kill -9 -PID
from terminal. I get no errors, no logs, only pointless mono dump.It seems like it's related to the load, if I add items slowly (visuals with VisualServer and static bodies + shapes with PhysicsServer), crash happens later. If I add items fast, it happens much sooner.
Physics code is very basic:
Steps to reproduce:
Kind of hard to describe it here, I added reproduction project. But basic steps are the following:
Minimal reproduction project:
Issue.zip
PS! Physics code is commented out to show that VisualServer works perfectly. These few lines can be found in Cubes.cs Add and Remove methods. Remove the comments to witness the crash.
The text was updated successfully, but these errors were encountered: