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
Godot v4.4.dev5.mono - Windows 10.0.26100 - Multi-window, 1 monitor - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2070 Super with Max-Q Design (NVIDIA; 31.0.15.4633) - Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz (16 threads)
Issue description
Currently, if we use either a worker thread with ResourceLoader::load() or use ResourceLoader::load_threaded_request(), and try to load any resource with a dependency on a script that inherits a generic C# class, we run into a _scriptTypeBiMap.ReadWriteLock deadlock.
This happens in a very specific circumstance:
The script and its base hasn't been loaded before, so it's not populated into the BiMap
Calling the load from a worker thread will make the ResourceLoader::load() call from inside godot_sharp_internal_script_load to spin up a separate worker thread to load the dependency base script
This secondary worker thread will try to get the script from the BiMap unsuccessfully, since it hasn't been populated yet, and will then fall back to creating the script bridge. While doing so, it will try to lock the already locked BiMap ReadWriteLock from when we were loading it's child script
Steps to reproduce
Download the MRP
Launch the project with a build of Godot4.4dev5 with the --verbose arg
Click the Attempt Repro button several times while looking at the log.
Eventually you should see the load stall at the first generic csharp:// script and not manage to print "Loaded successfully"
Tested versions
System information
Godot v4.4.dev5.mono - Windows 10.0.26100 - Multi-window, 1 monitor - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2070 Super with Max-Q Design (NVIDIA; 31.0.15.4633) - Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz (16 threads)
Issue description
Currently, if we use either a worker thread with ResourceLoader::load() or use ResourceLoader::load_threaded_request(), and try to load any resource with a dependency on a script that inherits a generic C# class, we run into a _scriptTypeBiMap.ReadWriteLock deadlock.
This happens in a very specific circumstance:
Steps to reproduce
Minimal reproduction project (MRP)
thread-lock-mrp.zip
The text was updated successfully, but these errors were encountered: