-
-
Notifications
You must be signed in to change notification settings - Fork 166
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
Intermittent No loader found
error
#427
Comments
All I can say is that this is somehow a Godot bug. The terrain uses a custom loader here: https://github.com/Zylann/godot_heightmap_plugin/blob/master/addons/zylann.hterrain/hterrain_resource_loader.gd There seems to have been weird heisenbugs with custom savers and loaders for a very long time (notably saving). I suspect all the changes that have been done to GDScript over the years have somehow broken it in very unintuitive ways and nobody has looked into it. I could never do that either because these issues just never reproduced on my end... Btw I find it extremely weird that on your screenshot Godot goes through |
I see, thanks. Thought you may have any ideas or already saw something similar. Terrain saving and in-editor behavior is all working just fine for me, never had any issues there, only that strange project build/start bug. Looks like I will have to inspect the original C++ eventually if want to find out the cause 🙂 Oh, |
And is the data directory actually present? Like, its contents have not been erased or anything? |
I mean not accessible when that issue happens. The directory is obviously always here as I'm able to load the project correctly with restart later |
Just had a thought. Could it be connected to a plugin saving the data on a scene save? When Godot starting/building the project it's always saving the opened scenes; maybe sometimes it doesn't do it fast enough and just started in-game plugin fails to load because the files are still being written to? Maybe you have any functionality connected to that |
The thing is, you would expect any saving to be completed before Godot starts the game... so there shouldn't be file locking issues (but I don't know for sure if Godot actually respects that). The only known issue you might encounter is that if you made unsaved changes and play, Godot won't re-import the saved PNGs until you unfocus/refocus the editor so in the worst case you might just see a slightly out-of-date terrain. But flat-out being unable to load even a PNG from this folder is unexpected and I don't know what could be done to figure out what's really happening. Maybe as a test, try to comment out all the code in the saver to prevent those files to be eventually written to, to check if it's some weird permissions issue (and restart the editor to make sure the plugin reloads properly), but again if that's the cause, that would mean Godot is wrongly starting the game too early which the plugin can't possibly workaround. |
Can't test right now, maybe will do it tomorrow. I will let you know in this thread if I happen to found out anything. Thanks a lot |
Ok, I found out the culprit. For some reason Godot sometimes doesn't register yours Previous part is understandable, but it's strange that separately after that my another C# script cannot load the Oh, yes, and it is definitely not saving-lock issue, commented your saver to just return Yea, crazy stuff... :) |
Describe the bug
Sometimes on project start
data.hterrain
just fails to load, thus the terrain itself doesn't appear and all physics bodies just fall through.Not sure what exactly might be causing it. It happens in 90% of times I build the project (.NET) and very rarely on usual start. Second immediate start is always fixes the issue and all the data gets loaded correctly.
It might be a problem on my side, but have no idea what might be wrong... Maybe Godot for some reason locks the files after build? (but it wouldn't explain rare random fails with usual starts). I also do not reference terrain data in any way in my project, so nothing should be interfering concurrently with plugin (and it wouldn't be connected to build process anyway). It will be very appreciated if someone proposes any ideas on how to fix that.
It's not much of problem for now as I can always just restart the scene, but it's a little annoying; and might become a real problem if it might happen on any release builds.
To Reproduce
No reliable way to reproduce, unfortunately.
Expected behavior
Every time I build & start the project terrain should be loading just fine.
Screenshots

Environment
OS:
Windows 11 Pro 23H2
Graphics card:
1070 TI
Godot version:
4.2.1 .NET
Plugin version:
1.7.2
Renderer used:
Forward+
The text was updated successfully, but these errors were encountered: