Skip to content
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

NPE (initMessageHolders (ChatActivity.kt:1424)) #3891

Open
mahibi opened this issue May 3, 2024 · 0 comments
Open

NPE (initMessageHolders (ChatActivity.kt:1424)) #3891

mahibi opened this issue May 3, 2024 · 0 comments
Labels
1. to develop Accepted and waiting to be taken care of (should be only set by nextcloud employees) bug Something isn't working
Milestone

Comments

@mahibi
Copy link
Collaborator

mahibi commented May 3, 2024

Steps to reproduce

Copied from Google play console. could not yet reproduce it & may occur randomly

Expected behaviour

no crash

Actual behaviour

Exception java.lang.NullPointerException:
  at com.nextcloud.talk.chat.ChatActivity.initMessageHolders (ChatActivity.kt:1424)
  at com.nextcloud.talk.chat.ChatActivity.initAdapter (ChatActivity.kt:1364)
  at com.nextcloud.talk.chat.ChatActivity.access$initAdapter (ChatActivity.kt:250)
  at com.nextcloud.talk.chat.ChatActivity$initObservers$2.invoke (ChatActivity.kt:686)
  at com.nextcloud.talk.chat.ChatActivity$initObservers$2.invoke (ChatActivity.kt:670)
  at com.nextcloud.talk.chat.ChatActivity$sam$androidx_lifecycle_Observer$0.onChanged
  at androidx.lifecycle.LiveData.considerNotify (LiveData.java:133)
  at androidx.lifecycle.LiveData.dispatchingValue (LiveData.java:146)
  at androidx.lifecycle.LiveData$ObserverWrapper.activeStateChanged (LiveData.java:483)
  at androidx.lifecycle.LiveData$LifecycleBoundObserver.onStateChanged (LiveData.java:440)
  at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent (LifecycleRegistry.kt:322)
  at androidx.lifecycle.LifecycleRegistry.forwardPass (LifecycleRegistry.kt:258)
  at androidx.lifecycle.LifecycleRegistry.sync (LifecycleRegistry.kt:294)
  at androidx.lifecycle.LifecycleRegistry.moveToState (LifecycleRegistry.kt:143)
  at androidx.lifecycle.LifecycleRegistry.handleLifecycleEvent (LifecycleRegistry.kt:126)
  at androidx.lifecycle.ReportFragment$Companion.dispatch$lifecycle_runtime_release (ReportFragment.kt:190)
  at androidx.lifecycle.ReportFragment$LifecycleCallbacks.onActivityPostStarted (ReportFragment.kt:119)
  at android.app.Activity.dispatchActivityPostStarted (Activity.java:1506)
  at android.app.Activity.performStart (Activity.java:9047)
  at android.app.ActivityThread.handleStartActivity (ActivityThread.java:4198)
  at android.app.servertransaction.TransactionExecutor.performLifecycleSequence (TransactionExecutor.java:225)
  at android.app.servertransaction.TransactionExecutor.cycleToPath (TransactionExecutor.java:205)
  at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:177)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:98)
  at android.app.ClientTransactionHandler.executeTransaction (ClientTransactionHandler.java:68)
  at android.app.ActivityThread.handleRelaunchActivityLocally (ActivityThread.java:6454)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2695)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loopOnce (Looper.java:230)
  at android.os.Looper.loop (Looper.java:319)
  at android.app.ActivityThread.main (ActivityThread.java:8919)
  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:1103)

It seems like currentConversation is null in

val payload = MessagePayload(
    roomToken,
    ConversationUtils.isParticipantOwnerOrModerator(currentConversation!!),
    profileBottomSheet
)

but i have no idea how it could be null at this point. The code that leads here is only executed in GetCapabilitiesSuccessState, which in turn is only triggered by GetRoomSuccessState which sets the currentConversation.

Nextcloud Talk app version

19.0.0

@mahibi mahibi added bug Something isn't working 0. Needs triage 1. to develop Accepted and waiting to be taken care of (should be only set by nextcloud employees) and removed 0. Needs triage labels May 3, 2024
@mahibi mahibi modified the milestones: 19.0.1, 19.0.2 May 22, 2024
@AndyScherzinger AndyScherzinger modified the milestones: 19.0.2, 19.1.0 Jul 24, 2024
@mahibi mahibi modified the milestones: 19.1.0, 20.0.1, 20.0.2 Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of (should be only set by nextcloud employees) bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants