diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index e98c8b9d5a..9797915077 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -1408,7 +1408,7 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context) return true; } - if (cpu->id_type() == 2) + if (cpu->id_type() != 1) { LOG_FATAL(MEMORY, "Access violation %s location 0x%x", is_writing ? "writing" : "reading", addr); @@ -1436,12 +1436,17 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context) } else { + if (auto last_func = static_cast(cpu)->current_function) + { + LOG_FATAL(PPU, "Function aborted: %s", last_func); + } + lv2_obj::sleep(*cpu); } } - LOG_FATAL(MEMORY, "Access violation %s location 0x%x", is_writing ? "writing" : "reading", addr); Emu.Pause(); + LOG_FATAL(MEMORY, "Access violation %s location 0x%x", is_writing ? "writing" : "reading", addr); while (Emu.IsPaused()) {