Project

General

Profile

Emulator Issues #11697

Crash on game stop after using debugger PCC vs Host option

Added by Techjar about 2 years ago. Updated about 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

What's the problem? Describe what went wrong.

After clicking "PPC vs Host" on any instruction line in the debugger, Dolphin will segfault upon stopping the game.

What steps will reproduce the problem?

  1. Boot any game
  2. Pause
  3. Right click any instruction and click "PPC vs Host"
  4. Stop game

Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.
Yes, 5.0-10047

Is the issue present in the latest stable version?

N/A, no Qt debugger

If the issue isn't present in the latest stable version, which is the first broken version? (You can find the first broken version by bisecting. Windows users can use the tool https://forums.dolphin-emu.org/Thread-green-notice-development-thread-unofficial-dolphin-bisection-tool-for-finding-broken-builds and anyone who is building Dolphin on their own can use git bisect.)

I don't know if/when it ever didn't crash, so I haven't bothered bisecting. Bisecting over 10000 revisions creates some problems with building due to relocation/removal of massive chunks of code. Though, I can do it if necessary.

What are your PC specifications? (CPU, GPU, Operating System, more)

i7-7700K
GTX 1060
Arch Linux
KDE

Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)

Stack trace: https://gist.github.com/Techjar/d5f464f26f834f40cf7b1513ad4c75be

History

#1 Updated by Anonymous about 2 years ago

I guess there is some synchronization missing, JITWidget still calls PPCAnalyst::PPCAnalyzer::Analyze while the emulator is stopped.

To repro (the crash), just run debug build and start/stop a game with JITWidget active.

>   DolphinD.exe!Common::swap32(const unsigned char * data) Line 117    C++
    DolphinD.exe!Memory::Read_U32(unsigned int address) Line 424    C++
    DolphinD.exe!PowerPC::InstructionCache::ReadInstruction(unsigned int addr) Line 152 C++
    DolphinD.exe!PowerPC::TryReadInstruction(unsigned int address) Line 419 C++
    DolphinD.exe!PPCAnalyst::PPCAnalyzer::Analyze(unsigned int address, PPCAnalyst::CodeBlock * block, std::vector<PPCAnalyst::CodeOp,std::allocator<PPCAnalyst::CodeOp> > * buffer, unsigned __int64 block_size) Line 763  C++
    DolphinD.exe!JITWidget::Update() Line 163   C++
    DolphinD.exe!QtPrivate::FunctorCall<QtPrivate::IndexesList<>,QtPrivate::List<>,void,void (__cdecl JITWidget::*)(void)>::call(void(JITWidget::*)() f, JITWidget * o, void * * arg) Line 134  C++
    DolphinD.exe!QtPrivate::FunctionPointer<void (__cdecl JITWidget::*)(void)>::call<QtPrivate::List<>,void>(void(JITWidget::*)() f, JITWidget * o, void * * arg) Line 168  C++
    DolphinD.exe!QtPrivate::QSlotObject<void (__cdecl JITWidget::*)(void),QtPrivate::List<>,void>::impl(int which, QtPrivate::QSlotObjectBase * this_, QObject * r, void * * a, bool * ret) Line 397    C++
    Qt5Cored.dll!00007ffa2eab5538() Unknown
    Qt5Cored.dll!00007ffa2eaf04de() Unknown
    Qt5Cored.dll!00007ffa2eaefd88() Unknown
    DolphinD.exe!Settings::EmulationStateChanged(Core::State _t1) Line 514  C++
    DolphinD.exe!Settings::{ctor}::__l2::void <lambda>(Core::State)::__l2::<lambda>() Line 38   C++
    DolphinD.exe!QtPrivate::FunctorCall<QtPrivate::IndexesList<>,QtPrivate::List<>,void,void <lambda>(void) >::call(Settings::{ctor}::__l2::void <lambda>(Core::State)::__l2::void <lambda>(void) & f, void * * arg) Line 128   C++
    DolphinD.exe!QtPrivate::Functor<void <lambda>(void),0>::call<QtPrivate::List<>,void>(Settings::{ctor}::__l2::void <lambda>(Core::State)::__l2::void <lambda>(void) & f, void * __formal, void * * arg) Line 239 C++
    DolphinD.exe!QtPrivate::QFunctorSlotObject<void <lambda>(void),0,QtPrivate::List<>,void>::impl(int which, QtPrivate::QSlotObjectBase * this_, QObject * r, void * * a, bool * ret) Line 427 C++
    Qt5Cored.dll!00007ffa2eab5538() Unknown
    Qt5Cored.dll!00007ffa2eaf97b6() Unknown
    Qt5Cored.dll!00007ffa2eaf220f() Unknown
    Qt5Widgetsd.dll!00007ffa2cd5baae()  Unknown
    Qt5Widgetsd.dll!00007ffa2cd5652f()  Unknown
    Qt5Cored.dll!00007ffa2ea9c826() Unknown
    Qt5Cored.dll!00007ffa2eaa78d2() Unknown
    Qt5Cored.dll!00007ffa2ea9e1cd() Unknown
    Qt5Cored.dll!00007ffa2eb58bba() Unknown
    qwindowsd.dll!00007ffa581166f4()    Unknown
    Qt5Cored.dll!00007ffa2eb5693b() Unknown
    user32.dll!UserCallWinProcCheckWow()    Unknown
    user32.dll!DispatchMessageWorker()  Unknown
    Qt5Cored.dll!00007ffa2eb572cd() Unknown
    qwindowsd.dll!00007ffa581166b4()    Unknown
    Qt5Cored.dll!00007ffa2ea96a33() Unknown
    Qt5Cored.dll!00007ffa2ea96c6e() Unknown
    Qt5Cored.dll!00007ffa2ea9a33f() Unknown
    Qt5Guid.dll!00007ffa2d905ca8()  Unknown
    Qt5Widgetsd.dll!00007ffa2cd55efa()  Unknown
    DolphinD.exe!main(int argc, char * * argv) Line 219 C++
    DolphinD.exe!WinMain(HINSTANCE__ * __formal, HINSTANCE__ * __formal, char * __formal, int __formal) Line 104    C++
    DolphinD.exe!invoke_main() Line 107 C++
    DolphinD.exe!__scrt_common_main_seh() Line 288  C++
    DolphinD.exe!__scrt_common_main() Line 331  C++
    DolphinD.exe!WinMainCRTStartup() Line 17    C++
    kernel32.dll!BaseThreadInitThunk() Unknown
    ntdll.dll!RtlUserThreadStart() Unknown

Also available in: Atom PDF