discord / gamesdk-and-dispatch

Public issue tracker for the Discord Game SDK and Dispatch
22 stars 7 forks source link

Windows x86 SDK Crash #34

Open HKunogi opened 4 years ago

HKunogi commented 4 years ago

Describe the bug When building an x86 (32 bit) application and referencing the discord sdk x86 version, it does crashes at startup when first accessing the DLL file, if the DLL file is removed from the project (making it to no be found to load), the software starts and works normally (without discord functionality of course). Using the x64 version and building the software also in x64 gives no problem, only happens with x86 (32 bits).

Steps to reproduce Steps to reproduce the behavior:

  1. Make an software that utilize the discord SDK.
  2. Import the discord SDK x86 (32 bits)
  3. Build your software in x86 (32 bits)
  4. Execute it, it will crash when referencing the DLL.

Expected behavior The x86 (32 bits) version of the SDK should work the same way as the x64 does, not crashing the software when referencing / loading the DLL.

Implementation specifics

shadowfox87 commented 4 years ago

This issue is still prevalent. The game sdk does not work in Windows x86. Hence, any Unity game that uses the game sdk won't work for x86.

msciotti commented 4 years ago

This is only true on the IL2CPP scripting backend and is a longstanding bug in Unity of IL2CPP not respecting the __CDECL calling convention.

We have a new build that changes the calling convention to use WinApi and changes some underlying Rust SDK logic to support it that seems to be working. I'm confirming it today and we can see if it works for everyone.

msciotti commented 4 years ago

@HKunogi @shadowfox87 if you could test this SDK

https://dl-game-sdk.discordapp.net/3.1.0/discord_game_sdk.zip

Let me know if it works.

shadowfox87 commented 4 years ago

It does work. I told you directly but forgot to comment here.