The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

+4 votes

I've hammered out all the errors that were in my game but now I have one final problem. In the editor, my game works perfectly fine without any errors in the debugger menu and the Godot terminal (or whatever it's called). But when I export the game and try to launch it, it crashes immediately. I've brought this up on another post of mine and someone tested it out on their computer and said that it launched fine for them. I've tried exporting and launching it on two different computers with the same result. Here's a screenshot of the debugger and my export settings and the project itself:


Export Settings

in Engine by (21 points)
edited by

It works fine for me. There is one thing I can think of:
When you export for Windows, you get two files, one being the shortcut of the game (the one with the icon) and the other being a .pck file. Under no circumstances should you separate those two files. Are you sure they are both in the same directory when you try to run the game?

I just had the same problem, read JohnnyGames' comment, and his solution worked: But I can add to it! My project has a config.ini file which stores user settings between sessions. That turned out to be the missing material, so my exported file is just the .exe, .pck, and .ini files.

So if your project exports to an external file, that file has to be copied to the exported folder manually.

2 Answers

+3 votes

Ok with a bit of trial and error I figured out that your project needs access to the materials folder for some reason. It appears as if the materials used are not included in the .pck file that Godot exports. If you place the executable and its .pck file in the same directory where the materials folder can be found, it works. Otherwise it throws the error you posted.

For now, make sure to bundle the materials folder with your game until you find out why materials are not exported.

by (1,892 points)

Thanks you so much for looking into this. I’ve had this problem for weeks. I’m at work right now so when I get home I’ll be sure to try that.

Just a small remark, i tried your project under Linux and materials failed to load,
turned out the project was looking for "Materials" whereas the folder was named "materials"

watch out for case sensitive folders / file names
(it matters everywhere except Windows:-)

So does it work now?

Thank you so much! That was the problem but may I ask how did you manage to find this root cause? I am wiggling with this problem for like two weeks now tried so many things but you seem to locate the problem in a few hours? What is your method?

0 votes

There is an option to embed the pck file within the game. It means that the game hopefully won't crash due to missing resources.

by (72 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.