Ryochan7 / DS4Windows

Like those other ds4tools, but sexier
https://ryochan7.github.io/ds4windows-site/
GNU General Public License v3.0
6.96k stars 807 forks source link

DS4Windows closes/crashes when setting Controller output type to Dualshock 4 #1050

Closed colmiak closed 4 years ago

colmiak commented 4 years ago

Anytime I set the controller output type under other settings to Dualshock 4, ds4windows crashes. This happens in both wired/wireless mode.

Dinput only works fine but my goal is to have DS4Windows emulate Dualshock 4 output wirelessly but I'm unable to since it instantly closes anytime I pick a profile with that setting enabled or edit the currently in use profile to enable the option and then save it.

I tried to look up any issues on here (and google) to see if anyone had a similar issue and the closest I could find was this: https://webcache.googleusercontent.com/search?q=cache:e0mT3z9CafgJ:https://www.gitmemory.com/issue/Ryochan7/DS4Windows/796/524641117+&cd=6&hl=en&ct=clnk&gl=us which leads to this already closed issue: https://github.com/Ryochan7/DS4Windows/issues/788

From my understanding Dinput only setting will only work in wired mode because unless you have the official Sony bluetooth dongle, Windows can't convert the ds4's dinput to whatever input newer games with ds4 support use? A regular bluetooth dongle doesn't have whatever Sony's official dongle drivers do?

I'm sorry that if I'm a bit unclear, I only vaguely understand some of this. I'd love to basically play with my ds4 and have it act as a ds4 wirelessly for games that support it (this gives me ps4 button prompts). Not a huge deal as I can just plug in and have it work that way. Just thought I'd see if maybe there was a fix!

Ryusennin commented 4 years ago

Is your DS4 a v1 or v2? Just so you know, the DS4 controller box only works with v2.

colmiak commented 4 years ago

oh! I didn't know this.

I'm pretty sure I'm using a v1 but I have both so I'll try a v2 when I get home!

edit: tried on v2, same issue :(

mika-n commented 4 years ago

Please see general troubleshooting tips and provide the minimum information need to diagnose the issue (WinOS? 32bit or 64bit? DS4Windows app version? Content of Logs tab page or "%APPDATA%\DS4Windows\log" log files): https://github.com/Ryochan7/DS4Windows/wiki/Troubleshooting

Especially we would need those logfiles to see if there are any error/exception messages. I guess you cannot see anything in Logs tab page because it is closed when the app crashes, but logfiles should still show something.

Please attach the profile file here in a comment field (zipped or renamed as TXT file). Profiles are in %APPDATA%\DS4Windows\Profiles\ folder or you can press the "Profile folder" link in settings tab page of DS4Windows app.

hadyanq1 commented 4 years ago

Hi, I am recenly having the same issue, it it worked perfectly fine before I reinstalled my Windows. Looking at the log showed nothing obvious, but here it is:

2020-01-19 14:52:43.7765|INFO|DS4Windows version 2.0.4
2020-01-19 14:52:43.7765|INFO|Logger created
2020-01-19 14:52:44.5167|INFO|Starting...
2020-01-19 14:52:44.5167|INFO|Connection to ViGEmBus 1.16.112.0 established
2020-01-19 14:52:44.5167|INFO|Searching for controllers...
2020-01-19 14:52:44.5167|INFO|Using Shared Mode
2020-01-19 14:52:44.5792|INFO|Found Controller: A4:53:85:ED:6E:C4 (BT) (DS4 v.2)
2020-01-19 14:52:44.5949|INFO|Plugging in DS4 Controller for input #1

DS4Windows crashes seconds after it's launched with DS4 output type selected, and to fix this, I have to manually update my profile XML to set it back to <OutputContDevice>X360</OutputContDevice>.

Additional information: DS4Windows app version: 2.0.4.0, Windows OS version: Windows 10 Pro build 1090 64 bit, gamepad version: official DS4 Sony controller , bluetooth connection.

Any ideas what went wrong?

mika-n commented 4 years ago

From my understanding Dinput only setting will only work in wired mode because unless you have >the official Sony bluetooth dongle, Windows can't convert the ds4's dinput to whatever input newer >games with ds4 support use?

True. BT connected DS4 gamepad in PC works by default only in "PC-friendly" mode. This mode does not support touchpad or lightbar. When the gamepad is switched over to "native DS4 mode" (ds4windows application does this by sending a configuration command to a gamepad via BT) then DS4 gamepad starts to "understand" touchpad and lightbar in PC also. However, Windows OS has a flaw/bug/idiotic feature that WinOS no longer understand the original BT hid gamepad device because it is in a new mode. DS4Windows app solves this "dead HID device" problem by reading data from the gamepad in raw mode and feeding output to virtual gamepad device. This "dead device" is WinOS problem and DS4Windows app cannot do anything about it.

USB connected DS4 gamepad doesn't suffer from this "dead device" issue because usb connection doesn't need PC-Friednly->nativeDS4 mode switching because DS4 gamepad goes to native DS4 mode automatically in USB connections.

SonyWirelessAdapter is a hardware level solution to this WinOS "dead device after mode switch in BT" problem. It hides the mode switching from WinOS BT stack behind the SWA black box.

Well, the above described thing is not directly linked to the crash issue you described above. DS4Windows app should not crash in mode switching. Why it does this in your environments? Hmmmm...... Veeeeeery strange.

To make sure this is not a profile option issue then please try to create a new default profile in DS4Windows appp and don't change any other options but "Controller=dualshock4" mode. Is it still crashing?

hadyanq1 commented 4 years ago

Any update or anything we can help on this? I've just updated to 2.0.8 and it still crashes.

mika-n commented 4 years ago

Try running the debug version. Maybe that logfile tells more hints why the app crashes when virtual controller is in dualshock4 type. https://github.com/Ryochan7/DS4Windows/wiki/Troubleshooting#detailed-debug-log-file-from-gamepad-connection-problems

But, this is very unique problem and I have never heard about such isolated bug (ie. crashes only when output virtual controller type is dualshock4). Maybe you could try to install Sony "PS4 RemotePlay" app to make sure all dualshock device drivers are in place (although those should not have anything to do with ViGem virtual drivers).

Have you tried deleting all existing DS4Windows config and profile files and let it to start with default values? Delete (or backup) "%APPDATA%\DS4Windows\" folder structure.

Ryochan7 commented 4 years ago

Switching to DS4 emulation output works perfectly fine for me. I have a couple of profiles that use DS4 output mode. Is there any crash error listed in the log file? If not then maybe an error would be listed in the Windows Event Viewer.