WikkidEdd / OpenXRTestProject

0 stars 0 forks source link

Spinning White Balls when pressing the power button then resuming app #2

Open WikkidEdd opened 2 years ago

WikkidEdd commented 2 years ago

Describe the bug

When you press the power button of the HL2 when the app is running and then resume it can result in indefinitely seeing spinning white balls. This usually happens after one or two cycles of putting the device on standby and then resuming the app, but can sometimes take more attempts.

To reproduce

Steps to reproduce the behavior:

  1. Clone this git repo
  2. Open Unity project
  3. Switch to UWP build platform
  4. Build application
  5. Switch solution config to Release and ARM64
  6. Build and Start the application
  7. Wait until the app has started, wait 5 seconds, then short press on the power button to put the HL2 to sleep
  8. Wait another 5 seconds, press the power button to wake up the device. Resume the app from the app slate in the world (or from the start menu if the app slate doesn't exist yet.
  9. Repeat steps 7 and 8 until the app no longer resumes and shows the spinning white balls.

Expected behavior

The application should resume without white spinning balls.

Your setup (please complete the following information)

Target platform (please complete the following information)

Additional context

If you run with the debugger attached when the problem occurs you will get an exception at the point you press the power button prior to seeing the white spinning balls.

Callstack (trimmed to make it more readable) GameAssembly.dll!OpenXRLoaderBase_Internal_EndSession GameAssembly.dll!OpenXRLoaderBase_StopInternal GameAssembly.dll!OpenXRLoaderBase_ReceiveNativeEvent GameAssembly.dll!ReversePInvokeWrapper_OpenXRLoaderBase_ReceiveNativeEvent GameAssembly.dll!OpenXRLoaderBase_Internal_PumpMessageLoop GameAssembly.dll!OpenXRLoaderBase_ProcessOpenXRMessageLoop GameAssembly.dll!_ClearLastSubmittedFrame_Invoke GameAssembly.dll!BeforeRenderHelper_Invoke GameAssembly.dll!Application_InvokeOnBeforeRender GameAssembly.dll!RuntimeInvoker_FalseVoid GameAssembly.dll!il2cpp::vm::Runtime::Invoke

yl-msft commented 2 years ago

@WikkidEdd , this bug is related to a known issue we've been recently fixing. The UWP suspend and resume is a week point to the OpenXR runtime today in combination with Unity Engine's texture management. We recently produced fix in one of our internal preview package and seeing some improvements. We are planning to share the preview to public in coming weeks. I will ping here to ask you try out the preview runtime and see if this also improves the scenario you are reporting. It might also help the "perf hit" issue you reported in the other thread.