App becomes unresponsive after closing from recent apps while session is running

Description
App becomes unresponsive after closing from recent apps while session is running. Even after calling leaveMeeting onDestroy the app hangs and doesn’t response.
Below are the logs generated when app hangs.

I mali_winsys: delete_surface() [1080x2322] return I System.out: (HTTPLog)-Static: isSBSettingEnabled false I System.out: (HTTPLog)-Static: isSBSettingEnabled false I marycare.melod: Thread[6,tid=31265,WaitingInMainSignalCatcherLoop,Thread*=0x6e55fe99a0,peer=0x13ac3558,"Signal Catcher"]: reacting to signal 3 07-12 17:45:31.004 21285 31265 I marycare.melod: I marycare.melod: Wrote stack traces to tombstoned

Which Android Client SDK version?
zoom-sdk-android-5.5.1.1319

To Reproduce(If applicable)
Steps to reproduce the behavior:

  • Open app, initialise SDK, login user.
  • Start meeting.
  • Close app from recent apps.

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: Samsung Galaxy S20
  • OS: Android 11

Additional context

@Override
`

protected void onDestroy() {
    Log.i(TAG, "onDestroy");
    MeetingService meetingService = ZoomSDK.getInstance().getMeetingService();
            if (meetingService == null) {
                return;
            }
            Log.i(TAG, "leaveMeeting getMeetingStatus: " + meetingService.getMeetingStatus() + " isCurrentMeetingHost: " + meetingService.isCurrentMeetingHost());
            if (meetingService.getMeetingStatus() == MeetingStatus.MEETING_STATUS_INMEETING) {                    
                meetingService.leaveCurrentMeeting(meetingService.isCurrentMeetingHost());
            }
        }
    super.onDestroy();
}`

Hi @taher.lakdawala, thanks for the post.

Are you able to reproduce this in the sample app? I’ve tried with 2 different Samsung devices (S21 Ultra and Tab S7) with Android 11 on the latest SDK version but have not seen any ANR dialogs or logs otherwise indicating something went wrong.

Thanks!

No not in sample app. We have integrated SDK with customized ui enabled in our app which is built in Qt cpp and for Java calls we are using JNI. The problem is if we want to call any API through JNI we have to change these to ui thread using runOnUiThread. And onDestroy even though it is in UI thread after leave meeting it is not getting killed. Is it something we are missing?

Hi @taher.lakdawala,

Thanks for confirming that it is not reproducible in the sample app.

I strongly doubt that this is an issue of the SDK being called from the wrong thread, since that would throw an exception instead of causing the app to hang.

At what point relative to the meeting’s state are you seeing the onDestroy callback of your Activity invoked?

Thanks!

When meeting state is MEETING_STATUS_INMEETING when app is getting killed from recent apps.