element-hq / element-android

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

Leaving DM leaks window due to Dialog #4713

Closed ouchadam closed 2 years ago

ouchadam commented 2 years ago

Steps to reproduce

  1. Open a DM and "leave"

Outcome

What did you expect?

No errors in the logs

What happened instead?

No crash but the logs display...

2021-12-14 17:50:34.543 6553-6553/im.vector.app.debug E/WindowManager: android.view.WindowLeaked: Activity im.vector.app.features.roomprofile.RoomProfileActivity has leaked window DecorView@2978712[RoomProfileActivity] that was originally added here
        at android.view.ViewRootImpl.<init>(ViewRootImpl.java:629)
        at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:377)
        at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:96)
        at android.app.Dialog.show(Dialog.java:344)
        at androidx.appcompat.app.AlertDialog$Builder.show(AlertDialog.java:1009)
        at im.vector.lib.ui.styles.dialogs.MaterialProgressDialog.show(MaterialProgressDialog.kt:35)
        at im.vector.lib.ui.styles.dialogs.MaterialProgressDialog.show$default(MaterialProgressDialog.kt:27)
        at im.vector.app.core.platform.VectorBaseFragment.showLoadingDialog(VectorBaseFragment.kt:203)
        at im.vector.app.core.platform.VectorBaseFragment.showLoading(VectorBaseFragment.kt:143)
        at im.vector.app.features.roomprofile.RoomProfileFragment$onViewCreated$1.invoke(RoomProfileFragment.kt:120)
        at im.vector.app.features.roomprofile.RoomProfileFragment$onViewCreated$1.invoke(RoomProfileFragment.kt:118)
        at im.vector.app.core.platform.VectorBaseFragment$observeViewEvents$1.invokeSuspend(VectorBaseFragment.kt:233)
        at im.vector.app.core.platform.VectorBaseFragment$observeViewEvents$1.invoke(Unknown Source:8)
        at im.vector.app.core.platform.VectorBaseFragment$observeViewEvents$1.invoke(Unknown Source:4)
        at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2.emit(Collect.kt:136)
        at kotlinx.coroutines.flow.SharedFlowImpl.collect(SharedFlow.kt:351)
        at kotlinx.coroutines.flow.SharedFlowImpl$collect$1.invokeSuspend(Unknown Source:15)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:234)
        at kotlinx.coroutines.DispatchedTaskKt.resumeUnconfined(DispatchedTask.kt:190)
        at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:161)
        at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:397)
        at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:431)
        at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:420)
        at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:328)
        at kotlinx.coroutines.flow.SharedFlowImpl.tryEmit(SharedFlow.kt:368)
        at im.vector.app.core.utils.PublishDataSource.post(DataSource.kt:62)
        at im.vector.app.features.roomprofile.RoomProfileViewModel.handleLeaveRoom(RoomProfileViewModel.kt:168)
        at im.vector.app.features.roomprofile.RoomProfileViewModel.handle(RoomProfileViewModel.kt:118)
        at im.vector.app.features.roomprofile.RoomProfileFragment.onLeaveRoomClicked$lambda-5(RoomProfileFragment.kt:288)
        at im.vector.app.features.roomprofile.RoomProfileFragment.$r8$lambda$qKY2s3lU7UtkhqKTxJVNbjEdGjE(Unknown Source:0)
        at im.vector.app.features.roomprofile.RoomProfileFragment$$ExternalSyntheticLambda1.onClick(Unknown Source:2)
        at androidx.appcompat.app.AlertController$ButtonHandler.handleMessage(AlertController.java:167)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:224)
        at android.app.ActivityThread.main(ActivityThread.java:7562)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)

Your phone model

Pocofone f1

Operating system version

android 10 (MIUI 12.0.3.0)

Application version and app store

1.3.10 RC

Homeserver

matrix.org

Will you send logs?

No

bmarty commented 2 years ago

Fixed in EA 1.3.11