Body:
I’m receiving the following crash in Crashlytics:
Caused by java.lang.NullPointerException
mNativeObject of Surface(name=Surface(name=7a76188 NavigationBar0#109)/@0x8619959 - animation-leash of insets_animation#25042)/@0x7f7901b is null. Have you called release() already?
android.view.SurfaceControl.checkNotReleased (SurfaceControl.java:1865)
android.view.SurfaceControl$Transaction.hide (SurfaceControl.java:3397)
android.view.InsetsSourceConsumer.applyRequestedVisibilityToControl (InsetsSourceConsumer.java:435)
android.view.InsetsController.onControlsChanged (InsetsController.java:1067)
android.view.ViewRootImpl.handleInsetsControlChanged (ViewRootImpl.java:2795)
... (rest of stack trace)
I’m using Unity 6.3 LTS with Auto Graphics API (Vulkan and OpenGL), minimum API level 29 (Android 10.0) and Target API level 35(Android 15.0).
I’m not using any native Android UI code, but I do have some ad mediation integrations.Also, the crash is happening after session start, on first screen view. It's probably on the splash screen of my game.
My question:
What is causing this Surface error?
Has anyone else encountered this issue in Unity?
Are there recommended approaches to prevent or handle this crash?
Any insights would be appreciated.