Export to Windows Desktop (Runnable) seems to be missing stuff

NahwellNahwell Posts: 5Member

Hi all,

I am in my humble beginnings with Godot and I am having trouble exporting my game. These are the facts I gathered so far on the problem:
- The export is "Windows Desktop (Runnable)"
- I am setting Export Mode: Export all resources in the project
- If I export to the project folder, everything works OK. The export process writes 2 files, an .exe and a .pck.
- If I export to a blank folder, when I run the game, the main scene loads up correctly, but whenever I try to move to another scene, I am getting the following error:

ERROR: load_interactive: Condition ' err != OK ' is true. returned: Ref<ResourceInteractiveLoader>()
   At: scene/resources/scene_format_text.cpp:1225
ERROR: Failed loading resource: res://Scenes/OptionsMenu/options.tscn
   At: core/io/resource_loader.cpp:186
ERROR: Error loading resource: 'res://Scenes/OptionsMenu/options.tscn'
   At: core/bind/core_bind.cpp:79
SCRIPT ERROR: _deferred_goto_scene: Attempt to call function 'instance' in base 'null instance' on a null instance.
          At: res://Scenes/Director.gdc:30

Since it runs fine when I export to the project folder, I am assuming there is something missing from the export?

Thanks for any help you can give me :)

Tagged:

Tags :

Answers

  • Ace DragonAce Dragon Posts: 238Member

    How does your file structure look?

    When you created the project in the Godot project list, did you tell the engine to create it in a folder made just for the game?

    If you have a typical project structure (ie. the .project file in the top level of the game-specific folder and the resources/assers in subfolders), there shouldn't be a problem.

  • NahwellNahwell Posts: 5Member

    When I export to a separate (empty) folder, it throws that error.
    This is how the project folder looks like:

    And this is what the export folder looks like after export:

    If I don't get a solution to this, I'll copy the entire project folder along with the exported .exe and .pck, and start deleting project files until I hit the error... just to find out what files are not being included in the .pck

    I am starting to think this might be a bug related to having scenes within a subfolder and not in the root/main project folder?

  • TwistedTwiglegTwistedTwigleg Posts: 1,049Admin

    You said the problem only occurs when changing scenes, correct? Do you mind sharing the code you are using for loading/changing scenes? Maybe something there is causing the issue.

  • NahwellNahwell Posts: 5Member

    Sure thing, here is the compressed project folder.
    Thanks for helping me sort this out!

  • TwistedTwiglegTwistedTwigleg Posts: 1,049Admin
    Answer ✓

    I found the issue! It turns out the issue was just a minor typo. In ButtonOptions.gd, on line 9, change the code from: get_node("/root/Director").goto_scene("res://Scenes/OptionsMenu/options.tscn") to get_node("/root/Director").goto_scene("res://Scenes/OptionsMenu/Options.tscn") and then it will work.

    The issue is that in the path you have the name of the scene in lowercase, while the scene file is uppercase. So changing it from options.tscn to Options.tscn in the code fixes the problem. :smile:

    I have to admit, this took me awhile to find simply because it only crashed in the exported version. I guess in the editor it loads files regardless of the capitalization, so to the editor options and Options apparently look the same when loading scenes, but not for the exported version. I'm pretty sure this is a bug, though I have no idea if it has already been fixed in Godot 3.1 or not.

    I had to poke around the source code where the issue was reported to find out that the Godot code that was causing the crash was related to the resource path itself. From there I just had to do check the path against the "copy path" option when you right click the scene in the file browser.

    I think changing options to Options should fix the issue, as that is what made the scene work when I was testing.

  • NahwellNahwell Posts: 5Member

    Awesome Twisted, that did the trick! - Thanks for being so thorough in investigating this issue!!. I am using Godot's Steam version, which right now is 3.0.6 FYI in case you would like to submit a bug.

    Thanks again!

  • TwistedTwiglegTwistedTwigleg Posts: 1,049Admin

    Great! I'm glad that fixed the issue! :smile:

    As for the Godot bug, it appears someone else has already reported it and make a GitHub issue. I chimed in mentioning that I have also encountered the issue, and linked to this post in case they want to take a look.

Sign In or Register to comment.