Skip to content
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

-s flag fails in tools=no builds without project #17778

Open
Tracked by #51393
leonkrause opened this issue Mar 26, 2018 · 1 comment
Open
Tracked by #51393

-s flag fails in tools=no builds without project #17778

leonkrause opened this issue Mar 26, 2018 · 1 comment

Comments

@leonkrause
Copy link
Contributor

leonkrause commented Mar 26, 2018

Godot version:
Tried 3.0.2 and 928cdb4

OS/device including version:
Tried HTML5 and Windows

Issue description:
Attempted to run godot -s script.gd with godot being a template executable (tools=no).
Neither the working directory, nor any of its parents, contain a project. No project is specified on the command line.
Expected script.gd to run as main loop with default values used for project settings.
Instead exited right away after logging the following:

Error: Could not load game path '.'.
**ERROR**: Condition ' !_start_success ' is true. returned: false

Source:

ERR_FAIL_COND_V(!_start_success, false);

Steps to reproduce:
Run godot -s script.gd with godot being a template executable.

Minimal reproduction project:

extends MainLoop

func _iteration(dt):
    OS.alert('Success: main loop script is running')
    return true
@leonkrause leonkrause added this to the 3.1 milestone Mar 26, 2018
@leonkrause leonkrause changed the title -s flag fails in tools=no builds -s flag fails in tools=no builds without project Jun 14, 2018
@akien-mga akien-mga assigned akien-mga and unassigned hpvb Jan 22, 2019
@akien-mga akien-mga modified the milestones: 3.1, 3.2 Jan 22, 2019
@akien-mga akien-mga modified the milestones: 3.2, 4.0 Dec 14, 2019
@Xrayez
Copy link
Contributor

Xrayez commented Sep 2, 2020

While working on #41190, I suspect the issue may be in ClassDB::can_instance() method which behaves differently in exported projects.

If someone wants to workaround this currently, you may as well consider using the feature added in #41190 because it would work even in export templates, unless you need to supply different main loop scripts of course.

@YuriSizov YuriSizov removed this from the 4.0 milestone Feb 23, 2023
@YuriSizov YuriSizov added discussion and removed bug labels Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants