Emulator Issues #12893
closedStop responding (freeze) when configuring keys with Tas Input's "Enable Controller Input" and Emulated Wii Remote
0%
Description
Game Name?
N/A
Game ID? (right click the game in the game list, Properties, Info tab)
N/A
MD5 Hash? (right click the game in the game list, Properties, Verify tab, Verify Integrity button)
N/A
What's the problem? Describe what went wrong.
Trying to configure controllers or hotkeys while Enable Controller Input is checked while a game is running causes Dolphin to stop responding.
What steps will reproduce the problem?
- Ensure you are using an Emulated Wii Remote
- Open a Wii game
- Open TAS Inputs
- Check "Enable Controller Input"
- Open "Controllers > Configure" OR "Options > Hotkey Settings"
Does not happen if no game is running.
Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.
5.0-16101
Is the issue present in the latest stable version?
N/A (Enable Controller Input does not exist in 5.0)
However, it is not present in the oldest beta: 5.0-15105
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.)
5.0-15203 https://dolphin-emu.org/download/dev/28e6e8752ce709a775440138a39bce6987624ec8/
If your issue is a graphical issue, please attach screenshots and record a three frame fifolog of the issue if possible. Screenshots showing what it is supposed to look like from either console or older builds of Dolphin will help too. For more information on how to use the fifoplayer, please check here: https://wiki.dolphin-emu.org/index.php?title=FifoPlayer
N/A
What are your PC specifications? (CPU, GPU, Operating System, more)
NVIDIA GeForce GTX 1070
AMD Ryzen 5 2600 Six-Core Processor
Windows 10.0.19044
Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)
N/A
Files
Updated by JosJuice over 2 years ago
- Milestone set to Current
- Regression changed from No to Yes
- Regression start set to 5.0-15203
Updated by Dentomologist over 2 years ago
- File 12893_call_stack.txt 12893_call_stack.txt added
This is caused by a deadlock between the CPU and Main threads. I've attached the full call stacks, but here's an abridged version.
CPU Thread (parent calls first):
IPC_HLE_UpdateCallback
...
WiiMoteEmu::WiiMote::Update, which calls GetStateLock
SendDataReport
...
TASInputWindow::GetSpinBoxU16
QueueOnObjectBlocking
Main Thread:
WiimoteControllersWidget::OnWiimoteConfigure
MappingWindow constructor
...
MappingButton constructor
RefToDisplayString, which calls GetStateLock
Sequence of events:
- CPU Thread calls GetStateLock in Update
- Main Thread calls GetStateLock in RefToDisplayString and blocks
- CPU Thread calls QueueOnObjectBlocking from GetSpinBoxU16, which (when Enable Controller Input is set) queues a call of spin->setValue for the next time the Main Thread returns to its event loop. The CPU thread then blocks until the call of setValue returns, but that never happens because the Main thread is blocked on the call to GetStateLock which is never released by the CPU thread.
The simplest solution to this issue is to use QueueOnObject (which I've verified works) instead of QueueOnObjectBlocking, but then that presumably causes https://bugs.dolphin-emu.org/issues/12676 to happen again.
Updated by JosJuice almost 2 years ago
- Status changed from Accepted to Fixed
- Fixed in set to 5.0-18857