Skip to content
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

Discord SDK crash: discord_game_sdk!rust_eh_personality #1385

Closed
Dutchman101 opened this issue Apr 14, 2020 · 3 comments
Closed

Discord SDK crash: discord_game_sdk!rust_eh_personality #1385

Dutchman101 opened this issue Apr 14, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@Dutchman101
Copy link
Member

Dutchman101 commented Apr 14, 2020

Describe the bug
According to crash stats, a new Discord SDK crash is top #2 crash in MTA on the latest nightlies.
These nightlies are really not widely distributed yet, so this is very worrying.

Dumptrace:
Loading Dump File [client_1.5.7-release-20506.0.000_discordgamesdk_002f0b00_7363_CPxMb_00000000_56D9_FFF_4CA41_20200411_0536.dmp]

CONTEXT:  (.ecxr)
eax=0462fb08 ebx=0462fbbc ecx=00000003 edx=00000000 esi=662f3474 edi=66320b00
eip=75d44192 esp=0462fb08 ebp=0462fb64 iopl=0         nv up ei pl nz ac po nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000212
KERNELBASE!RaiseException+0x62:
75d44192 8b4c2454        mov     ecx,dword ptr [esp+54h] ss:002b:0462fb5c=00a412dc
Resetting default scope

EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 75d44192 (KERNELBASE!RaiseException+0x00000062)
   ExceptionCode: e06d7363 (C++ EH exception)
  ExceptionFlags: 00000001
NumberParameters: 3
   Parameter[0]: 19930520
   Parameter[1]: 0462fbbc
   Parameter[2]: 66320b00

PROCESS_NAME:  gta_sa.exe

ERROR_CODE: (NTSTATUS) 0xe06d7363 - <Unable to get error code text>

EXCEPTION_CODE_STR:  e06d7363

EXCEPTION_PARAMETER1:  19930520

EXCEPTION_PARAMETER2:  0462fbbc

EXCEPTION_PARAMETER3:  66320b00

STACK_TEXT:  
0462fb64 662955da e06d7363 00000001 00000003 KERNELBASE!RaiseException+0x62
WARNING: Stack unwind information not available. Following frames may be wrong.
0462fba8 66272c6d 0462fbbc 66320b00 00000014 discord_game_sdk!rust_eh_personality+0x2295a
0462fbd4 6626e44d 0462fbe4 069e98b8 0462fc6c discord_game_sdk!DiscordVersion+0x2128fd
0462fc08 6626e32b 0462fc6c 662ede28 0462fc70 discord_game_sdk!DiscordVersion+0x20e0dd
00000000 00000000 00000000 00000000 00000000 discord_game_sdk!DiscordVersion+0x20dfbb


SYMBOL_NAME:  discord_game_sdk!rust_eh_personality+2295a

IMAGE_NAME:  discord_game_sdk.dll

FAILURE_BUCKET_ID:  CPP_EXCEPTION_e06d7363_discord_game_sdk.dll!rust_eh_personality

OS_VERSION:  10.0.18362.1

To reproduce
Unknown (per issue description about crash stats).

Besides that, unfortunately dumps for this crash are never complete (e.g 'Extra info' that we collect isn't included, such as memory usage when it crashed). It is possible that there was no memory available to capture that on time. Read "Additional context" down below for more notes on memory/allocations.

Version
Build r20462 (850c76d) and up

It seems to have been present since the very start of adding Discord integration. See below:
crash3

The low count contrast with some entries is due to lower build distribution on those nightlies.

Additional context
If we speculate on these stats (global crash stats, of any module, on r20506 which has a 1.1% share in MTA userbase):
stats

Then we can expect the crash count running into tens of thousands, once the builds get distributed beyond nightlies.

We have enough 0xE06D7363 (usually memory or allocation related) crashes on MTA already, so that would be really bad. If memory related at all, it's probably a result of a mem leak in the Discord integration itself, since it's new and doesn't come in the place of another existing one.

I already put question marks on overall Discord integration stability in the recent past, and likened it to how unstable CEF was in the beginning, making MTA unstable. I also expect other crashes on core.dll to be Discord SDK related, like was in my original remark. But not to discuss that here, we might need a separate issue to keep track of these problems in 1 place.

quoting @0x416c69:

I have wrote my discord integration in such a way that it is totally easy to switch back to discord-rpc so just say the words, we'll get rid of trash from MTA repo in an instant.

Due to issue #1370 this crash might disappear once we migrated (if it was in the Discord SDK or related to how MTA integrated Discord SDK), but not if the problem is located in a part of the integration that will persist (which is very likely due to the above quote), it's important to keep track of this problem and make sure it's resolved even on discord-rpc.

I also have doubts on whether or not having this while still on Discord SDK is acceptable; the ETA for discord-rpc migration is MTA 1.6 (see #1370 (comment) and having an unstable nightly for a few months sounds like a bad idea. Maybe reverting Discord SDK entirely and waiting for discord-rpc to complete is a better idea, we will be freed of licensing conflicts and can have a fresh look on the stability issues once migrated.

Note: I am only speculating it's memory or allocation related, but it crashes in discord_game_sdk!rust_eh_personality+0x2295a and I am unable to investigate it, so disregard these remarks if you find otherwise.

@Dutchman101 Dutchman101 added the bug Something isn't working label Apr 14, 2020
@Dutchman101
Copy link
Member Author

Relevant discussion in #development started at this point: https://discordapp.com/channels/278474088903606273/366384007535001612/699568418717958218

Important part:
dsc

@RouatbiH
Copy link

RouatbiH commented Apr 14, 2020

@Dutchman101
Open MultiTheftAuto
Start Playing
Open Discord
and oops MultiTheftAuto Crashed

Version = 1.5.7-release-20508.0.000
Time = Tue Apr 14 15:47:49 2020
Module = C:\Program Files (x86)\MTA San Andreas 1.5\mta\discord_game_sdk.dll
Code = 0xE06D7363
Offset = 0x002F0B00

EAX=0028ED1C EBX=0028EDC4 ECX=00000003 EDX=00000000 ESI=652D3474
EDI=65300B00 EBP=0028ED6C ESP=0028ED1C EIP=757CC5AF FLG=00200202
CS=0023 DS=002B SS=002B ES=002B FS=0053 GS=002B

@qaisjp qaisjp added the wontfix label May 9, 2020
@qaisjp
Copy link
Contributor

qaisjp commented May 9, 2020

No longer applicable due to #1370 and #1396

@qaisjp qaisjp closed this as completed May 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants