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

Exporting in 4.3 RC2 using CLI headless mode without a .godot folder freezes the build #95287

Closed
fatduckling opened this issue Aug 8, 2024 · 9 comments

Comments

@fatduckling
Copy link

fatduckling commented Aug 8, 2024

Tested versions

  • Reproducible in v4.3.rc2.official [3978628]
  • Not reproducible in v4.2.2 official

System information

Ubuntu 20.04.6 LTS

Issue description

Hi team,

I've been using Godot 4.2 for a while now and am recently trying out 4.3 RC2 to port my project over.

I'm having trouble with my automated build machine pipeline when exporting my game.

In Godot 4.2, when exporting my the game using the command line, I'd run this command:

$GODOT_ROOT/godot --verbose --headless --path $WORKING_DIR/ravageous/game --export-release Release_Linux_x86_64 $outFolder/ravageous

This works fine in 4.2. Even though I don't commit the .godot folder, running that above command would re-generate that folder.

However, in Godot 4.3, the build is stuck.

root@8a0c47065a83:/tmp# $GODOT_ROOT/godot --headless --path $WORKING_DIR/ravageous/game --export-release Release_Linux_x86_64 $outFolder/ravageous
libfontconfig.so.1: cannot open shared object file: No such file or directory
Godot Engine v4.3.rc2.official.3978628c6 - https://godotengine.org
(stuck)

It may be related to how re-generating the .godot folder is done using the headless mode.

In Godot 4.2, the below command would re-create the .godot and the process would exit gracefully.

godot --editor --path $WORKING_DIR/ravageous/game  --headless --quit

If I run the same command in 4.3.rc2.official, it creates the .godot folder, but it doesn't terminate (even though I have the --quit argument). I think it just has the editor window open in the background in the build server, which is why exporting is stuck.

If I export the game in 4.3 with the .godot folder, the export is successful.

Steps to reproduce

  • Create an empty/basic project in Godot 4.3 RC2.
  • Using the CLI, export the game using the headless mode.
    Sample command:
$GODOT_ROOT/godot --verbose --headless --path $WORKING_DIR/ravageous/game --export-release Release_Linux_x86_64 $outFolder/ravageous
  • The same command in 4.2 works fine.

Minimal reproduction project (MRP)

Any empty/basic project created in Godot would be fine

@fatduckling fatduckling changed the title Exporting in 4.3 RC2 using CLI using headless mode without a .godot folder freezes the build Exporting in 4.3 RC2 using CLI headless mode without a .godot folder freezes the build Aug 8, 2024
@Calinou
Copy link
Member

Calinou commented Aug 8, 2024

@Hilderin
Copy link
Contributor

Hilderin commented Aug 9, 2024

My guess from the error message "No such file or directory" is the problem were caused by the global class name file missing when no gdscript are present in the project. This has been fixed with #94991 and has been merged for 4.3 rc3.

@fatduckling
Copy link
Author

Hi. I'll try this in RC3 tonight. Thanks

@akien-mga
Copy link
Member

akien-mga commented Aug 9, 2024

I can't reproduce the issue with 4.3.rc2. I tried with a fully empty project (refuses to export), one with just export presets configured (refuses to export since there's no content), adding just a main Node2D scene (exports fine), adding a GDScript (exports fine).

Could you provide a reproduction project?

My guess from the error message "No such file or directory" is the problem were caused by the global class name file missing when no gdscript are present in the project.

The error is libfontconfig.so.1: cannot open shared object file: No such file or directory and relates to the editor itself dynamically loading libfontconfig from the OS, which couldn't be found. That means that system fonts won't work, but it shouldn't prevent exporting so it's likely unrelated to the issue at hand.

@fatduckling
Copy link
Author

fatduckling commented Aug 9, 2024

Hi @akien-mga
I think I found the root cause.
So it turns out, it's not related to upgrading from 4.2 to 4.3, but rather, after upgrading to 4.3, I also installed the Jolt addon.

So now, when I delete the .godot folder and run

/home/saleem/software/godot/godot --headless --editor --path /home/saleem/CLionProjects/ravageous/game --quit

It freezes. But when I remove the --headless and --quit argument (so the GUI is opened), I get a warning box: 'Some extensions need the editor to restart to take effect`
image

I think that's why when I run with --headless on the first time it gets stuck - because it's waiting for me to press the 'Continue' or 'Restart' button.

If I leave it running for like 10 seconds (so we give enough time for the .godot folder to be created), and then kill the process, and re-run it with --headless again, it works because the editor is restarted.

I'm not sure if the issue is present with 4.2 because I didn't have the Jolt addon installed there. I can try it if you want?

Anyway, this ticket can be closed.

But ideally, a warning message should come up when running in headless mode if it needs to be restarted. I can raise an issue if you want? Or is there a better way to reimport the project in 4.3?

Thanks

@Hilderin
Copy link
Contributor

Hilderin commented Aug 9, 2024

Great news! Thanks for testing.

For your information, there's a PR to fix this problem this Jolt (and any other GDExtensions) that should be merged for the next Godot version that will fix the need to restart the editor on first start: #93972

@akien-mga akien-mga modified the milestones: 4.3, 4.4 Aug 9, 2024
@snoopdouglas
Copy link
Contributor

For the record, I've just run into this problem, on 4.3, when .godot is timestamped identically to the rest of the files in the project.

In my case, this'd happened because I'd just duplicated the entire project using cp -r. Using cp -a instead (which preserves timestamps) fixed this, and Godot ran the export fine.

@akien-mga
Copy link
Member

This issue was fixed by #93972 already.

@snoopdouglas Are you using GDExtensions? If yes, your issue might be fixed too. If not, this is likely a separate bug that should have its own bug report with a reproduction project.

@snoopdouglas
Copy link
Contributor

@akien-mga Ah right, no GDExtension - will open a new issue.

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