Open elmarhoppieland opened 2 weeks ago
Another bug that happens to one of my projects which attempts to use custom resources in the settings is that when running the project it instead runs the project manager. I don't think this happens to other projects that use custom resources but removing the custom resources does fix it so it's most likely related.
This does have the side effect that I can see the project manager's output and error logs which may be helpful:
Output log:
Project is missing: C:/Documenten/Project Settings Corrupt Test/project.godot
Project is missing: C:/Documenten/Corrupt/project.godot
Error log:
E 0:00:01:0996 load_source_code: Attempt to open script 'res://CustomResource.gd' resulted in error 'File not found'.
<C++ Error> Condition "err" is true. Returning: err
<C++ Source> modules/gdscript/gdscript.cpp:1094 @ load_source_code()
E 0:00:01:0996 _load: Failed loading resource: res://CustomResource.gd. Make sure resources have been imported by opening the project in the editor at least once.
<C++ Error> Condition "found" is true. Returning: Ref<Resource>()
<C++ Source> core/io/resource_loader.cpp:283 @ _load()
E 0:00:01:0996 _parse: ConfigFile parse error at C:/Documenten/Project Settings Corrupt Test/project.godot:19: Can't load resource at path: 'res://CustomResource.gd'..
<C++ Source> core/io/config_file.cpp:304 @ _parse()
E 0:00:01:0997 load_source_code: Attempt to open script 'res://CustomResource.gd' resulted in error 'File not found'.
<C++ Error> Condition "err" is true. Returning: err
<C++ Source> modules/gdscript/gdscript.cpp:1094 @ load_source_code()
E 0:00:01:0997 _load: Failed loading resource: res://CustomResource.gd. Make sure resources have been imported by opening the project in the editor at least once.
<C++ Error> Condition "found" is true. Returning: Ref<Resource>()
<C++ Source> core/io/resource_loader.cpp:283 @ _load()
E 0:00:01:0997 _parse: ConfigFile parse error at C:/Documenten/Corrupt/project.godot:17: Can't load resource at path: 'res://CustomResource.gd'..
<C++ Source> core/io/config_file.cpp:304 @ _parse()
I'm not sure whether I should open a new issue since I can't consistently reproduce it and it seems to be a direct result of this bug.
Tested versions
v4.3.stable.official [77dcf97d8]
System information
Godot v4.3.stable - Windows 10.0.22631 - Vulkan (Forward+) - integrated Intel(R) UHD Graphics (Intel Corporation; 27.20.100.9415) - Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz (8 Threads)
Issue description
After executing the following code:
And then reloading the project, the following happens:
Opening the project's
project.godot
file and changingtest/resource=Object(Resource,"resource_local_to_scene":false,"resource_name":"","script":Resource("res://CustomResource.gd"))
totest/resource=Object(Resource,"resource_local_to_scene":false,"resource_name":"")
(removing the resource's script) fixes the problem and after reloading the project manager the project shows up normally.Steps to reproduce
Resource
and give it aclass_name
._enter_tree()
function, set a custom project setting to an instance of the resource defined above.project.godot
file and remove thescript=Resource(...)
from the value of the new setting.Minimal reproduction project (MRP)
Corrupt.zip