rlabrecque / Steamworks.NET

Steamworks wrapper for Unity / C#
http://steamworks.github.io
MIT License
2.78k stars 366 forks source link

Crash in Wrapper at SteamAPI_InitSafe() #48

Closed Syvion closed 9 years ago

Syvion commented 9 years ago

Hey,

I am using Unity 5 64bit(pro) with Steamworks.NET (latest branch) and Steamworks SDK 1.33a I compile my project for Linux x86 (32bit) with the SteamManager.cs attached to an object in the first scene.

When downloading and installing the game through steam onto a Linux 32bit machine (in this case I tried Ubuntu 12.04 LTS 32bit and Ubuntu 14.04 32bit) the game will crash upon launch. The issue seems to be in the Steamworks.NativeMethods.SteamAPI_InitSafe().

When uploading a build without the SteamManager attached to anything ,the game launches fine.

Could this be fixed when not using the #define VERSION_SAFE_STEAM_API_INTERFACES ? (Steam.cs) (there is no way to test that, I would need the recompilled dll's without this safe define.)

Log: Stacktrace:

at (wrapper managed-to-native) Steamworks.NativeMethods.SteamAPI_InitSafe () <0x00004>
at (wrapper managed-to-native) Steamworks.NativeMethods.SteamAPI_InitSafe () <0x00004>
at Steamworks.SteamAPI.Init () [0x0001a] in C:\Projects\<game>\Code\<game>_Xbone\Assets\Plugins\Steamworks.NET\Steam.cs:58
at SteamManager.Awake () [0x0009b] in C:\Projects\<game>\Code\<game>_Xbone\Assets\<company>_Assets\Scripts\Steam\SteamManager.cs:92
at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <IL 0x0001c, 0x0008e>

Native stacktrace:

/home/simon/.steam/steam/steamapps/common/<game>/<game>_Data/Mono/x86/libmono.so(+0x8b743) [0xb58b8743]
[0xb76ffd34]
[0xb76ffd4c]
/lib/i386-linux-gnu/libc.so.6(gsignal+0x47) [0xb72c7607]
/lib/i386-linux-gnu/libc.so.6(abort+0x143) [0xb72caa33]
/lib/i386-linux-gnu/libc.so.6(+0x68e53) [0xb7301e53]
/lib/i386-linux-gnu/libc.so.6(+0x7333a) [0xb730c33a]
/lib/i386-linux-gnu/libc.so.6(+0x73fad) [0xb730cfad]
/home/simon/.steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6(_ZdlPv+0x1f) [0xb71f8a4f]
/home/simon/.steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6(_ZNSs4_Rep10_M_destroyERKSaIcE+0x1b) [0xb725d55b]
/home/simon/.steam/ubuntu12_32/libsteam.so(+0x6f6b4) [0xa59d26b4]
/home/simon/.steam/ubuntu12_32/libsteam.so(+0xd21a8) [0xa5a351a8]
/home/simon/.steam/ubuntu12_32/libsteam.so(+0x28735a) [0xa5bea35a]
/home/simon/.steam/ubuntu12_32/libsteam.so(+0x1c537) [0xa597f537]
/lib/ld-linux.so.2(+0xed37) [0xb7710d37]
rlabrecque commented 9 years ago

Hey @Syvion, What version of Unity are you using? This looks like something that they fixed in 5.0.1 under "Linux: Fixed the issue which was causing crash with native plugins using STL types."

Syvion commented 9 years ago

Hey @rlabrecque, Thank you for the reply.

We are currently on Unity 5.0.0f4 but we are planning on upgrading to the latest (supported) 5.0.1 branch when possible. I have thought that it might be a Unity 5.0.0 issue but unfortunately , I did not have a chance/possibility to test if it was fixed with Unity 5.0.1 due to other project dependencies. I'll see if I can get my hands on a machine where it is possible to upgrade and I'll update this with further information.

Kind Regards,

Syvion commented 9 years ago

Hey, @rlabrecque

Sorry for the late reply on this issue. Due to a very very busy schedule I lost track that I had this issue open. I wanted to verify that updating to unity 5.0.1 fixed the issue with Linux 32bit.

Kind Regards,