Crash on end of zoom meeting

Description
We have integrated the Zoom Android SDK in our app.
Crash (inconsistent) happens on a participant’s device after a host ends the meeting.

See stacktrace from Zoom Android SDK:

10-28 17:38:13.422: e.b.a.p0.a: FATAL EXCEPTION: main
    Process: com.azeus.anywherepad, PID: 31330
    java.lang.NullPointerException: Attempt to invoke virtual method 'long com.zipow.videobox.confapp.CmmUser.getNodeId()' on a null object reference
    at us.zoom.sdk.InMeetingWaitingRoomControllerImpl.sinkUserEvent(SourceFile:136)
    at us.zoom.sdk.InMeetingWaitingRoomControllerImpl.access$000(SourceFile:18)
    at us.zoom.sdk.InMeetingWaitingRoomControllerImpl$1$2.run(SourceFile:38)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:237)
    at android.app.ActivityThread.main(ActivityThread.java:8167)
    at java.lang.reflect.Method.invoke(Method.java:-2)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)

Sample timeline based on participant’s logs:

  1. 17:37:11: MeetingServiceListener.onMeetingStatusChanged() was invoked with a MeetingStatus value of MEETING_STATUS_INMEETING = so participant was still in the meeting room
  2. 17:38:12.851 = Participant received a signal that host ended the meeting.
  3. Between 17:38:12:880-17:38:13:092, participant app called MeetingService.leaveCurrentMeeting(false) since participant was told to exit the meeting
  4. 17:38:13.091: MeetingServiceListener.onMeetingStatusChanged()was invoked with a MeetingStatus value of MEETING_STATUS_DISCONNECTING= so user was disconnected.
  5. 17:38:13.422 = crash occurred

Which version?
5.0.24437.0708

To Reproduce(If applicable)

  1. Start video conference as a host.
  2. Participant joins the conference.
  3. Host ends the video conference

Screenshots
No screenshots for crash.

Smartphone (please complete the following information):

  • Device: Samsung Galaxy Tab A 8.0 (SM-T295)
  • OS: Android 10

Additional context
Is it possible that the user was already removed, but because the CmmUser.getNodeId() was called in a posted runnable, and the SDK did not not all runnables of that handler, thus the crash? Would you suggest a workaround is to clear the handler SDKMainHandler.getInstance().removeCallbacks(null);?

Thanks

Hi @AnypadDev, thanks for using our SDK.

Sorry to hear you’re running into this crash. Based on the information you have provided, it seems that you were both ending the meeting for all users on the host device and leaving the meeting on the participant’s device. Am I correctly understanding that?

Thanks!

Hi @jon.lieblich

Further investigation found a more appropriate steps:

  1. Host starts an video conference, with waiting room enabled.
  2. At least one or more participants entered waiting room.
  3. Just when the participant enters the waiting room, Host ends video conference.

And only host get crash.

Not that it is not always replicable because of race condition, but it is still easy to get crash. I read the decompiled source code and cannot find any related information about neither removing the runnable from the SDKMainHandler.getInstance() after being disconnected nor disconnected checking before directly checking the node id.

Please help check the replication steps above and provide a fix on it if possible. Thanks.

Hi @AnypadDev, thanks for the additional info.

I still have been unable to reproduce this crash after many attempts. Are you able to reproduce this in our sample app?

Thanks!

Are you able to reproduce this in our sample app?

Not yet. We could only reproduce a different crash after modifying MyMeetingActivity.leave(boolean) to call mInMeetingService.leaveCurrentMeeting(end); in a background thread, and adding a delay.

Actually, I want to ask:

  1. Should we be using InMeetingService.leaveCurrentMeeting(boolean) or MeetingService.leaveCurrentMeeting(boolean)?
  2. Can we call leaveCurrentMeeting() in a background thread?

Thanks

Hi @AnypadDev, thanks for the info.

This is likely being caused by you calling that method from a background thread. Are you able to reproduce this on your end if you call the method from the main thread?

Thanks!

Thanks. Seems the issue is no longer encountered after calling that method in the UI/main thread. We still retained to use MeetingService.leaveCurrentMeeting() and not InMeetingService.leaveCurrentMeeting()

It would help for the developers if the documentation mentioned which thread the SDK methods/callbacks should be called or will be called.

Thanks!

We can close this ticket.