Recurring native crashes in OpenXR perception runtime across multiple devices and apps

Hello,

We are experiencing frequent, seemingly random native crashes on Magic Leap 2 devices across our fleet, all running OS build B3E.240905.12-R.038. These crashes occur on multiple different devices and persist across Unity editor and package version upgrades.

Our Unity app has shown these issues when built with Unity 6000.0.45f1 and 6000.3.11f1, we also use OpenXR features related to hand tracking, localization, meshing, and spatial anchors. The exact list is shown in the attached screenshot.

The app is crashing with SIGILL and SIGSEGV signals originating from within Magic Leap’s native libraries — primarily libml_perception_session.so and libunity.so. We are also seeing identical crash patterns in the Leap Brush sample app (com.magicleap.leapbrush), which leads us to believe the root cause is deeper than our application code. Here’s a tombstone from the bugreport taken that captures the crash in the LeapBrush app, as well as the log file.

bugreport-demophon_aosp-B3E.240905.12-R.038-2026-03-13-13-34-04.txt (8.6 MB)

leapbrush tombstone_09.txt (1.0 MB)

Here are the descriptions of the crashes we see with our app:

  1. SIGILL in libml_perception_session.so during pose queries

The most common crash. The stack trace shows xrLocateSpace → Session::GetPose → ml_pose_combine_fn hitting an illegal instruction. We have captured multiple identical instances of this crash back-to-back on the same device (see the attached tombstone_08 and tombstone_09).

  1. SIGSEGV in magicflinger during head tracking

We captured a crash in the system compositor (magicflinger) where HeadTracking::RePredictPose in libml_perception_head_tracking.so segfaulted during CompositorBackend::UpdatePerceptionState. This crash caused a full device restart.

  1. SIGILL in xrSyncActions during input update

Captured via Sentry — a SIGILL crash in the OpenXR input provider during xrSyncActions, called from Unity’s XRInputSubsystem::Update in the normal player loop.

  1. Massive XR runtime stalls (3–20 seconds)

Using the Unity Profiler, we captured two instances of the OpenXR runtime stalling on the main thread:

  • EarlyUpdate.XRUpdate blocked for 3,400 ms
  • FrameEvents.XRBeginFrame blocked for 20,000 ms

In both cases, there was nothing underneath these calls in the profiler — Unity is waiting on a single native call into the OpenXR runtime that simply does not return for seconds at a time. These stalls cause display loss on the headset.

  1. Spatial anchor crashes

We also captured a SIGABRT from an uncaught ml::perception::Exception in SpatialAnchor::UpdateTrackedAnchors().

What We Have Tried:

  • Upgrading Unity editor versions
  • Upgrading ML2 Unity packages
  • Removing spatial anchor usage from our localization system
  • Profiling to identify any application-side cause

From our application (8 crashes on a single device, Feb 11 – Mar 4):

  • tombstone_00 — SIGILL in worker thread (Mar 4)
  • tombstone_02 — SIGABRT on UnityMain (Feb 11)
  • tombstone_03 — SIGSEGV in FMOD mixer thread (Feb 17)
  • tombstone_05 — SIGABRT from SpatialAnchor::UpdateTrackedAnchors() (Feb 20)
  • tombstone_06 — SIGSEGV in worker thread (Feb 24)
  • tombstone_07 — SIGSEGV null pointer, kernel-generated (Feb 25)
  • tombstone_08 — SIGILL in xrLocateSpace / libml_perception_session.so (Mar 3)
  • tombstone_09 — SIGILL in xrLocateSpace, identical to tombstone_08 (Mar 3)
  • bugreport-demophon_aosp-B3E.240905.12-R.038-2026-03-04-13-44-34.txt — Full system log from this device

Entire bugreport zips were too large to upload here, but I can send them if they would be helpful. Any guidance as to how to increase the stability of our app on the headset and to mitigate the multi-second stalls in xrBeginFrame and xrSyncActions would be greatly appreciated. Thanks.

bugreport-demophon_aosp-B3E.240905.12-R.038-2026-03-04-13-44-34.txt (9.2 MB)

tombstone_00.txt (1.1 MB)

tombstone_03.txt (1.2 MB)

tombstone_09.txt (1.2 MB)

tombstone_08.txt (1.2 MB)

tombstone_07.txt (1.1 MB)

tombstone_06.txt (1.3 MB)

tombstone_05.txt (1.3 MB)

tombstone_02.txt (2.1 MB)

Hi Steve,

Thank you for reaching out to us with this very well documented and thorough report of the issues. I really appreciate the time and effort you put into this. We’re going to look into this and see what we can do. Do you know approximately when these crashes started to occur? Was it after the latest update of OS or Unity or before? You’re using 6000.0.45f1 so I would think it went back to April ‘25 at least, but the OS build is 1.10.0 from Oct ‘24 so this would likely have been going on for a while if it was related to the OS. Did you experiment with B3E.251015.01 to see if it replicates the issue on the latest Nov ‘25 OS release 1.12.1?

Could you send the full bug report to care@magicleap.com? It should allow you to upload the whole thing and then I can transfer it from there and we can take a look at it.

I sent over bug reports for LeapBrush and our app. We first implemented the use of the OpenXR features and spaces/spatial anchors in September of 2024, and we have been noticing crashes since roughly then. During our time spent trying to fix this, we found that downgrading the OS to 1.10.0 was more stable. So we will gather some more data with 1.12.1, but we were seeing crashes on 1.12.0.

Thanks for taking a look.

Thank you for sending this over, we’re still taking a look at it. I’ll update you when I have more information.

Thank you again,

I’m following up on this with some more information. We upgraded a couple of our devices to OS 1.12.1 (B3E.251015.01) and have still been encountering crashes. We have also been attempting to reduce how often the display cuts out and returns. I emailed over a few more bug reports along with these descriptions for what they contain.

1. RIG7bugreport-demophon_aosp-B3E.251015.01-2026-03-26-20-17-01.zip

Device on newer OS build B3E.251015.01. Contains 3 app crashes in a single day:

  • tombstone_00 (16:14 UTC) — SIGILL in libunity.so at TransformHandle::GetWorldToLocalMatrixInternal, called from ScrollRect.LateUpdate. Illegal instruction indicates memory corruption — the function’s code page was corrupted before execution.
  • tombstone_01 (18:58 UTC) — SIGSEGV in libUnityOpenXR.so during C++ exception unwinding (__gxx_personality_v0 / _Unwind_RaiseException). The OpenXR plugin threw an exception and crashed while trying to handle its own error. Interleaved libc_malloc frames in the stack indicate heap corruption.
  • tombstone_02 (20:14 UTC) — SIGSEGV null pointer dereference entirely within libunity.so, no application code in stack.

2. rig5_displaybugreport-demophon_aosp-B3E.240905.12-R.038-2026-03-26-15-18-09.zip

Display loss caused by surfaceflinger crash.

  • tombstone_02 (15:14 CDT) — surfaceflinger SIGSEGV at fault address 0x54c0 in pthread_mutex_lock, called from ml::gfx::Properties::Update → MagicFlingerRenderer::runRenderThread in libsurfaceflinger_to_magicflinger.so. This is a null mutex dereference in the display compositor’s render thread.
  • tombstone_00 and tombstone_01 — Identical crash, same stack, same fault address, from Feb 12 and Feb 18.
  • FS/data/misc/logd/logcat — After the crash, MagicFlinger logs show DISPLAY_POWER_STATE_LED_OFF, reason “None” cycling every 3 seconds continuously. The display never recovered. One frame count entry shows ClientDroppedFrames=490.

3. Rig08_displayLost_bugreport-demophon_aosp-B3E.240905.12-R.038-2026-03-26-20-15-52.zip

Display loss caused by XR runtime stall, no crash.

  • FS/data/misc/logd/logcat — MagicFlinger periodic logs show the transition:
    • Normal operation with ClientDroppedFrames=0
    • Sudden spike to ClientDroppedFrames=269, ClientCPU drops from ~5ms to ~1.5ms
    • DISPLAY_POWER_STATE_LED_OFF, reason “Client - Inactive” — compositor declared the client inactive
    • Brief recovery attempt (ClientCPU=3.44ms), then 238 more dropped frames
    • Eventually recovered after ~20 seconds, drops returned to 0

Hopefully this additional information is helpful.

This is helpful, thank you for sharing it and sending over the full bugreports as well. How many devices would you say are effected out of the total? It’s also interesting that 1.10.0 seems to be more stable here than 1.12.1 or 1.12.0. Was your app originally built and tested on 1.10.0?

Can you tell me more about the app you’re using along with LeapBrush? If you’d rather email us with the details rather than post it here publicly that’s fine too.

I emailed some more information. Let me know if you need more specifics and I’ll provide what I can.

Thank you very much, Steve. We’re looking at all of it internally. Once I have something to share with you, I’ll post and update here.