This problem only exists with exports.
I've been preloading lots of PNG files without a problem.
Today I added a bunch more and as far as I can tell the images are exactly the same (format) and imported the same but when I add these lines I get the error. 'Pendulum' is the last of a series of frames that have been importing fine.
The error has not been consistent; I modified the Fireplace_0 with the Pendulum png and of course it ran fine. When I ran it again with a different modification (that I can't remember) it ran fine, but then failed again. Given the huge cascade of failures at the cpp level it feels like a bug but don't see why the new images are so special. I even tried commenting out a bunch of other preloaded images in case it's a memory issue but that didn't work.
'Pendulum_23':preload("res://N0307_NearBathroom/Pendulum/Pendulum_23.png"),
'Fireplace_0':preload("res://N0306_CenterOfLivingRoom/Fireplace/Fireplace_050.png"),
I get this error:
D:\GodotProjects>
Godot Engine v3.5.3.stable.official.6c814135b - https://godotengine.org
OpenGL ES 3.0 Renderer: Intel(R) Iris(R) Xe Graphics
Async. shader compilation: OFF
ERROR: No loader found for resource: res://N0306_CenterOfLivingRoom/Fireplace/Fireplace_052.png.
at: (core/io/resource_loader.cpp:278)
SCRIPT ERROR: Parse Error: Can't preload resource at path: res://N0306_CenterOfLivingRoom/Fireplace/Fireplace_052.png
at: GDScript::load_byte_code (res://CommonScripts/g.gdc:293)
ERROR: Method failed. Returning: ERR_PARSE_ERROR
at: load_byte_code (modules/gdscript/gdscript.cpp:782)
ERROR: Cannot load byte code from file 'res://CommonScripts/g.gdc'.
at: (modules/gdscript/gdscript.cpp:2205)
ERROR: Failed loading resource: res://CommonScripts/g.gdc. Make sure resources have been imported by opening the project in the editor at least once.
at: (core/io/resource_loader.cpp:270)
ERROR: res://global.tscn:3 - Parse Error: [ext_resource] referenced nonexistent resource at: res://CommonScripts/g.gd
at: poll (scene/resources/resource_format_text.cpp:412)
ERROR: Failed to load resource 'res://global.tscn'.
at: (core/io/resource_loader.cpp:206)
ERROR: Failed loading resource: res://global.tscn. Make sure resources have been imported by opening the project in the editor at least once.
at: (core/io/resource_loader.cpp:270)
ERROR: Can't autoload: res://global.tscn
at: (main/main.cpp:1912)