#Game's .exe does not open after the export

84 messages · Page 1 of 1 (latest)

signal gazelle
#

the game literally just open's for a brief moment and closes immediately and i don't understand why
when i launch the game in debug mode it briefly shows a red warning which i can't even read because te game closes too fast
I also have no errors while testing the game in the editor

#

managed to catch the error with a screenshot

signal gazelle
#

i still have no freaking clue what's wrong

onyx plover
#

the error says that your main scene failed to load a speciffic resource file. you can exclude resource files from export so it could be that one you needed misses.

#

my bad, it specifically states that it was unable to load the resource because it's missing the speciffic resource loader.
Although the path looks a bit weird. usually you just use uid:// instead of res://, not combine them both.
you can use the uid to check which file it tried to load using Methods of the ResourceUID-signleton.

signal gazelle
onyx plover
# signal gazelle could you explain what each of these mean i am guessing res is like game's folde...

the default way files are structured is using the project folder, where each file has a unique path. Files can be accessed that way using the res:// file system. But in that case if you move a file, every reference to that file would break. that's why godot internally uses Unique IDs to reference resources, so when a file gets moved, it can search for the file with the correct UID and update the path.
that string of "random" numbers is just the uid of the resource, kinda how Youtube URLs work. this is done so even though you could represent it more efficiently with an integer, both can be used with the same loading methods.

cunning vault
#

The same thing happens when I export to android

onyx plover
cunning vault
#

Yeah
But when I export to windows I works perfectly

signal gazelle
#

and i am trying to export to windows

#

and this occurs

signal gazelle
onyx plover
#

so the string would be uid://cpxkffy21a1yq

signal gazelle
#

it led me to my main menu
i removed it and now i have this

#

is there a way one could like.. actualize the path so it stops being an uid and gets a regular path

#

i feel like if i keep going with these errors i will delete the whole project

#

ye now it says the problem is my main scene

#

good lord

#

@onyx plover

#

how come it launches just fine in the editor but errors in the build

onyx plover
#

Was the menu your main scene? As in the one the game automatically loads at the start.

signal gazelle
onyx plover
#

I know of a couple file related reasons why a project wouldn't work on export.
For one load() and ResourceLoader.load() don't work on exported projects by default.
Also while file paths in windows aren't case sensitive, they are in Unix systems like linux, android, MacOS and IOS.
but neither of these point should be relevant to the main scene.

#

since you don't do anything aside from choosing the main scene, i'm also unsure what you personally could have done to cause the issue. Consequently i also don't know what you could do to fix it.

signal gazelle
#

i updated all the paths i used in code

#

i didn't know it would f things up

onyx plover
signal gazelle
#

pretty sure it won't

#

since i deleted main menu

#

it just changed the error

#

so probably all the scenes i have just won't work

#

because of that uid crap

#

because i moved them to a different folder

#

i also tried to export another project i worked on a while ago and it worked

#

so the problem really is the moved scenes folder

onyx plover
#

well to check if it's really because of uid you could create a new scene in the project and don't move it. then make it the main scene.

signal gazelle
#

i really don't feel like deleting the whole project and start from scratch for it to work

onyx plover
#

i read online that just opening and saving the scenes again in the editor should fix it. but that sounds a bit too easy to be true

signal gazelle
onyx plover
signal gazelle
onyx plover
onyx plover
#

i also just realised that you are using a beta of godot 4.4. of course that would be more bug-prone in general.

signal gazelle
signal gazelle
#

but they all give the same error

#

each corresponding to each one's uid id

onyx plover
#

yeah, you could try going into the file with a simple text editor and removing the uid="uid://..." line. that should force the editor to create a new one.

#

and could you maybe also send one of the main scenes that worked?

signal gazelle
onyx plover
#

i guess that was to be expected. but i then doubt that it's actually because of the uid.

#

which scene worked?

signal gazelle
onyx plover
signal gazelle
#

yes sec

signal gazelle
onyx plover
# signal gazelle here

okay i found a weird difference between those broken files and the one you sent me, as well as my own scenes that work properly.
the broken ones have this at the end of the file for some reason:

"
horizontal_alignment = 1

you could try removing those 2 lines and check if it works.

signal gazelle
onyx plover
#

welp

signal gazelle
#

it just gives new errors

onyx plover
#

yeah i also just now realised that it also isn't in the first broken scene you sent me. probably was just because the scene contained a label.
My bad

signal gazelle
#

welp happens

#

is there any place i can report this as a bug

#

so maybe it gets patched in the future

#

if it is actually engine's bug and not my stupidity

onyx plover
#

Even if it's not a bug it's definetly so unintuitive behaviour that it should be changed regardless.

signal gazelle
onyx plover
signal gazelle
#

i don't understand anything anymore

onyx plover
onyx plover