http://bugs.winehq.org/show_bug.cgi?id=36441
Bug ID: 36441 Summary: joy.cpl crashes when PS4 Gamepad connected via Bluetooth Product: Wine Version: unspecified Hardware: x86 OS: Mac OS X Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: lp-san@lostpoint.ru
Created attachment 48464 --> http://bugs.winehq.org/attachment.cgi?id=48464 crash log available via gui crash message
First of all, I'd like to apologize if I came to the wrong bigtracker, since I'm a wineskin user, not pure wine user. But I believe the problem is a wine-specific, not wineskin specific.
I'm using Wineskin 2.6.0 (latest) with Wine Engine WS9Wine1.7.18 (the latest available via Wineskin).
I'm connecting PS4 Gamepad via Bluetooth, then I start a Wine/Wineskin Command Line Shell, executing "control joy.cpl" and the control panel applet crashes. If I disconnect the gamepad, the applet works fine.
I attached the crash log information in a text file. I can provide any debug information from the wine logs if needed.
http://bugs.winehq.org/show_bug.cgi?id=36441
lostpoint lp-san@lostpoint.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |1.7.18
http://bugs.winehq.org/show_bug.cgi?id=36441
--- Comment #1 from lostpoint lp-san@lostpoint.ru --- Also, ePSXe crashes when I'm opening its gamepad configuration dialog having PS4 Gamepad connected via Bluetooth. When the gamepad is connected via USB, it works fine.
http://bugs.winehq.org/show_bug.cgi?id=36441
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |hardware
--- Comment #2 from Bruno Jesus 00cpxxx@gmail.com --- Hi, wineskin or other wrappers are not supported here. Please use the plain wine version, read http://wiki.winehq.org/MacOSX for more information. When you have a plain wine setup attach a log, read http://wiki.winehq.org/FAQ#get_log for more information.
http://bugs.winehq.org/show_bug.cgi?id=36441
Ken Thomases ken@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ken@codeweavers.com
--- Comment #3 from Ken Thomases ken@codeweavers.com --- And the log should be collected with WINEDEBUG=+tid,+dinput.
http://bugs.winehq.org/show_bug.cgi?id=36441
--- Comment #4 from lostpoint lp-san@lostpoint.ru --- (In reply to Bruno Jesus from comment #2)
Hi, wineskin or other wrappers are not supported here. Please use the plain wine version, read http://wiki.winehq.org/MacOSX for more information. When you have a plain wine setup attach a log, read http://wiki.winehq.org/FAQ#get_log for more information.
Hi. Can I use Homebrew to install Wine, or should I install it from scratch?
http://bugs.winehq.org/show_bug.cgi?id=36441
--- Comment #5 from Ken Thomases ken@codeweavers.com --- I'm not very familiar with Homebrew. It might be OK if it doesn't have many patches or hacks for Wine, especially for the relevant DLLs.
Ideally, the build will have debugging symbols intact rather than being stripped. I don't know if Homebrew will do that. Your previous backtrace didn't look right. I don't know if that was just because debug symbols were stripped or if bug 34813 was not completely fixed.
https://bugs.winehq.org/show_bug.cgi?id=36441
--- Comment #6 from Bruno Jesus 00cpxxx@gmail.com --- Is this still an issue in wine 1.9.16 or later? If yes please attach a +joystick,+xinput,+dinput log. Read http://wiki.winehq.org/FAQ#get_log to learn how.
https://bugs.winehq.org/show_bug.cgi?id=36441
Bob Z jazzsax006@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jazzsax006@gmail.com
--- Comment #7 from Bob Z jazzsax006@gmail.com --- I can confirm this is still a problem as of wine staging 2.21 (vanilla build from winehq) running on Max OS 10.13.2. If I run "wine control" without my ps4 controller connected, it opens fine. If I connect my ps4 controller via USB, "wine control" opens fine and I can confirm all buttons/axes/etc register the proper events for the controller.
However, if I connect the controller via Bluetooth, "wine control" crashes on startup. Note that the controller itself is working fine in Mac OS via Bluetooth. I've played the Mac-native "Enter the Gungeon" on Steam with the controller connected via bluetooth and have had no problems.
I've captured the WINEDEBUG="+joystick,+xinput,+dinput" output and will attach that to this bug report. Let me know if you'd like the same output with the controller connected via USB, or if you'd like me to test any other wine builds.
https://bugs.winehq.org/show_bug.cgi?id=36441
--- Comment #8 from Bob Z jazzsax006@gmail.com --- Created attachment 60107 --> https://bugs.winehq.org/attachment.cgi?id=60107 "wine control" crash with ps4 controller connected via bluetooth
Attached the output of 'WINEDEBUG="+joystick,+xinput,+dinput" wine control' when running wine 2.21 staging on Mac OS 10.13.2 with ps4 controller connected via bluetooth.
https://bugs.winehq.org/show_bug.cgi?id=36441
--- Comment #9 from Bob Z jazzsax006@gmail.com --- Created attachment 60123 --> https://bugs.winehq.org/attachment.cgi?id=60123 wine-2.0.4-crash.log
Same crash with vanilla wine 2.0.4 from winehq on Mac 10.13.2.
https://bugs.winehq.org/show_bug.cgi?id=36441
--- Comment #10 from Bob Z jazzsax006@gmail.com --- Created attachment 60124 --> https://bugs.winehq.org/attachment.cgi?id=60124 wine-3.0-rc4-crash.log
Same crash with vanilla wine 3.0-rc4 from winehq on Mac 10.13.2.
https://bugs.winehq.org/show_bug.cgi?id=36441
--- Comment #11 from Bob Z jazzsax006@gmail.com --- I think I've narrowed-in on the problem. When the controller is connected via USB, the code in dlls/dinput/joystick_osx.c detects the correct number of axes/buttons/povs. However, when connected via bluetooth, the correct number of buttons/povs is detected, but not the correct number of axes.
USB: 002e:trace:dinput:get_osx_device_elements axes 6 povs 1 buttons 14 002e:trace:dinput:alloc_device 6 axes 14 buttons 1 povs
Bluetooth: 002e:trace:dinput:get_osx_device_elements axes 553 povs 1 buttons 14 002e:trace:dinput:alloc_device 553 axes 14 buttons 1 povs
The actual crash occurs in get_osx_device_elements_props when CFArrayGetValueAtIndex( device->elements, idx ) is then called for the incorrectly-detected axis elements.
Given the rest of the HID handling for the PS4 controller seems to work correctly when connected via USB and that the button/pov detection is correct via bluetooth, I imagine the fix is probably somewhat easy.
I've checked-out the latest wine code from git, built it locally, reproduced again with my checkout, and have been adding some trace statements of my own to try to hone in further, but unfortunately I'm both new to the wine code base and completely unfamiliar with MacOS/IOKit APIs, so I'm fumbling around rather blindly.
I'll try to reach out via either IRC or mailing list, but any pointers on where to look would be very appreciated. I don't mind fixing and submitting a patch myself if I can get that far.
https://bugs.winehq.org/show_bug.cgi?id=36441
--- Comment #12 from Bob Z jazzsax006@gmail.com --- I spent some time debugging the dinput code for wine and discovered the problem: The dualshock 4 controller reports all sorts of vendor-specific HID elements that are incorrectly matched as axis elements. I put together a small patch to filter-out vendor-specific elements and wine now correctly detects 6 axes, 14 buttons, and 1 pov for both USB and bluetooth connections. I've posted the patch to the wine-devel mailing list for review.
https://bugs.winehq.org/show_bug.cgi?id=36441
--- Comment #13 from Bob Z jazzsax006@gmail.com --- Oh, and I would like to explicitly thank zf and Thunderbird_ for the input they provided on IRC. They were both helpful in figuring-out the source of this crash. Thank you.
https://bugs.winehq.org/show_bug.cgi?id=36441
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |221708d64ebf7b9c6bed3674e93 | |63779a3ed1a4d
--- Comment #14 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Fixed by https://source.winehq.org/git/wine.git/?a=commit;h=221708d64ebf7b9c6bed3674e...
https://bugs.winehq.org/show_bug.cgi?id=36441
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |directx-dinput
https://bugs.winehq.org/show_bug.cgi?id=36441
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #15 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 3.0-rc6.
https://bugs.winehq.org/show_bug.cgi?id=36441
--- Comment #16 from lostpoint lp-san@lostpoint.ru --- excellent! :]
https://bugs.winehq.org/show_bug.cgi?id=36441
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |2.0.x
https://bugs.winehq.org/show_bug.cgi?id=36441
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|2.0.x |---
--- Comment #17 from Michael Stefaniuc mstefani@winehq.org --- Removing the 2.0.x milestone from bugs included in 2.0.5.