Skip to content

Android: Crash if switching between cameras without first stopping the camera preview #57

@jasells

Description

@jasells

tested on Android 13 (Pixel 4) + Android 15 (Samsung Galaxy-S24)
On current main, if I switch between cameras enough, eventually (swap cams 2-3x at most) I will get this:

[Parcel] Expecting binder but got null!
[ProfileInstaller] Installing profile for com.companyname.camera.maui.test
[OpenGLRenderer] endAllActiveAnimators on 0xb4000077d17b13f0 (AlertController$RecycleListView) with handle 0xb4000076e1ce6d40
[Parcel] Expecting binder but got null!
[OpenGLRenderer] endAllActiveAnimators on 0xb4000077d17bc830 (AlertController$RecycleListView) with handle 0xb4000076e1cf09a0
[Parcel] Expecting binder but got null!
[OpenGLRenderer] endAllActiveAnimators on 0xb4000077d17c0f00 (AlertController$RecycleListView) with handle 0xb4000076e1cf8b30
[Parcel] Expecting binder but got null!
[amera.maui.test] java_vm_ext.cc:616] JNI DETECTED ERROR IN APPLICATION: JNI ERROR (app bug): jobject is an invalid global reference: 0x6b72 (deleted reference at index 859)
[amera.maui.test] java_vm_ext.cc:616]     in call to DeleteGlobalRef
[amera.maui.test] java_vm_ext.cc:616]     from void androidx.appcompat.app.AlertDialog_IDialogInterfaceOnClickListenerImplementor.n_onClick(android.content.DialogInterface, int)
[amera.maui.test] runtime.cc:709] Runtime aborting...

In the repo's test app: tap Stop Camera btn before switching cameras will avoid this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions