XOutput
XOutput copied to clipboard
XOutput ceashes on detecting my gamepad (since v3.23)
https://user-images.githubusercontent.com/26044948/104050383-9bf18200-51f7-11eb-93f6-dfcaa3d8263d.mp4
XOutput3.22.log XOutput3.31.log ViGEm dump file https://drive.google.com/file/d/1ZL-S_OFHXWJJEj8fmwQG1x1AWhflh5gV/view?usp=sharing
It's "USB Network Joystick" from this list. If I open XOutput, then connect gamepad, software closes after I click Force refresh. 3.22 is the latest version that works with this gamepad
Looks like a duplicate of #204 (which also has the workaround: uninstall the original drivers, you'll loose force-feedback but have an otherwise working environment) so I suggest to close this one. The information "works with 3.22 but not with 3.23" is very useful, though as it then is very likely that the change responsible for the crash you see is somewhere buried here.
As I've had to happen a controller which showed up with the same name I've tried that, too. As soon as its driver was installed I got a crash, retested that under a debugging session.
Reason for the crash (and for dump files): Memory Access Violation in from C:\Windows\USB Vibration\7906\EZFRD64.dll - which is the installed driver; so possibly its the driver's fault?
That part is called in the winmm.dll!timeThread() which is triggered by joystick.Aquire()
in XOutput.Devices.Input.DirectInput.DirectDevice
which is called from XOutput.Devices.Input.DirectInput.DirectDeviceDevices.CreateDirectDevice()
.
So the place for the trigger is the unmaintained SharpDX.Joystick...
... as I have actually no clue about the code I'm looking and and the final crash happens in the native driver code :-(
I gave git bisect a try and found the issue to be somewhere here: https://github.com/csutorasa/XOutput/compare/d3f3281...8211522 (the versions in between are either "bad" or do not build in VisualStudio out of the box - d3f3281 is definitely "good" and 8211522 is the first one that builds and has the crash).
It is caused by the Error handling defaults in the new project setup. If you search for Corrupted State Exceptions
you will find more about it.
the dll is incompatible with ASLR binaries following windows updates published in 2016, developers have the option of hot patching it similarly to what dolphin did in https://github.com/dolphin-emu/dolphin/pull/5582/commits/1210c74955f1d680eb639317d33f6324b57ec8d3
debugging results were published to dolphin-emu's forum here