Emulator Issues #11939
closed[MacOS] Dolphin hangs while setting up Sony DS4 Controller
0%
Description
What's the problem? Describe what went wrong.
On MacOS, when setting up controller configuration - at least with the Sony DualShock 4 Controller, when used over Bluetooth - clicking any of the controller mapping buttons results in a hang, forcing the user to force-quit the application in order to proceed, and disallowing mapping of controller buttons.
What steps will reproduce the problem?
- Pair and Connect Sony Playstation DS4 over bluetooth to macOS.
- Launch Dolphin on MacOS
- Click Controllers -> GameCube Controllers Standard Controller
- Select Input/X/Wireless Controller from the device menu
- Try to map the A button.
Result: Immediate rainbow pinwheel.
[Reproduction steps here]
Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.
Git Head, commit 8a50d9c540
Is the issue present in the latest stable version?
Unsure.
** Additional **
I have built a debug version of dolphin and have attached the Xcode debugger to it, resulting in the following call-stack:
#0 0x00007fff6d05c25a in mach_msg_trap ()
#1 0x00007fff6d05c5d0 in mach_msg ()
#2 0x00007fff38642c34 in io_connect_method ()
#3 0x00007fff38642a47 in IOConnectCallMethod ()
#4 0x00007fff386439a9 in IOConnectCallStructMethod ()
#5 0x0000000113c9d7f3 in ___lldb_unnamed_symbol213$$IOHIDLib ()
#6 0x0000000113c9e271 in ___lldb_unnamed_symbol228$$IOHIDLib ()
#7 0x00007fff38679c2d in IOHIDDeviceGetValue ()
#8 0x0000000107cd8508 in ciface::OSX::Joystick::Axis::GetState() const at /Users/sdavid/Development/c++/dolphin/Source/Core/InputCommon/ControllerInterface/OSX/OSXJoystick.mm:229
#9 0x0000000107c97e8c in ciface::Core::DeviceContainer::DetectInput(unsigned int, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > > const&) const at /Users/sdavid/Development/c++/dolphin/Source/Core/InputCommon/ControllerInterface/Device.cpp:294
#10 0x00000001072928e5 in MappingCommon::DetectExpression(QPushButton*, ciface::Core::DeviceContainer&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > > const&, ciface::Core::DeviceQualifier const&, MappingCommon::Quote) at /Users/sdavid/Development/c++/dolphin/Source/Core/DolphinQt/Config/Mapping/MappingCommon.cpp:71
#11 0x0000000107291494 in MappingButton::Clicked() at /Users/sdavid/Development/c++/dolphin/Source/Core/DolphinQt/Config/Mapping/MappingButton.cpp:104
#12 0x000000010729208e in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (MappingButton::)()>::call(void (MappingButton::)(), MappingButton*, void**) at /usr/local/opt/qt/lib/QtCore.framework/Headers/qobjectdefs_impl.h:152
#13 0x0000000107291fe3 in void QtPrivate::FunctionPointer<void (MappingButton::)()>::call<QtPrivate::List<>, void>(void (MappingButton::)(), MappingButton*, void**) at /usr/local/opt/qt/lib/QtCore.framework/Headers/qobjectdefs_impl.h:185
#14 0x0000000107291ef6 in QtPrivate::QSlotObject<void (MappingButton::)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase, QObject*, void**, bool*) at /usr/local/opt/qt/lib/QtCore.framework/Headers/qobjectdefs_impl.h:414
#15 0x000000010eec9665 in QMetaObject::activate(QObject*, int, int, void**) ()
#16-17 [truncated]
#18 0x000000010c72d7cc in QAbstractButton::mouseReleaseEvent(QMouseEvent*) ()
#19 0x0000000107291b97 in MappingButton::mouseReleaseEvent(QMouseEvent*) at /Users/sdavid/Development/c++/dolphin/Source/Core/DolphinQt/Config/Mapping/MappingButton.cpp:161
#20 0x000000010c67f8c7 in QWidget::event(QEvent*) ()
#20-44 [truncated]
#45 0x000000010ee94cbf in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) ()
#46 0x000000010ee99d62 in QCoreApplication::exec() ()
#47 0x0000000107196765 in main at /Users/sdavid/Development/c++/dolphin/Source/Core/DolphinQt/Main.cpp:242
ControlState Joystick::Axis::GetState() const
{
IOHIDValueRef value;
// This is where the program hangs.
/* >>> */ if (IOHIDDeviceGetValue(m_device, m_element, &value) == kIOReturnSuccess)
{
// IOHIDValueGetIntegerValue() crashes when trying
// to convert unusually large element values.
if (IOHIDValueGetLength(value) > 2)
return 0;
float position = IOHIDValueGetIntegerValue(value);
if (m_direction == positive && position > m_neutral)
return (position - m_neutral) * m_scale;
if (m_direction == negative && position < m_neutral)
return (m_neutral - position) * m_scale;
}
return 0;
}
Files