NotificationMgr.java - NullPointerException

Description
Hello

For some users, null pointer exception is thrown possibly in notification manager. Below is the error from firebase crashanalytics.

Fatal Exception: java.lang.RuntimeException

Unable to resume activity {com.wise.app/com.zipow.videobox.IntegrationActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.zipow.videobox.b.isSDKMode()' on a null object reference

com.zipow.videobox.util.NotificationMgr.f (NotificationMgr.java)

Which version?
zoom-sdk-android-5.4.3.603

Smartphone (please complete the following information):
Happening on multiple devices

Please let me know if anything needs to be done to avoid this crash.

Hi @ravi8x, thanks for using the dev forum.

I’m assuming that this is happening in production, but have you had any luck in being able to reproduce this crash?

Additionally if you could provide the full stack trace from the crash logs that would be helpful.

Thanks!

Hello @jon.lieblich

I tried to reproduce it on the devices I have but I couldn’t produce the issue again. But lot of people using the app are facing this issue.

Below is full stack I could get from firebase.

Caused by java.lang.NullPointerException

Attempt to invoke virtual method ‘boolean com.zipow.videobox.b.isSDKMode()’ on a null object reference

com.zipow.videobox.util.NotificationMgr.f

com.zipow.videobox.util.NotificationMgr.f (NotificationMgr.java)

com.zipow.videobox.IntegrationActivity.onResume (IntegrationActivity.java)

android.app.Instrumentation.callActivityOnResume (Instrumentation.java:1287)

android.app.Activity.performResume (Activity.java:7015)

android.app.ActivityThread.performResumeActivity (ActivityThread.java:4210)

android.app.ActivityThread.handleResumeActivity (ActivityThread.java:4323)

android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3426)

android.app.ActivityThread.access$1100 (ActivityThread.java:229)

android.app.ActivityThread$H.handleMessage (ActivityThread.java:1821)

android.os.Handler.dispatchMessage (Handler.java:102)

android.os.Looper.loop (Looper.java:148)

android.app.ActivityThread.main (ActivityThread.java:7325)

java.lang.reflect.Method.invoke (Method.java)

com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1230)

com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120)

Hi @ravi8x,

Thanks for providing the logs. This should give us enough information to begin looking into this. I will be sure to let you know as soon as we have an update or require additional information.

Thanks!

Hi @ravi8x,

Looking into this further, it seems that this could only happen when the SDK is not initialized soon enough. It is likely that there is a race condition somewhere in your app that results in attempting to use the SDK before receiving a successful initialization callback.

Thanks!