Open baz-atak opened 1 month ago
Are these changes to the colliders are made inside of _physics_process() or some Area3D signal? That's most likely what's crashing.
In _physics_process(), but I think it crashes when move_and_slide() is called.
Interesting. I'm having the exact same problem right now. Did you fix it?
@AlexLovelock22 I think the problem is with running the physics in a separate thread, and having a lot of colliders. Turning off running physics in separate thread in the project settings seems to stop the crashing. It might also be the case that you need to defer making changes to the colliders states rather than doing it directly (I had other issues trying that) - but I've not seen it mentioned that you should use set_deferred to do it, so it could be a shortfall in the documentation, something in the documentation that I've missed or a bug in the threading code.
Tested versions
Happens in 4.1.stable, 4.2.stable, 4.3 own debug build.
System information
Godot v4.2.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2080 Ti (NVIDIA; 31.0.15.3623) - AMD Ryzen Threadripper 3960X 24-Core Processor (48 Threads)
Issue description
This may be related to other issues such as #70491 and #72491 which refer to issues when option physics/3d/run_on_seperate_thread is enabled. However I don't think the errors are identical.
I get the following error when running through a version with a traceback enabled.
It may be because I change the disabled state of some CharacterBody3D collision shapes to true, but I have been unable to validate this hypothesis, although using set_deferred to set the property does appear to overcome the crashing which might support this theory, although it is difficult to reproduce the crashing. I have been unable to reproduce this issue in another, simpler project.
It may be that I'm doing the wrong thing which is why it's crashing, but to just stop without reporting an error isn't nice. for background: https://forum.godotengine.org/t/crashing-but-why-i-dont-understand-the-error-message/52900/20
Steps to reproduce
I've been unable to create a minimal reproduction project. It might be the complexity is required for the issue to occur, or I've miss-understood was is occurring. It does not happen all the time.
Minimal reproduction project (MRP)
N/A