David20122 / sound-space-plus

Rhythm-based aim game
https://wiki.rhythia.net/
MIT License
129 stars 18 forks source link

Linux release crashes on Startup because of libdiscord-game-sdk-godot.so #18

Closed mycpphurts closed 1 year ago

mycpphurts commented 1 year ago

Tested on Archlinux, Kernel 6.3.9-arch1-1

libdiscord-game-sdk-godot.so causes the game to crash on Startup on the Linux build, a problem not seen in Windows. Running an LDD on the file shows it can't find the libdiscord_game_sdk.so dependency.

Results for ldd libdiscord-game-sdk-godot.so:

$ ldd libdiscord-game-sdk-godot.so
ldd: warning: you do not have execution permission for `./libdiscord-game-sdk-godot.so'
    linux-vdso.so.1 (0x00007fffd43e0000)
    libdiscord_game_sdk.so => not found
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f8270600000)
    libm.so.6 => /usr/lib/libm.so.6 (0x00007f8270913000)
    libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f82708ee000)
    libc.so.6 => /usr/lib/libc.so.6 (0x00007f8270416000)
    /usr/lib64/ld-linux-x86-64.so.2 (0x00007f8270d77000)

The libdiscord-game-sdk file seems to be searching for libdiscord_game_sdk.so, but in the discord_sdk.gdnlib files in addons/discord_game_sdk shows the dependency is named discord_game_sdk.so (View below)

https://github.com/krmeet/sound-space-plus/blob/c930b2bc7cd2e5ecc02f0f243a4c1addfd3d467e/addons/discord_game_sdk/discord_sdk.gdnlib#L18

Error log:

ERROR: Can't open dynamic library: addons/discord_game_sdk/libdiscord-game-sdk-godot.so. Error: libdiscord_game_sdk.so: cannot open shared object file: No such file or directory
   at: open_dynamic_library (drivers/unix/os_unix.cpp:418)
ERROR: No valid library handle, can't get symbol from GDNative object
   at: get_symbol (modules/gdnative/gdnative.cpp:510)
ERROR: No nativescript_init in "res://addons/discord_game_sdk/libdiscord-game-sdk-godot.so" found
   at: init_library (modules/gdnative/nativescript/nativescript.cpp:1503)
ERROR: Reference to a Thread object was lost while the thread is still running...
   at: ~_Thread (core/bind/core_bind.cpp:2802)
Neeko-iko commented 1 year ago

not saying you should have to do this, but as of the current release, renaming "discord_game_sdk.so" to "libdiscord_game_sdk.so" fixes the issue.

this should be handled next release if possible.

mycpphurts commented 1 year ago

I was gonna do a PR with the fix if my godot wanted to build the executable so I could test (which it didn't)

But pretty sure the source of the problem is mentioned on the first msg on the issue

mycpphurts commented 1 year ago

Won't be fixed after a PR was made. Had a talk with devs, will be fixed in rewrite (diff repo)

mycpphurts commented 1 year ago

Resolved (Thanks kerm)