hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
11.1k stars 2.16k forks source link

Win32 Debug build with JIT crashes when a memory breakpoint is triggered #17788

Open Nemoumbra opened 1 year ago

Nemoumbra commented 1 year ago

Game or games this happens in

Patapon 3

What area of the game / PPSSPP

Steps to reproduce (EU): Load the game (break on load) -> set read breakpoint on 0x08A5AF90 -> resume and observe the crash. For the US version (I've noticed that it's what people have in general here) the breakpoint address is 0x08A5B3D8.

What should happen

JIT must produce the same results as the Interpreter and IR backends.

Logs

For instance, in P3 EU: Uncaught exception at 0x09F4F10C in PPSSPPDebug.exe: 0xC0000005 Execute access violation at 0x09F4F10C

The top of the stacktrace:

MIPSComp::Jit::RunLoopUntil(unsigned __int64 globalticks) Line 338
MIPSState::RunLoopUntil(unsigned __int64 globalTicks) Line 343
PSP_RunLoopUntil(unsigned __int64 globalticks) Line 634
PSP_RunLoopFor(int cycles) Line 637
PSP_RunLoopWhileState() Line 616

Platform

Windows

Mobile phone model or graphics card

AMD Radeon(TM) Graphics

PPSSPP version affected

Self-built version (one of the lastest)

Last working version

No response

Graphics backend (3D API)

Direct3D 9

Checklist

hrydgard commented 6 days ago

This one is super bizarre, we now get a different stack trace, it crashes in the screen manager. Seems to be some stray memory overwrite, or similar, as the crash makes no sense :/

For now, I guess we stick to 64-bit for debugging, but this is quite unsettling.