Emulator Issues #13521
openCode View Widget: m_stepping_lock not acquired on destructor causing unlocking of already unlocked mutex
0%
Description
Game Name/ID/Hash?
N/A
What's the problem? Describe what went wrong.
m_stepping_lock
not acquired and CPUThreadGuard::~CPUThreadGuard attempts to unlock an unlocked mutex.
What steps will reproduce the problem?
- Run with Dolphin debugger enabled.
- Open the code tab and add a symbol definition.
- Stop Dolphin.
- Set a breakpoint at
CPUManager::PauseAndLock
right beforem_stepping_lock.unlock()
- Start Dolphin with a debugger attached (Visual Studio debugger works fine).
- Make sure the debugging UI is open.
- Start a game.
- Observe the mutex is unlocked. (In Debug builds the CRT seems to decide to want to jump into the debugger if you let it run.)
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; git commit hash 3527d97.
Is the issue present in the latest stable version?
I have no clue.
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.)
Not sure; the last change to the line was just renaming the s_
prefix to a m_
prefix a little over a year ago.
What are your PC specifications? (CPU, GPU, Operating System, more)
Windows 10/i7/RTX 3080 Laptop
Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)
Callstack:
CPU::CPUManager::PauseAndLock(do_lock: false, unpause_on_unlock: true, control_adjacent: true)
Core::PauseAndLock(system: [...], do_lock: false, unpause_on_unlock: false)
CPUThreadGuard::~CPUThreadGuard() (m_was_cpu_thread
is false)
CodeViewWidget::Update() L275
...