BabylonReactNative icon indicating copy to clipboard operation
BabylonReactNative copied to clipboard

Playground crashes if XR is toggled off when the engine view is already toggled off

Open ryantrem opened this issue 4 years ago • 2 comments
trafficstars

Repro:

  1. Run the Playground app
  2. Tap Start XR
  3. Tap Toggle EngineView
  4. Tap Stop XR

One of two things will happen:

  1. (Usually) Nothing seems to happen at first, but if you tap either Toggle EngineView or Stop XR (again), it will crash
  2. (Sometimes) It will just hang and become unresponsive

ryantrem avatar Mar 26 '21 17:03 ryantrem

I have a partial fix for this with https://github.com/BabylonJS/BabylonNative/pull/746 which will address the hang that sometimes happens when toggling off the engine view while in XR.

This isn't necessarily the proper fix though. I haven't figured out why the code is continuing to render after the Android surface is destroyed. Ideally, XR should stop rendering completely when the window is set to null.

bghgary avatar May 14 '21 20:05 bghgary

The partial fix caused a regression https://github.com/BabylonJS/BabylonNative/issues/755. Need to make sure to check all XR scenarios for future fixes.

bghgary avatar May 21 '21 20:05 bghgary