-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InteractionSource IDs aren't stable across app focus changes, resulting in cursors that never disappear #8016
Comments
This sounds like a Windows (or Unity) bug to me. MRTK responds to the IDs provided by the Unity APIs, so if they're firing in unexpected orders or with unexpected IDs, it might be an issue with the Windows or Unity API. |
Perhaps MRTK should explicitly remove all controllers on resume to ensure that everything is cleaned up. |
This feels like it might end up hiding any potential underlying issues. There's an assertion that the Windows API should fire source lost events when the app is paused and new detected events when the app is resumed. We shouldn't need to do anything special here. There's additional work being done here on the Unity side around the matrix of PresentPassive vs PresentActive vs Absent and how Unity should handle it. It's possible we're running into a case here where the app isn't being suspended in the way we expect. |
Believed to eventually get fixed on Unity side as its a bug on their end |
A fix for this is expected from Unity on May 7th and will require an up rev in Unity versions. We will need a repro test from Remote Assist at that point. |
Going to close this down as likely fixed by Unity. Please reopen if this isn't the case. |
Describe the bug
When a HoloLens app loses focus and is not set to run in background, upon resuming the app, MRTK cursors can be left dangling from previous sessions. These cursors never go away until you kill and restart the app cleanly.
To reproduce
Expected behavior
Each time the HoloLens app is reactivated, the correct set of hand rays appears.
Screenshots
You can see in this screenshot that there's a third disconnected hand ray pointed at the slate. This hand ray never goes away.
Your setup (please complete the following information)
Target platform (please complete the following information)
Additional context
I've traced the InteractionSource IDs as they result in creating and destroying cursors. You can see from this trace that there are not matching IDs after the app is suspended and restored, where a RemoveController for 2000000402 occurs with no matching AddController, and an AddController for 2000000401 occurs with no matching RemoveController.
The text was updated successfully, but these errors were encountered: