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

Crash - TimelineViewModel.<init> NullPointerException #5611

Closed
ouchadam opened this issue Mar 23, 2022 · 0 comments · Fixed by #6978
Closed

Crash - TimelineViewModel.<init> NullPointerException #5611

ouchadam opened this issue Mar 23, 2022 · 0 comments · Fixed by #6978
Assignees
Labels
A-Timeline O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems Z-Crash

Comments

@ouchadam
Copy link
Contributor

ouchadam commented Mar 23, 2022

java.lang.RuntimeException: 
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:610)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:967)
Caused by: java.lang.reflect.InvocationTargetException: 
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:600)
Caused by: java.lang.reflect.InvocationTargetException: 
  at java.lang.reflect.Method.invoke (Native Method)
  at com.airbnb.mvrx.MavericksFactory.create (MavericksFactory.kt:12)
  at com.airbnb.mvrx.MavericksViewModelProvider.get$default (MavericksViewModelProvider.kt:34)
  at im.vector.app.features.home.room.detail.TimelineFragment$special$$inlined$fragmentViewModel$default$1.invoke (MavericksExtensions.kt:10)
  at im.vector.app.features.home.room.detail.TimelineFragment$special$$inlined$fragmentViewModel$default$1.invoke (MavericksExtensions.kt:1)
  at com.airbnb.mvrx.DefaultViewModelDelegateFactory$createLazyViewModel$1.invoke (ViewModelDelegateProvider.kt:2)
  at com.airbnb.mvrx.DefaultViewModelDelegateFactory$createLazyViewModel$1.invoke (ViewModelDelegateProvider.kt:1)
  at com.airbnb.mvrx.lifecycleAwareLazy.getValue (lifecycleAwareLazy.kt:5)
  at com.airbnb.mvrx.lifecycleAwareLazy$initializeWhenCreated$1.onCreate (lifecycleAwareLazy.kt:1)
  at androidx.lifecycle.FullLifecycleObserverAdapter.onStateChanged (FullLifecycleObserverAdapter.java:8)
  at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent (LifecycleRegistry.java:3)
  at androidx.lifecycle.LifecycleRegistry.sync (LifecycleRegistry.java:45)
  at androidx.lifecycle.LifecycleRegistry.moveToState (LifecycleRegistry.java:5)
  at androidx.lifecycle.LifecycleRegistry.handleLifecycleEvent (LifecycleRegistry.java:2)
  at androidx.fragment.app.Fragment.performCreate (Fragment.java:9)
  at androidx.fragment.app.FragmentStateManager.create (FragmentStateManager.java:5)
  at androidx.fragment.app.FragmentStateManager.moveToExpectedState (FragmentStateManager.java:28)
  at androidx.fragment.app.FragmentManager.executeOpsTogether (FragmentManager.java:122)
  at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute (FragmentManager.java:9)
  at androidx.fragment.app.FragmentManager.execPendingActions (FragmentManager.java:14)
  at androidx.fragment.app.FragmentManager.dispatchStateChange (FragmentManager.java:10)
  at androidx.fragment.app.FragmentActivity.onStart (FragmentActivity.java:12)
  at androidx.appcompat.app.AppCompatActivity.onStart (AppCompatActivity.java:1)
  at android.app.Instrumentation.callActivityOnStart (Instrumentation.java:1436)
  at android.app.Activity.performStart (Activity.java:8140)
  at android.app.ActivityThread.handleStartActivity (ActivityThread.java:3505)
  at android.app.servertransaction.TransactionExecutor.performLifecycleSequence (TransactionExecutor.java:221)
  at android.app.servertransaction.TransactionExecutor.cycleToPath (TransactionExecutor.java:201)
  at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:173)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:97)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2104)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loop (Looper.java:236)
  at android.app.ActivityThread.main (ActivityThread.java:7861)
Caused by: java.lang.NullPointerException: 
  at im.vector.app.features.home.room.detail.TimelineViewModel.<init> (TimelineViewModel.kt:18)
  at im.vector.app.DaggerVectorApplication_HiltComponents_SingletonC$MavericksViewModelCImpl$SwitchingProvider$86.create (DaggerVectorApplication_HiltComponents_SingletonC.java:14)
  at im.vector.app.core.di.HiltMavericksViewModelFactory.create (HiltMavericksViewModelFactory.kt:6)
  at im.vector.app.features.home.room.detail.TimelineViewModel$Companion.create (Unknown Source:12)
  at im.vector.app.features.home.room.detail.TimelineViewModel$Companion.create (TimelineViewModel.kt:1)
Occurrences (30 days) Affected users
634 415

https://play.google.com/console/u/0/developers/{redacted}/app/{redacted}/vitals/crashes/58bec65f/details?installedFrom=PLAY_STORE&days=30

NullPointerException thrown when force unwrapping the Room returns null https://github.com/vector-im/element-android/blob/develop/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineViewModel.kt#L149

@ouchadam ouchadam added T-Defect Something isn't working: bugs, crashes, hangs and other reported problems Z-Crash A-Timeline S-Major Severely degrades major functionality or product features, with no satisfactory workaround O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Mar 23, 2022
@ouchadam ouchadam added O-Occasional Affects or can be seen by some users regularly or most users rarely and removed O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Mar 23, 2022
@bmarty bmarty self-assigned this Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Timeline O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems Z-Crash
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants