Search Issue Tracker
Fixed in 5.3.6
[WSA] project crashes when legacy (non-XInput) USB joystick is repeatedly plugged in and unplugged from PC
Legacy (non-XInput) USB joystick can be called, for example, PlayStation 3 controller.
Game build crashes when a legacy (non-XInput) usb joystick is repeatedly plugged in and unplugged. This does not happen when using XInput (Xbox, Xbox One controllers) devices because they use the Gamepad system and not the HidDevice system.
The crash always happens when the device is unplugged. Based on research of the error message, it appears that a HidDevice handle is being used after the device is disconnected.
Exception thrown at 0x74DFDAD8 in blanktest.exe: Microsoft C++ exception: Platform::DisconnectedException ^ at memory location 0x0F55F87C. HRESULT:0x80010108 The object invoked has disconnected from its clients.
WinRT information: The object invoked has disconnected from its clients.
Reproducible on 5.3.4, 5.4.0b16
1. Open project "blanktest.zip".
2. In Player Settings enable "HumanInterfaceDevice" capability.
3. Build the project to WSA Universal 10 Universal with IL2CPP backend. Also crash appears on WSA 8.1 platform. Using WSA Universal 10 with .NET backend crash is not reproducible.
4. Launch built project in Visual Studio on x86 Debug (Release also crashes).
4. Plug and unplug a legacy USB joystick over and over again. Sometimes it may take up to 20 unplugs to crash. Sometimes it happens instantly.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Build fails when building with ILCPP Scripting Backend and ARMv7 as the Target Architecture
- Textures turn black in Player when they are referenced by a script instance
- [Android] Virtual device crashes with "Scudo ERROR: invalid chunk state when deallocating address" error in Firebase Test Lab when Optimized Frame Pacing is enabled
- Particle System does not resume when its Culling Mode is set to "Pause" or "Pause and Catch-up," and particle position simulate in world space
- "Custom Render Queue" field cannot be set above "2000" when changing it in the Inspector window using Debug mode