-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
2D Physics Run on Seperate Thread Crash #93474
Comments
Any update regarding how I can get some more logs of the crash for troubleshooting? |
You need to use a debug build of the engine, and run from console, and get the error logs from that But the best thing would be to have an MRP, or more info, check here for more on debugging and logs |
I would be hard pressed to make an MRP without knowing which part is causing it - it's not a small project I have that I can condense that quickly unfortunately. That being said, where can I get the debug build of the engine? |
Right where I linked are the instructions, and you'll need to build for your os the details are on the same page. there are no official builds with debugging, so you need to build your own
Absolutely, but that makes it even harder for anyone else to identify and fix it, so without an MRP it's very hard to do anything Creating a new project and recrating some conditions would be the way to go probably, but with debugging you can start pinpointing where the issue comes from at least |
Got a more proper stack-trace this time @AThousandShips any idea what this is related to? |
It's related to an |
Are there any illegal operations/calls when using physics in its own thread? Like I can't call x functions outside _phyiscs_process or something? |
You can't call a lot of physics things outside of But this pinpoints it to being related to areas, that should help narrowing it down |
Alright, I'll try to make an mrp... |
@AThousandShips Edit: |
You upload it, it should be small so best upload it directly, just drag it to the input field and keep it focused until it's done uploading, make sure to add it to the original post |
Let me know if it crashes for you - specifically the physics has to be on separate thread (on single it works fine) |
The MRP is not really working, it completely breaks down performance wise because you didn't copy all the code into the MRP, you removed parts that were necessary, for example the It completely bogs down, but it does not crash |
@AThousandShips I apologise - I got too excited that I could replicate so easily and zipped the wrong file. https://github.com/godotengine/godot/assets/10791321/39564a6e-519b-48e9-b910-02d47aa3e544 Edit: |
Will test as well when I have time! |
@AThousandShips any luck replicating? |
Haven't found the time, will see if I can or someone else can try replicating it |
@AThousandShips just gonna ping you one more time if you have a chance to confirm it's happening on your machine 😅 |
Sorry I haven't found the time still, will try find some time once 4.3 is released |
I can confirm that it crashes specifically on threaded, but it only does this once it's broken down completely performance wise, I don't expect this to happen in any reasonable case, and the crash is almost certainly caused by the fact that things are bogged down completely While it shouldn't crash, I'm not sure it's ever going to crash in any reasonable case given that it only crashes with this MRP in extreme slowdown and under an extreme load level (on non-threaded the game simply bogs down to freezing with <1 fps even on my reasonably powerful computer) |
That's fair point, however, even when performance is fine this is relatively repeatable. I have attached an mrp for convenience sake, but all I did was in Also a video to show I'm not crazy 😅 |
Will test that case as well and see! Always important to provide good references for bugs and their scope |
Sounds good, this definitely feels like some sort of race condition that happens specifically during spawning. Because I notice it either crashes while something is being spawned, or doesn't crash once everything is spawned. It's also why higher numbers make this more consistent since there are more frames spent spawning units... but that's just my guess |
@AThousandShips I know it's been dead for a while but I'm still around and hoping this can be addressed/resolved 😅 P.S. |
Can't add any more details to this right now, so needs someone with physics expertise to look at it |
Are you able to replicate the issue on your end with reasonable performance now with the small changes I mentioned? |
I don't remember I will test soon and confirm |
Tested versions
v4.3.beta2.mono.official.b75f0485b
v4.2.stable
System information
Godot v4.3.beta2.mono - Windows 10.0.22631 - Vulkan (Mobile) - dedicated NVIDIA GeForce RTX 4090 (NVIDIA; 31.0.15.5222) - AMD Ryzen 9 7900X 12-Core Processor (24 Threads)
Issue description
When enabling
Run on Seperate Thread
for Physics 2D, the game run from the editor crashes without any error. However, disabled it, the game runs perfectly fine.Video below to demonstrate: https://youtu.be/VzHw3-da53U
Please let me know if there's any way I can get more logs/information about such crashes
Steps to reproduce
Video demonstrating it:
https://youtu.be/VzHw3-da53U
Please let me know if there's any way I can get more logs/information about such crashes
Minimal reproduction project (MRP)
mrp (2).zip
The text was updated successfully, but these errors were encountered: