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 - NullPointerException - TimelineViewModel.<init> #6875

Closed
ouchadam opened this issue Aug 18, 2022 · 1 comment
Closed

Crash - NullPointerException - TimelineViewModel.<init> #6875

ouchadam opened this issue Aug 18, 2022 · 1 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

Comments

@ouchadam
Copy link
Contributor

Caused by java.lang.NullPointerException:
  at im.vector.app.features.home.room.detail.TimelineViewModel.<init> (TimelineViewModel.kt:23)
Exception java.lang.RuntimeException:
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:4035)
  at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:4201)
  at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:103)
  at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:135)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:95)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2438)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loopOnce (Looper.java:226)
  at android.os.Looper.loop (Looper.java:313)
  at android.app.ActivityThread.main (ActivityThread.java:8663)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:567)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1135)
Caused by java.lang.reflect.InvocationTargetException:
  at java.lang.reflect.Method.invoke
  at com.airbnb.mvrx.MavericksFactory.create (MavericksFactory.kt:12)
  at androidx.lifecycle.ViewModelProvider$Factory$-CC.$default$create (ViewModelProvider.kt:2)
  at com.airbnb.mvrx.MavericksViewModelProvider.get$default (MavericksViewModelProvider.kt:39)
  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:7)
  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.moveToState (FragmentManager.java:8)
  at androidx.fragment.app.FragmentManager.dispatchStateChange (FragmentManager.java:5)
  at androidx.fragment.app.FragmentManager.dispatchCreate (FragmentManager.java:5)
  at androidx.fragment.app.FragmentActivity.onCreate (FragmentActivity.java:4)
  at im.vector.app.core.platform.VectorBaseActivity.onCreate (VectorBaseActivity.kt:9)
  at im.vector.app.features.home.room.detail.RoomDetailActivity.onCreate (RoomDetailActivity.kt:1)
  at android.app.Activity.performCreate (Activity.java:8290)
  at android.app.Activity.performCreate (Activity.java:8270)
  at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1329)
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:4009)
Caused by java.lang.NullPointerException:
  at im.vector.app.features.home.room.detail.TimelineViewModel.<init> (TimelineViewModel.kt:23)
  at im.vector.app.DaggerVectorApplication_HiltComponents_SingletonC$MavericksViewModelCImpl$SwitchingProvider$89.create (DaggerVectorApplication_HiltComponents_SingletonC.java:25)
  at im.vector.app.core.di.HiltMavericksViewModelFactory.create (HiltMavericksViewModelFactory.kt:6)
  at im.vector.app.features.home.room.detail.TimelineViewModel$Companion.create
  at im.vector.app.features.home.room.detail.TimelineViewModel$Companion.create (TimelineViewModel.kt:1)

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

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

@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-Occasional Affects or can be seen by some users regularly or most users rarely labels Aug 18, 2022
@ouchadam
Copy link
Contributor Author

closed as a dupe of #5611

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

No branches or pull requests

1 participant