Hi Team,
I’m using the Zoom UI Toolkit (implementation 'us.zoom.uitoolkit:uitoolkit:2.1.10-1'
) to implement call functionality in my Android app, which is built using Kotlin and Jetpack Compose.
The issue I’m facing is that when the user clicks the “Leave Call” icon to exit a Zoom session, the UiToolkitView
is removed immediately as expected, but the app crashes 1–2 seconds later.
Here’s the crash log:
Process: org.brainhealth.bhp_android.dev, PID: 10736
java.lang.NullPointerException: Attempt to invoke interface method 'int us.zoom.sdk.ZoomVideoSDKShareHelper.stopShare()' on a null object reference
at us.zoom.uitoolkit.UiToolkitView.cleanup(UiToolkitView.kt:136)
at us.zoom.uitoolkit.UiToolkitView.access$cleanup(UiToolkitView.kt:30)
at us.zoom.uitoolkit.UiToolkitView$videoSdkListener$1.onSessionLeave(UiToolkitView.kt:70)
at us.zoom.internal.ZoomVideoSDKDelegateHelper$1$4.run(ZoomVideoSDKDelegateHelper.java:3)
at android.os.Handler.handleCallback(Handler.java:991)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8934)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)
Note: This NullPointerException
occurs after the onViewStopped()
method of the UiToolkitView.Listener
is triggered.
Could you please advise on what might be causing this crash and how to properly clean up or prevent it?
Thanks in advance!