[Bug 36441] New: joy.cpl crashes when PS4 Gamepad connected via Bluetooth

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 36441] New: joy.cpl crashes when PS4 Gamepad connected via Bluetooth

Wine - Bugs mailing list
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: [hidden email]
          Reporter: [hidden email]

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.

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 36441] joy.cpl crashes when PS4 Gamepad connected via Bluetooth

Wine - Bugs mailing list
http://bugs.winehq.org/show_bug.cgi?id=36441

lostpoint <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|unspecified                 |1.7.18

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 36441] joy.cpl crashes when PS4 Gamepad connected via Bluetooth

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
http://bugs.winehq.org/show_bug.cgi?id=36441

--- Comment #1 from lostpoint <[hidden email]> ---
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.

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 36441] joy.cpl crashes when PS4 Gamepad connected via Bluetooth

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
http://bugs.winehq.org/show_bug.cgi?id=36441

Bruno Jesus <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |hardware

--- Comment #2 from Bruno Jesus <[hidden email]> ---
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.

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 36441] joy.cpl crashes when PS4 Gamepad connected via Bluetooth

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
http://bugs.winehq.org/show_bug.cgi?id=36441

Ken Thomases <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #3 from Ken Thomases <[hidden email]> ---
And the log should be collected with WINEDEBUG=+tid,+dinput.

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 36441] joy.cpl crashes when PS4 Gamepad connected via Bluetooth

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
http://bugs.winehq.org/show_bug.cgi?id=36441

--- Comment #4 from lostpoint <[hidden email]> ---
(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?

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 36441] joy.cpl crashes when PS4 Gamepad connected via Bluetooth

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
http://bugs.winehq.org/show_bug.cgi?id=36441

--- Comment #5 from Ken Thomases <[hidden email]> ---
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.

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 36441] joy.cpl crashes when PS4 Gamepad connected via Bluetooth

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=36441

--- Comment #6 from Bruno Jesus <[hidden email]> ---
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.

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 36441] joy.cpl crashes when PS4 Gamepad connected via Bluetooth

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=36441

Bob Z <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #7 from Bob Z <[hidden email]> ---
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.

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 36441] joy.cpl crashes when PS4 Gamepad connected via Bluetooth

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=36441

--- Comment #8 from Bob Z <[hidden email]> ---
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.

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 36441] joy.cpl crashes when PS4 Gamepad connected via Bluetooth

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=36441

--- Comment #9 from Bob Z <[hidden email]> ---
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.

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 36441] joy.cpl crashes when PS4 Gamepad connected via Bluetooth

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=36441

--- Comment #10 from Bob Z <[hidden email]> ---
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.

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 36441] joy.cpl crashes when PS4 Gamepad connected via Bluetooth

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=36441

--- Comment #11 from Bob Z <[hidden email]> ---
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.

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 36441] joy.cpl crashes when PS4 Gamepad connected via Bluetooth

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=36441

--- Comment #12 from Bob Z <[hidden email]> ---
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.

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 36441] joy.cpl crashes when PS4 Gamepad connected via Bluetooth

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=36441

--- Comment #13 from Bob Z <[hidden email]> ---
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.

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 36441] joy.cpl crashes when PS4 Gamepad connected via Bluetooth

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=36441

Alistair Leslie-Hughes <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED
      Fixed by SHA1|                            |221708d64ebf7b9c6bed3674e93
                   |                            |63779a3ed1a4d

--- Comment #14 from Alistair Leslie-Hughes <[hidden email]> ---
Fixed by
https://source.winehq.org/git/wine.git/?a=commit;h=221708d64ebf7b9c6bed3674e9363779a3ed1a4d

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 36441] joy.cpl crashes when PS4 Gamepad connected via Bluetooth

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=36441

Alistair Leslie-Hughes <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|-unknown                    |directx-dinput

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 36441] joy.cpl crashes when PS4 Gamepad connected via Bluetooth

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=36441

Alexandre Julliard <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED

--- Comment #15 from Alexandre Julliard <[hidden email]> ---
Closing bugs fixed in 3.0-rc6.

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 36441] joy.cpl crashes when PS4 Gamepad connected via Bluetooth

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=36441

--- Comment #16 from lostpoint <[hidden email]> ---
excellent! :]

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.


Reply | Threaded
Open this post in threaded view
|

[Bug 36441] joy.cpl crashes when PS4 Gamepad connected via Bluetooth

Wine - Bugs mailing list
In reply to this post by Wine - Bugs mailing list
https://bugs.winehq.org/show_bug.cgi?id=36441

Michael Stefaniuc <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |2.0.x

--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.