Closed Dutchman101 closed 4 years ago
Relevant discussion in #development started at this point: https://discordapp.com/channels/278474088903606273/366384007535001612/699568418717958218
Important part:
@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
No longer applicable due to #1370 and #1396
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 -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:
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):
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:
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 https://github.com/multitheftauto/mtasa-blue/issues/1370#issuecomment-612635553 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.