-
-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix? NPE for currentUser in ConversationList #4443
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
On gplay console this was reported (not often). It looks like currentUser could be null when getRoomsFlow is updated. Maybe for some cases initialization was too late in onResume, so moved to onCreate. Not reproduced/tested though. Exception java.lang.NullPointerException: at com.nextcloud.talk.conversationlist.ConversationsListActivity.addToConversationItems (ConversationsListActivity.kt:837) at com.nextcloud.talk.conversationlist.ConversationsListActivity.access$addToConversationItems (ConversationsListActivity.kt:149) at com.nextcloud.talk.conversationlist.ConversationsListActivity$initObservers$5$1.invokeSuspend (ConversationsListActivity.kt:379) at com.nextcloud.talk.conversationlist.ConversationsListActivity$initObservers$5$1.invoke (Unknown Source:8) at com.nextcloud.talk.conversationlist.ConversationsListActivity$initObservers$5$1.invoke (Unknown Source:4) at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2.emit (Emitters.kt:219) at kotlinx.coroutines.flow.FlowKt__ErrorsKt$catchImpl$2.emit (Errors.kt:154) at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2.emit (Emitters.kt:220) at kotlinx.coroutines.flow.SharedFlowImpl.collect$suspendImpl (SharedFlow.kt:392) at kotlinx.coroutines.flow.SharedFlowImpl.collect (Unknown Source) at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.collect (SafeCollector.common.kt:112) at kotlinx.coroutines.flow.FlowKt__ErrorsKt.catchImpl (Errors.kt:152) at kotlinx.coroutines.flow.FlowKt.catchImpl (Unknown Source:1) at kotlinx.coroutines.flow.FlowKt__ErrorsKt$catch$$inlined$unsafeFlow$1.collect (SafeCollector.common.kt:112) at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.collect (SafeCollector.common.kt:112) at kotlinx.coroutines.flow.FlowKt__CollectKt.collect (Collect.kt:26) at kotlinx.coroutines.flow.FlowKt.collect (Unknown Source:1) at com.nextcloud.talk.conversationlist.ConversationsListActivity$initObservers$5.invokeSuspend (ConversationsListActivity.kt:396) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33) at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith (DispatchedContinuation.kt:363) at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable (Cancellable.kt:26) at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable$default (Cancellable.kt:21) at kotlinx.coroutines.CoroutineStart.invoke (CoroutineStart.kt:88) at kotlinx.coroutines.AbstractCoroutine.start (AbstractCoroutine.kt:123) at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch (Builders.common.kt:52) at kotlinx.coroutines.BuildersKt.launch (Unknown Source:1) at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default (Builders.common.kt:43) at kotlinx.coroutines.BuildersKt.launch$default (Unknown Source:1) at com.nextcloud.talk.conversationlist.ConversationsListActivity.initObservers (ConversationsListActivity.kt:372) at com.nextcloud.talk.conversationlist.ConversationsListActivity.onCreate (ConversationsListActivity.kt:246) at android.app.Activity.performCreate (Activity.java:8595) at android.app.Activity.performCreate (Activity.java:8573) at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1475) at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3855) at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:4013) at android.app.ActivityThread.handleRelaunchActivityInner (ActivityThread.java:6056) at android.app.ActivityThread.handleRelaunchActivity (ActivityThread.java:5952) at android.app.servertransaction.ActivityRelaunchItem.execute (ActivityRelaunchItem.java:76) at android.app.servertransaction.ActivityTransactionItem.execute (ActivityTransactionItem.java:45) at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:139) at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:96) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2514) at android.os.Handler.dispatchMessage (Handler.java:106) at android.os.Looper.loopOnce (Looper.java:232) at android.os.Looper.loop (Looper.java:334) at android.app.ActivityThread.main (ActivityThread.java:8293) at java.lang.reflect.Method.invoke at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:578) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1053) Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/4443-talk.apk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
see commit message
🏁 Checklist
/backport to stable-xx.x