Project

General

Profile

Actions

Emulator Issues #11939

open

[MacOS] Dolphin hangs while setting up Sony DS4 Controller

Added by sdavid.b over 4 years ago. Updated 11 days ago.

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

0%

Operating system:
OS X
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.

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?

  1. Pair and Connect Sony Playstation DS4 over bluetooth to macOS.
  2. Launch Dolphin on MacOS
  3. Click Controllers -> GameCube Controllers Standard Controller
  4. Select Input/X/Wireless Controller from the device menu
  5. 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::allocator >, std::1::allocator, 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::allocator >, std::1::allocator, 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::FunctorCallQtPrivate::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::
)()>::callQtPrivate::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


Related issues 2 (1 open1 closed)

Related to Emulator - Emulator Issues #12425: Mac M1 Controller input not registering (Dualshock 4)New

Actions
Has duplicate Emulator - Emulator Issues #11901: Dolphin crashes when trying to configure PS4 Controller (MAC)Duplicate

Actions
Actions #1

Updated by Billiard26 over 1 year ago

  • Operating system OS X added
  • Operating system deleted (N/A)
Actions #2

Updated by Billiard26 11 days ago

Actions #3

Updated by Billiard26 11 days ago

I would expect this to be irrelevant with the IOKit backend now removed. SDL hopefully works fine?

Actions #4

Updated by Billiard26 10 days ago

Actions

Also available in: Atom PDF