-
-
Notifications
You must be signed in to change notification settings - Fork 595
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
Test project builds fine but crashes when ran with official 4.0.alpha10 (both Windows and Linux) #768
Comments
Official Godot builds are compiled with MinGW, but you used MSVC to compile your extension. This may be the cause of the issue as the GNU and MSVC ABIs are incompatible with each other. |
I have the same problem on Linux with the official 4.0-alpha10 binaries, while a custom build from the same commit works fine. I've checked and even a custom build with I'll keep investigating, maybe it's related to the GCC version used. |
Likely related to godotengine/godot#61963 |
I reproduced this with Visual Studio 2022 and 4.0.alpha10.official. The issue disappeared when compiling Godot myself with VS2022 (from the alpha10 commitId), so @Calinou analysis is certainly proper in this case. I guess the official GDExtension documentation will need to touch on this: something along the line of "use MinGW if you did not compile Godot yourself" I guess? |
That's not good enough as this also affects Linux. |
Indeed, I was refering to my test case. It should have been "Draw attention
to a list of the compilers used for each platform official build".
Le dim. 26 juin 2022, 15:36, Gergely Sárosi ***@***.***> a
écrit :
… I guess the official GDExtension documentation will need to touch on this:
something along the line of "use MinGW if you did not compile Godot
yourself" I guess?
That's not good enough as this also affects Linux.
—
Reply to this email directly, view it on GitHub
<#768 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGGPMOFJ4IDZNLPWNCLW33VRBMEDANCNFSM5Y7GQKWQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@Calinou Isn't this issue contradicting with this tweet for example? Doesn't this mean that a unique compiler per platform (the one used to build the official releases) will be usable when willing to distribute compiled extensions? |
I'm getting this in the test project on Linux, definitely related to static methods. Removing them fixes the crash. |
Maybe the statics methods issue is not present on Windows then.
Le lun. 27 juin 2022, 14:21, Teodor Potancok ***@***.***> a
écrit :
… I'm getting this in the test project
<https://gist.github.com/pooroligarch/02f2f0e5d21470e214d7b2dc409396ff>
on Linux, definitely related to static methods. Removing them fixes the
crash.
—
Reply to this email directly, view it on GitHub
<#768 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGGPMNIIMWC56B2XYEWR6DVRGMF7ANCNFSM5Y7GQKWQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I don't think that's the case, the old WebRTC GDNative plugin was built with MSVC and was working with the official Godot version compiled with gcc/mingw |
If this is related to godotengine/godot#61963 then I think it could be about the What fixes the crash for me on Windows (MSVC) and macOS (Clang) is making sure the This is what I noticed by stepping in the debugger, not 100% sure as I don't fully understand GDExtensions, but it's still fun trying to track down the issue. I've pushed the small change in my branch if anyone wants to check if it fixes the issue. |
Your commit fixes it on Linux/GCC. You should make a PR and get it merged. |
I got the same result also on Linux/GCC. With @alessandrofama's patch I am able to Play the test project and press the "Click me!" button on the Anyway, I too agree that he should make a PR :) |
Fixed by #778. |
env:
vs2019
godot-alpha10-win64
win10-sdk (10.0.19041.0)
MSVC v142
Cmake 3.23.2
Python 3.9.6
try to clone the newest code as commonds:
git clone --recursive -b master https://github.com/godotengine/godot-cpp
cd .\godot-cpp
cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_SYSTEM_NAME=Windows .
cmake --build .
then build test demo with commonds:
cd .\test
cmake -DCMAKE_BUILD_TYPE=Release .
cmake --build .
then move and rename the .dll .exp .lib .pdb from bin to demo/bin
libgdexample.windows.debug.x86_64.dll
libgdexample.windows.debug.x86_64.exp
libgdexample.windows.debug.x86_64.lib
libgdexample.windows.debug.x86_64.pdb
then open godot :
Godot Engine v4.0.alpha10.official.4bbe7f0b9 - https://godotengine.org
Vulkan API 1.2.198 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce RTX 2080
Editing project: C:/Users/Administrator/Downloads/gdnative_cpp_example-master/godot-cpp/test/demo (C:::Users::Administrator::Downloads::gdnative_cpp_example-master::godot-cpp::test::demo)
Godot Engine v4.0.alpha10.official.4bbe7f0b9 - https://godotengine.org
ERROR: Condition "!windows.has(p_window)" is true.
at: window_resize (drivers/vulkan/vulkan_context.cpp:1404)
Vulkan API 1.2.198 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce RTX 2080
Constructor.
Destructor.
(crash)
The text was updated successfully, but these errors were encountered: