Use template_release on linux to fix a crash with release exports#43
Conversation
|
Thanks for catching this! If I remember correctly, the only reason I even have the CI build Is the issue caused by loading a I'd say, let's take it opportunity and do it proper for all platforms! |
| @@ -48,6 +48,21 @@ jobs: | |||
| ] | |||
| target-type: [template_debug] | |||
There was a problem hiding this comment.
| target-type: [template_debug] | |
| target-type: [template_release, template_debug] |
| # Only build template_release on linux. release mode template exports can't use | ||
| # template_debug on linux but can on other platforms. | ||
| include: | ||
| - target: | ||
| platform: linux | ||
| arch: x86_64 | ||
| os: ubuntu-22.04 | ||
| target-type: template_release | ||
| float-precision: single | ||
| - target: | ||
| platform: linux | ||
| arch: arm64 | ||
| os: ubuntu-22.04-arm | ||
| target-type: template_release | ||
| float-precision: single |
There was a problem hiding this comment.
| # Only build template_release on linux. release mode template exports can't use | |
| # template_debug on linux but can on other platforms. | |
| include: | |
| - target: | |
| platform: linux | |
| arch: x86_64 | |
| os: ubuntu-22.04 | |
| target-type: template_release | |
| float-precision: single | |
| - target: | |
| platform: linux | |
| arch: arm64 | |
| os: ubuntu-22.04-arm | |
| target-type: template_release | |
| float-precision: single |
There was a problem hiding this comment.
This would be covered by adding template_release to the matrix. Results in template_release and template_debug being built for all platforms.
| windows.x86_64.single = "bin/windows/libgodot-ndi.windows.template_debug.x86_64.dll" | ||
| macos.single = "bin/macos/libgodot-ndi.macos.template_debug.universal.dylib" |
There was a problem hiding this comment.
| windows.x86_64.single = "bin/windows/libgodot-ndi.windows.template_debug.x86_64.dll" | |
| macos.single = "bin/macos/libgodot-ndi.macos.template_debug.universal.dylib" | |
| windows.x86_64.single.debug = "bin/windows/libgodot-ndi.windows.template_debug.x86_64.dll" | |
| windows.x86_64.single.release = "bin/windows/libgodot-ndi.windows.template_release.x86_64.dll" | |
| macos.single.debug = "bin/macos/libgodot-ndi.macos.template_debug.universal.dylib" | |
| macos.single.release = "bin/macos/libgodot-ndi.macos.template_release.universal.dylib" |
|
My understanding is that the issue is caused by loading a target_debug binary with a release export on linux. The .so file seems to be found when executing the export but it then crashes. My changes were targeted to linux only because I assumed you would want to leave the other platforms as is but I agree that the changes you have proposed are more straightforward. I'll update my PR later today ! |
Fixes issue this issue #42
Modifies the
.gdextensionfile to usetemplate_releasewhen exporting a project in release mode on linux.Also adds linux
template_releasebuilds to the CI.The sample app now displays an image in release mode before crashing. It also crashes in debug mode so I think its a separate issue.