Crash in ChanneViewModel

Hi!
I am getting this crash in production app.
It seems like collection inside ChannelViewModel is null, but you method hasNext() is called.

Please, check stuff for null since your SDK written in java. Everything happens asynchronically, but you don’t handle for null for some reason. I suggest using “@Nullable” annotation, it will help a lot

com.sendbird.uikit.vm.ChannelViewModel.hasNext (ChannelViewModel.java:192)
com.sendbird.uikit.vm.ChannelViewModel$2.onMessageReceived (ChannelViewModel.java:103)
com.sendbird.android.EventController$7.run (EventController.java:531)
com.sendbird.android.EventController$1.onResultForUiThread (EventController.java:155)
com.sendbird.android.EventController$1.onResultForUiThread (EventController.java:108)
com.sendbird.android.JobResultTask$callable$1$1.run (JobResultTask.kt:22)
android.os.Handler.handleCallback (Handler.java:938)
android.os.Handler.dispatchMessage (Handler.java:99)
android.os.Looper.loopOnce (Looper.java:201)
android.os.Looper.loop (Looper.java:288)
android.app.ActivityThread.main (ActivityThread.java:7839)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:548)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1003)

Hi @Vladislav_Karpman
Thank you for your reporting!

Did your log get NullPointerException?

Yes, I get NullPointerException

Okay. This issue will be fixed next release! Thank you!

1 Like