godot icon indicating copy to clipboard operation
godot copied to clipboard

Godot runs the game when exporting.

Open CarpenterBlue opened this issue 1 year ago • 10 comments

Tested versions

v4.4.dev2.official [97ef3c837] But it happens in 4.3 too

System information

Godot v4.4.dev2 - Windows 10.0.19045 - OpenGL 3 (Compatibility) - NVIDIA GeForce GTX 960 (NVIDIA; 32.0.15.5612) - Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (8 Threads)

Issue description

Godot runs the game when I export. Happens on all buttons, debug / no debug. Compatibility, Forward+ and Mobile.

Steps to reproduce

  1. In the export menu under Application, turn on Modify Resources
  2. Export

(I don't have rcedit set up)

image

https://github.com/user-attachments/assets/e672c32a-b337-4366-8e99-7855ac12d22f

Minimal reproduction project (MRP)

mrp.zip

CarpenterBlue avatar Sep 16 '24 17:09 CarpenterBlue

Can't confirm with Windows 11 at 4.4.dev [a75bacebe], with templates built from that same version

AThousandShips avatar Sep 16 '24 17:09 AThousandShips

What else can I do to help with this? It started happening in 4.3 stable in my main project and I have no idea what was the cause.

CarpenterBlue avatar Sep 16 '24 18:09 CarpenterBlue

Some more details would be necessary, does it happen if you build your own templates? Or your own editor? Because with the steps here it just isn't enough to confirm it as it doesn't happen for me at least

AThousandShips avatar Sep 16 '24 18:09 AThousandShips

I figured out more steps. I will update the issue in a sec. Here is a video for now.

https://github.com/user-attachments/assets/b3a3b0ca-7152-4fa3-94ba-96484c557ddc

CarpenterBlue avatar Sep 16 '24 18:09 CarpenterBlue

You need an empty line before your link for it to show up as a video

AThousandShips avatar Sep 16 '24 18:09 AThousandShips

Can you run Godot from a terminal using the _console.exe wrapper, and check what errors may be printed to the output when the issue happens?

This sounds like a typical Windows file I/O issue where some files are locked and thus cannot be read, and thus the command passed to Godot fails and it falls back to something else. It used to be that it would open the project in the editor IIRC and not run it, but maybe it's different for --export* (it might not imply --editor).

akien-mga avatar Sep 17 '24 08:09 akien-mga

I figured out more steps.

What's the value of your export/windows/rcedit editor setting? If it's doing it only when Modify resources is enabled, it's likely related to rcedit command. Also, what's your app name in the Project Settings.

bruvzg avatar Sep 17 '24 09:09 bruvzg

@akien-mga

Here is the screencap of the relevant part from the console. I ran it with "--verbose" through windows shortcut. image The thing is, I have never enabled RCEDIT in 4.0++, it was always unset. Pretty sure this is enabled by default. Last time I used it was in 3.x and since then I am no longer using portable Godot ( the sc file) where it was last set.

@bruvzg A) RCEDIT is unset but I do have it on my machine, it just wasn't used in 4.0++ pretty sure Godot had the "Modify Resources" on enable by default. It wasn't problem prior 4.3 too. image

B) Name of the thing is image

BTW, since yesterday, it started running TWICE upon export, twice as much fun. Here is video, showcases everything, the name, the unset RCEDIT (again I am pretty sure I didn't click "Modify Resources" again in 4.0++

https://github.com/user-attachments/assets/698aef8f-d023-41a8-a197-089b84ad4a99

CarpenterBlue avatar Sep 17 '24 16:09 CarpenterBlue

I also have this issue in my one project when I try to export to windows. It was an android specific project but when I tried to export it for windows it ran the app first (sometimes even twice). This project uses gradle build and has android plugins enabled, autoload scripts too. I am also using custom android export template with many modules disabled.

And I don't think rcedit is the issue here, because it is also not setup in other projects and those are exporting without any problem.

I am currently trying to reproduce this in a demo project.

syntaxerror247 avatar Oct 04 '24 09:10 syntaxerror247

@bruvzg I think the problem is related to save location. I was trying to reproduce this error in my demo project and i noticed that this problem only occured if i export to some longer location (I don't have a better word). Let's say my project Demo is in this directory [user_folder]/Documents/Godot 4/ and i try to save in [user_folder]/Documents/Godot4, it will export without problem. BUT if I try to export in [user_folder]/Documents/or [user_folder]/Desktop/ or [user_folder]/ it will run my app (sometimes twice) before exporting.

I hope all steps are clear. I tried my best to explain :)

syntaxerror247 avatar Oct 04 '24 09:10 syntaxerror247

I'm also seeing this issue on 4.4-dev6

I was able to work around the issue by exporting to a directory under the project's path. For instance export/game.exe. Previously, when the problem was happening, I was exporting to ../../../temp/export/game.exe.

I suspect that the issue is related to path resolution creating multiple parameters to a command line invocation. Whenever the problem happens, Godot ends up launching multiple things from the command line (instead of just the build process), including the game executable itself.

danielglx avatar Dec 09 '24 23:12 danielglx

cc @AThousandShips

Can't replicate in v4.4.1 stable. I attempted paths with spaces, paths outside the project directory, and paths that exceed the Windows 260 max char limit. I also tried to place the project files on each of these scenarios too, to no avail.

If you can still replicate this on the latest stable, can you share the exact path you're using to export the project to, as well as the path where the project is currently?

Also, if you cannot replicate this earlier than v4.3, can you try to pinpoint the exact version that introduced this bug (including dev/betas)?

rsubtil avatar Apr 24 '25 11:04 rsubtil

There was no further update and contributors couldn't reproduce it in 4.4.1.stable or later, so closing as probably fixed.

akien-mga avatar Oct 28 '25 08:10 akien-mga