godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.26k stars 21.22k forks source link

Godot export release doesn't pack enough data from C# #99208

Open nongvantinh opened 6 days ago

nongvantinh commented 6 days ago

Tested versions

Godot 4.4.dev4.mono

System information

Ubuntu 24.04

Issue description

I'm exporting a project using Docker, which invokes Godot through the terminal with the following command:

godot.4.4.dev4.mono "path-to-my-project.godot" --export-release "Headless" --headless --quit

However, when I run the app, it doesn't behave as expected

Steps to reproduce

Reproduce via UI:

  1. Open the MRP project and create the export folder.
  2. Export the project with the "Export All" -> "Release" option.
    • Alternatively, click "Export Project..." and uncheck the "Export with Debug" option.

Reproduce via command line:

Run the following command:

./Godot_v4.4-dev_mono_linux.x86_64 "/home/ubuntu/GodotProjects/azheir/azheir/project.godot" --headless --export-release Headless --quit

Minimal reproduction project (MRP)

azheir.zip

To verify if the project export was successful, simply run the executable. It should print Hello world on startup.

fire commented 6 days ago

Try using the --headless option.

nongvantinh commented 6 days ago

Yeah, that's what I did, and it's not working. I have a full-time job to keep, and my app still needs refinement before deploying it to the cloud, so I don't have time to look at the code. The point is, the export project should not have this kind of inconsistency. Both the UI and the terminal should invoke the same function.

fire commented 6 days ago

I haven't thoroughly investigated this due to a lack of funding, but suspicious optimizations in the dummy rendering server that zeroed the texture in the past have broken things.

nongvantinh commented 5 days ago

I confirm that adding the --headless option or removing it doesn't make any difference regardless of the platform. Therefore, exporting through the UI has a different workflow, and exporting through the terminal has a different workflow.

The two command below yield the same bug with the binary:

 ./Godot_v4.4-dev_mono_winx86_64.exe "/d/GodotProjects/azheir/azheir/project.godot" --export-release Headless --quit
 ./Godot_v4.4-dev_mono_winx86_64.exe "/d/GodotProjects/azheir/azheir/project.godot" --headless --export-release Headless --quit
fire commented 5 days ago

If you can provide a minimal sample, it would help us debug the most; if not, a non-minimal sample would work, too, but people value their project's privacy.

nongvantinh commented 5 days ago

While narrowing down the project for easier troubleshooting, I accidentally realized that this bug occurs with both the UI and command line --export-release.

I have uploaded the minimal reproduction project and the steps to reproduce the issue. Please take a look when you have time.

raulsntos commented 3 days ago

I may be misunderstanding the issue, but you are making a Release export and your "Hello world" print is surrounded by #if DEBUG so naturally it won't be included in a Release build. Maybe you meant to use --export-debug.