bsnes-mercury
bsnes-mercury copied to clipboard
Loading Super Mario RPG with achievements enabled causes RetroArch to crash
This is caused by a memory descriptor providing an invalid pointer, so when the achievement code tries to read the associated memory, an invalid memory access exception occurs.
You can see this in the log just before the crash:
[INFO] [MEM] Registered 0x20000 bytes of SYSTEM RAM at $000000 (descriptor 5, offset 0x000000)
[INFO] [MEM] Registered 0x20000 bytes of SRAM at $020000 (descriptor 19, offset 0x3E0000)
The problem is descriptor 19's ptr
is set to something that is clearly not a valid address.
When loading other games, the bad descriptor doesn't exist, so the SRAM segment just cannot be mapped. Here's the log from loading Super Mario All-Stars:
[INFO] [MEM] Registered 0x20000 bytes of SYSTEM RAM at $000000 (descriptor 5, offset 0x000000)
[INFO] [MEM] Could not map region starting at $020000
[INFO] [MEM] Registered 0x20000 bytes of SRAM at $020000 (null filler)
In this case, since the region specifically could not be mapped, the achievement code ignores it.
I also observed this with Super Mario RPG as you did, as well as with Kirby Super Star and Kirby's Dream Land 3 (Both USA). Upon startup (roughly 2 seconds after startup for Super Star), immediate segfault. Disabling achievements fixes both. Not sure if it is exactly the same issue as yours, however.
If this matters, this also happens to me on Retroarch's regular bsnes core.