Skip to content
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

bytes_to_var_with_objects fails to decode custom classes on threads in v4.3.beta3 #94220

Closed
yukinogatari opened this issue Jul 11, 2024 · 3 comments · Fixed by #94526
Closed

Comments

@yukinogatari
Copy link

Tested versions

Regression introduced in v4.3.beta3.official [82cedc8]
Works as expected in v4.3.beta2.official [b75f048]

System information

Godot v4.3.beta3 - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 (NVIDIA; 31.0.15.4633) - AMD Ryzen 9 7900X 12-Core Processor (24 Threads)

Issue description

Deserializing custom classes with var_to_bytes_with_objects sometimes fails when run on a separate thread. Attempting to do so inconsistently results in the engine spitting out a bunch of Can't load script at path: 'res://custom_resource.gd'. errors.

Steps to reproduce

  1. Run the MRP in v4.3.beta3.official [82cedc8]
  2. Click the Run Threaded button: it fails to properly deserialize the data ~60% of the time
  3. Click the Run Unthreaded button: it produces no deserialization failures

Minimal reproduction project (MRP)

threaded-deserialization-bug.zip

@AThousandShips
Copy link
Member

Are you able to test with this PR?

CC @RandomShaper could you take a look

@yukinogatari
Copy link
Author

That PR does indeed appear to fix the problem!

@RandomShaper
Copy link
Member

Fixed by #94526.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Very Bad
Development

Successfully merging a pull request may close this issue.

3 participants