-
-
Notifications
You must be signed in to change notification settings - Fork 250
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 in restoreMessageQueue #4439
Merged
Merged
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
currentConversation was not yet initialized in ChatActivity. In the future this may be better handled via StateFlows. For now it's solved via arguments. Without the fix, this NPE appeared: Exception java.lang.RuntimeException: at android.app.ActivityThread.performResumeActivity (ActivityThread.java:4768) at android.app.ActivityThread.handleResumeActivity (ActivityThread.java:4801) at android.app.servertransaction.ResumeActivityItem.execute (ResumeActivityItem.java:54) at android.app.servertransaction.ActivityTransactionItem.execute (ActivityTransactionItem.java:45) at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:176) at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:97) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2215) at android.os.Handler.dispatchMessage (Handler.java:106) at android.os.Looper.loopOnce (Looper.java:346) at android.os.Looper.loop (Looper.java:475) at android.app.ActivityThread.main (ActivityThread.java:7889) at java.lang.reflect.Method.invoke at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1009) Caused by java.lang.NullPointerException: at com.nextcloud.talk.chat.MessageInputFragment.onResume (MessageInputFragment.kt:146) at androidx.fragment.app.Fragment.performResume (Fragment.java:3180) at androidx.fragment.app.FragmentStateManager.resume (FragmentStateManager.java:606) at androidx.fragment.app.FragmentStateManager.moveToExpectedState (FragmentStateManager.java:285) at androidx.fragment.app.FragmentStore.moveToExpectedState (FragmentStore.java:113) at androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:1433) at androidx.fragment.app.FragmentManager.dispatchStateChange (FragmentManager.java:2977) at androidx.fragment.app.FragmentManager.dispatchResume (FragmentManager.java:2909) at androidx.fragment.app.FragmentController.dispatchResume (FragmentController.java:285) at androidx.fragment.app.FragmentActivity.onResumeFragments (FragmentActivity.java:334) at androidx.fragment.app.FragmentActivity.onPostResume (FragmentActivity.java:323) at androidx.appcompat.app.AppCompatActivity.onPostResume (AppCompatActivity.java:245) at android.app.Activity.performResume (Activity.java:8215) at android.app.ActivityThread.performResumeActivity (ActivityThread.java:4758) Signed-off-by: Marcel Hibbe <[email protected]>
mahibi
force-pushed
the
bugfix/noid/fixNpeInRestoreMessageQueue
branch
from
November 13, 2024 13:08
1f29f58
to
f144b64
Compare
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/4439-talk.apk |
sowjanyakch
approved these changes
Nov 14, 2024
mahibi
added a commit
that referenced
this pull request
Nov 15, 2024
followup to PR #4439 Exception java.lang.NullPointerException: at com.nextcloud.talk.chat.MessageInputFragment.handleMessageQueue (MessageInputFragment.kt:251) at com.nextcloud.talk.chat.MessageInputFragment.access$handleMessageQueue (MessageInputFragment.kt:82) at com.nextcloud.talk.chat.MessageInputFragment$initObservers$4$1.invokeSuspend (MessageInputFragment.kt:192) at com.nextcloud.talk.chat.MessageInputFragment$initObservers$4$1.invoke (Unknown Source:12) at com.nextcloud.talk.chat.MessageInputFragment$initObservers$4$1.invoke (Unknown Source:8) at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2.emit (Emitters.kt:219) at kotlinx.coroutines.flow.FlowKt__ChannelsKt.emitAllImpl$FlowKt__ChannelsKt (Channels.kt:33) at kotlinx.coroutines.flow.FlowKt__ChannelsKt.access$emitAllImpl$FlowKt__ChannelsKt (Channels.kt:1) at kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend (Unknown Source:14) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:104) at android.os.Handler.handleCallback (Handler.java:938) at android.os.Handler.dispatchMessage (Handler.java:99) at android.os.Looper.loopOnce (Looper.java:241) at android.os.Looper.loop (Looper.java:342) at android.app.ActivityThread.main (ActivityThread.java:8128) at java.lang.reflect.Method.invoke at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:583) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1045) Signed-off-by: Marcel Hibbe <[email protected]>
This was referenced Nov 15, 2024
mahibi
added a commit
that referenced
this pull request
Nov 18, 2024
followup to PR #4439 Exception java.lang.NullPointerException: at com.nextcloud.talk.chat.MessageInputFragment.handleMessageQueue (MessageInputFragment.kt:251) at com.nextcloud.talk.chat.MessageInputFragment.access$handleMessageQueue (MessageInputFragment.kt:82) at com.nextcloud.talk.chat.MessageInputFragment$initObservers$4$1.invokeSuspend (MessageInputFragment.kt:192) at com.nextcloud.talk.chat.MessageInputFragment$initObservers$4$1.invoke (Unknown Source:12) at com.nextcloud.talk.chat.MessageInputFragment$initObservers$4$1.invoke (Unknown Source:8) at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2.emit (Emitters.kt:219) at kotlinx.coroutines.flow.FlowKt__ChannelsKt.emitAllImpl$FlowKt__ChannelsKt (Channels.kt:33) at kotlinx.coroutines.flow.FlowKt__ChannelsKt.access$emitAllImpl$FlowKt__ChannelsKt (Channels.kt:1) at kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend (Unknown Source:14) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:104) at android.os.Handler.handleCallback (Handler.java:938) at android.os.Handler.dispatchMessage (Handler.java:99) at android.os.Looper.loopOnce (Looper.java:241) at android.os.Looper.loop (Looper.java:342) at android.app.ActivityThread.main (ActivityThread.java:8128) at java.lang.reflect.Method.invoke at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:583) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1045) Signed-off-by: Marcel Hibbe <[email protected]>
backportbot bot
pushed a commit
that referenced
this pull request
Nov 18, 2024
followup to PR #4439 Exception java.lang.NullPointerException: at com.nextcloud.talk.chat.MessageInputFragment.handleMessageQueue (MessageInputFragment.kt:251) at com.nextcloud.talk.chat.MessageInputFragment.access$handleMessageQueue (MessageInputFragment.kt:82) at com.nextcloud.talk.chat.MessageInputFragment$initObservers$4$1.invokeSuspend (MessageInputFragment.kt:192) at com.nextcloud.talk.chat.MessageInputFragment$initObservers$4$1.invoke (Unknown Source:12) at com.nextcloud.talk.chat.MessageInputFragment$initObservers$4$1.invoke (Unknown Source:8) at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2.emit (Emitters.kt:219) at kotlinx.coroutines.flow.FlowKt__ChannelsKt.emitAllImpl$FlowKt__ChannelsKt (Channels.kt:33) at kotlinx.coroutines.flow.FlowKt__ChannelsKt.access$emitAllImpl$FlowKt__ChannelsKt (Channels.kt:1) at kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend (Unknown Source:14) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:104) at android.os.Handler.handleCallback (Handler.java:938) at android.os.Handler.dispatchMessage (Handler.java:99) at android.os.Looper.loopOnce (Looper.java:241) at android.os.Looper.loop (Looper.java:342) at android.app.ActivityThread.main (ActivityThread.java:8128) at java.lang.reflect.Method.invoke at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:583) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1045) Signed-off-by: Marcel Hibbe <[email protected]>
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 description
🏁 Checklist
/backport to stable-xx.x