Skip to content

Menu popup leaks when the activity finishes with the menu open (WindowLeaked) #205

Closed

Description

@compot-dev

From a tester's log (OPPO CPH2725, Android 15, toy test build 8aaf666, #187):

E WindowManager: android.view.WindowLeaked: Activity com.openipc.decoder.Decoder has leaked window android.widget.PopupWindow$PopupDecorView{… 0,0-688,264 …}
  at android.widget.PopupWindow.showAtLocation(PopupWindow.java:1322)
  at a.w1.j(…)                    → MenuManager (show the menu)
  at a.o0.onSingleTapConfirmed(…) → Decoder$5 (a tap on the picture)

(retraced with that build's mapping.txt)

The activity finished while the menu popup was still showing, for example after Exit in the menu or Back. It isn't a crash: Android removes the window and logs the leak. But the popup should be dismissed before the activity goes away.

Fix: dismiss the menu popup in onDestroy (and before finish() from Exit); check the Reset dialog the same way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingin progressBeing worked on right now (open PR)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions