element-hq / element-android

A Matrix collaboration client for Android.
https://element.io/
GNU Affero General Public License v3.0
3.34k stars 711 forks source link

Crash when opening home activity #4980

Closed zhaofengli closed 2 years ago

zhaofengli commented 2 years ago

Steps to reproduce

Matrix crashes when I open the home activity through the launcher icon. However, if I open a room directly through a notification, it doesn't crash.

01-18 10:35:43.245 31834 31834 E AndroidRuntime: FATAL EXCEPTION: main
01-18 10:35:43.245 31834 31834 E AndroidRuntime: Process: im.vector.app, PID: 31834
01-18 10:35:43.245 31834 31834 E AndroidRuntime: com.airbnb.epoxy.IllegalEpoxyUsage: You must set an id on a model before adding it. Use the @AutoModel annotation if you want an id to be automatically generated for you.
01-18 10:35:43.245 31834 31834 E AndroidRuntime:    at com.airbnb.epoxy.EpoxyController.addInternal(EpoxyController.java:8)
01-18 10:35:43.245 31834 31834 E AndroidRuntime:    at com.airbnb.epoxy.EpoxyModel.addTo(EpoxyModel.java:1)
01-18 10:35:43.245 31834 31834 E AndroidRuntime:    at com.airbnb.epoxy.EpoxyController.add(EpoxyController.java:1)
01-18 10:35:43.245 31834 31834 E AndroidRuntime:    at im.vector.app.features.spaces.SpaceSummaryController.buildModels(SpaceSummaryController.kt:11)
01-18 10:35:43.245 31834 31834 E AndroidRuntime:    at com.airbnb.epoxy.EpoxyController$1.run(EpoxyController.java:6)
01-18 10:35:43.245 31834 31834 E AndroidRuntime:    at com.airbnb.epoxy.EpoxyController.requestModelBuild(EpoxyController.java:4)
01-18 10:35:43.245 31834 31834 E AndroidRuntime:    at im.vector.app.features.spaces.SpaceSummaryController.update(SpaceSummaryController.kt:2)
01-18 10:35:43.245 31834 31834 E AndroidRuntime:    at im.vector.app.features.spaces.SpaceListFragment$invalidate$1.invoke(SpaceListFragment.kt:5)
01-18 10:35:43.245 31834 31834 E AndroidRuntime:    at im.vector.app.features.spaces.SpaceListFragment$invalidate$1.invoke(SpaceListFragment.kt:1)
01-18 10:35:43.245 31834 31834 E AndroidRuntime:    at com.airbnb.mvrx.StateContainerKt.withState(StateContainer.kt:1)
01-18 10:35:43.245 31834 31834 E AndroidRuntime:    at im.vector.app.features.spaces.SpaceListFragment.invalidate(SpaceListFragment.kt:1)
01-18 10:35:43.245 31834 31834 E AndroidRuntime:    at com.airbnb.mvrx.MavericksViewKt$$ExternalSyntheticLambda0.handleMessage(Unknown Source:4)
01-18 10:35:43.245 31834 31834 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:102)
01-18 10:35:43.245 31834 31834 E AndroidRuntime:    at android.os.Looper.loopOnce(Looper.java:201)
01-18 10:35:43.245 31834 31834 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:288)
01-18 10:35:43.245 31834 31834 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:7842)
01-18 10:35:43.245 31834 31834 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
01-18 10:35:43.245 31834 31834 E AndroidRuntime:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
01-18 10:35:43.245 31834 31834 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
01-18 10:35:43.264  1808  2289 I DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2
01-18 10:35:43.264  1808  3879 W ActivityTaskManager:   Force finishing activity im.vector.app/.features.home.HomeActivity

Outcome

What did you expect?

I can open the app normally.

What happened instead?

It crashed.

Your phone model

Pixel 3

Operating system version

Android 12.0

Application version and app store

Element 1.3.14 from Play Store Element 1.3.15 from Play Store

Homeserver

zhaofeng.li (Synapse 1.49.2)

Will you send logs?

Yes

zhaofengli commented 2 years ago

No longer reproducible on 1.3.15.

zhaofengli commented 2 years ago

Well, the crash has come back. Looking at the commit history there has been no related change so this is still an issue.

zhaofengli commented 2 years ago

Let me create a new issue since this is unlikely to be looked at in the "Closed" project.