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.
- [Textures] CubemapArray API forces duplicate code because you cannot access individual cubemaps directly
- Duplicating a Prefab instance in the Scene will cause instances of the same Prefab to be disabled and re-enabled
- GUI.Button and GUILayout.Button stay in the normal GUIStyleState even when the normal GUIStyleState is changed to another one
- Particle System mesh UV coordinates change when mesh's geometry layout is changed on import
- [Windows] The Unity import progress is not shown in the Windows taskbar