BizHawk
BizHawk copied to clipboard
BizHawk Crashes after selecting a core like DOSBox
Summary
If we try to select a libretro core like latest version of DOSBox Libretro Core, then BizHawk will crash right after we select it. If that was supposed to be as intended, then why the heck is the point of adding libretro feature!?
Repro
- Select "Open Advanced" in File
- Load latest version of DOSBox Libretro core
- BizHawk Crashes after we select it. Interstingly, this bypasses BizHawk crash handler, causing no error messages to appear.
If this is as intended, then BizHawk is supposed to crash after we launch a game, not before! What is even causing this and why!?
Host env.
BizHawk 2.6.2 Win10 BizHawk 2.4.2 Win10
Used Visual Studio 2019 to check what is going on, and I then see, that BizHawk is "trying to access and read or write protected memory" (System.AccessViolationException). Excuse me, WHY BIZHAWK IS EVEN DOING THIS!?
From the stacktrace, the problem seems to be with these unsafe operations.
https://github.com/TASEmulators/BizHawk/blob/40c53e0c1f1238cf02089ffc8509ab43eba31229/src/BizHawk.Emulation.Cores/Libretro/LibretroApi.cs#L58-L62
The pointer returned by DllInit
is either outside valid memory, or points to something that's not laid out as expected (CommStruct
, line 174) causing that read to continue past the end of valid memory.
This crash seems to happen in 32-bit cores, but also some 64-bit ones.
Does this still occur in 2.9 dev?
No.
This indicates a regression from 2.5. Versions below it do not crash.