godot-rapier-2d icon indicating copy to clipboard operation
godot-rapier-2d copied to clipboard

Godot 4.3 export freeze with godot-rapier in github actions.

Open 949886 opened this issue 1 year ago • 16 comments

Describe the bug

image

Export freeze with godot-rapier in GitHub actions. This issue only exists in Godot 4.3, it works fine with Godot 4.2.2.

To Reproduce

  1. Frok test project with all branches.
  2. Enable GitHub actions.
  3. Check out the rapier-test branch and make a push.
  4. Wait for the building of actions.

Expected behavior

Build successfully.

Environment:

  • OS: Ubuntu (Github Actions)
  • Version: latest
  • Godot Version: 4.3

949886 avatar Oct 18 '24 13:10 949886

Locally what is the logs? Does it also hang locally? It fails at runtime? Or at build time?

Ughuuu avatar Oct 18 '24 14:10 Ughuuu

Locally what is the logs? Does it also hang locally? It fails at runtime? Or at build time?

No, it does not hang locally in Windows. It only appears in GitHub actions with Godot 4.3.

949886 avatar Oct 19 '24 03:10 949886

Strange. Not sure how to debug this.

Ughuuu avatar Oct 19 '24 11:10 Ughuuu

When you run a headless --import for the first time ther is this error. If you cancel it and run again it will work. But I'm not sure how to detect its hanging

depmots avatar Oct 22 '24 19:10 depmots

But this is only related to godot rapier plugin? If you can run locally and print a trace at a time and see what all threads are doing, idk.

Ughuuu avatar Oct 22 '24 19:10 Ughuuu

I was also having this issue - albeit using gitlab instead of github.

After some experimentation I was able to get this to work by including .godot/extension_list.cfg in the repo on my local machine. I also have the imported folder because of other CI issues.

Here is my .gitignore in case it helps anyone.

.godot/*
!.godot/imported
!.godot/extension_list.cfg

JonBoyleCoding avatar Nov 11 '24 20:11 JonBoyleCoding

Interesting. What does that file do, skip the import process?

Ughuuu avatar Nov 11 '24 20:11 Ughuuu

The extensions_list.cfg I believe lists the native gdextentions that have been enabled. I don't know why this causes a freeze in CIs (I didn't check whether it was specifically headless mode) on export, or crash if loading the editor in headless mode to generated all the imported content.

The .godot/imported folder contains a lot of metadata about imported media files (sound/images) as well as other things - this means that all the errors that require godot editor to be opened first before being used for export are fixed. I also found it was necessary for dialogic last year to properly work with CIs on export, don't know if it's still necessary though.

JonBoyleCoding avatar Nov 11 '24 23:11 JonBoyleCoding

It's possible this is a godot bug then? Since both this addon and that one had this issue. You tried opening an issue on godot side also?

Ughuuu avatar Nov 12 '24 09:11 Ughuuu

I haven't put anything on the godot side - largely in terms of 'solving' the problem it's an issue with standard .gitignore files rather than the engine itself. The standard .gitignore also excludes the export templates which is required for CIs so either way you have to have a custom one.

I've had issues ignored in the past with regards to git issues so I haven't been motivated to post again (although granted that issue was eventually resolved a few years later with changes to how the whole animation system works, although I think no-one went back to comment/close the issue...).

I think for here now at least though perhaps it would be best to just put something in the readme for CI usage. Probably only need the extensions_list.cfg and not the imported folder - but I haven't tested it specifically.

JonBoyleCoding avatar Nov 12 '24 22:11 JonBoyleCoding

I just started getting this issue after adding rapier to my project, had a Github action run for 6 hours while I was away, whoops ^^

For me it happens locally as well and I got the package through github so not sure the trick with extension file applies. I'm using Chickensoft's game template, and can reproduce it by just grabbing that fresh and adding rapier to the project, the 3d single simd parallel variant is what I've been using.

Waksra avatar Nov 27 '24 22:11 Waksra

Interesting. Can you say more about what pc specs, os, versions of stuff, etc. Can you reproduce the issue in godot debug mode? If not can you still attach a gdb and pause when it hangs and see where it stops?

Ughuuu avatar Nov 27 '24 22:11 Ughuuu

When this is implemented: https://github.com/appsinacup/godot-rapier-physics/issues/313 I hope this won't be a problem anymore.

Ughuuu avatar Nov 28 '24 15:11 Ughuuu

Sorry for the late reply, been away from the computer ^^

I'm on Windows 11 running a Ryzen 9 9900X, 64GB's of ram and a RX 7900 XTX. Not sure how to attach a debugger but happy to try if you can point me the right way, I'm just running the command in the terminal.

Like above it does always hang on "Initialize godot-rust", which is a step not present if I run it without godot-rapier in the project.

Waksra avatar Nov 28 '24 20:11 Waksra

I see, i'll check the godot source code see where that Initialize godot-rust happens.

Ughuuu avatar Nov 29 '24 09:11 Ughuuu

Sorry for the late reply, been away from the computer ^^

I'm on Windows 11 running a Ryzen 9 9900X, 64GB's of ram and a RX 7900 XTX. Not sure how to attach a debugger but happy to try if you can point me the right way, I'm just running the command in the terminal.

Like above it does always hang on "Initialize godot-rust", which is a step not present if I run it without godot-rapier in the project.

Sorry, forgot to answer about the debugger thing, tho it's probably not going to be easy if you don't know how to do it already. Also, if it hangs during release build, it won't give much info, so we would most likely need a debug build of both godot and rapier for this to work. Again tho, I would wait for this to become a module, and hoping this whole flow won't happen anymore(eg. registering of addon through dll)

Ughuuu avatar Jan 01 '25 11:01 Ughuuu

There isn't much I can do to fix this (nor reproduce it locally). However, now I am able to build it as a module, will offer a fork option soon-ish.

Ughuuu avatar Oct 05 '25 10:10 Ughuuu