Skip to content

Fix NPE error caused by the second HID endpoint of HID composite devices#1808

Open
KenRouKoro wants to merge 1 commit intoSlimeVR:mainfrom
KenRouKoro:main
Open

Fix NPE error caused by the second HID endpoint of HID composite devices#1808
KenRouKoro wants to merge 1 commit intoSlimeVR:mainfrom
KenRouKoro:main

Conversation

@KenRouKoro
Copy link
Copy Markdown

This PR fixes a NullPointerException in the hid4java data reader and device enumerator threads that occurs when a single USB device enumerates multiple HID interfaces (with identical VID/PID/serial numbers) due to the physical device having a second HID endpoint, which previously prevented the receiver's tracking data from being recognized.

Additionally, it resolves a secondary issue introduced by the initial fix: if the second HID endpoint is not a SlimeVR HID endpoint, it causes a loop of [TrackerServer] Reopening device ${device.serialNumber} after no data received. This happens because the system attempts to handshake with the second HID endpoint as if it were a SlimeVR device, despite there being no corresponding return data. To address this, I have introduced a keepFirstHidPerPhysicalDevice filter to block extra HID endpoints.

@github-actions github-actions bot added the Area: Server Related to the server label Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Server Related to the server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant