Skip to content

Crash when an embedded Android view tries to add a popup window #20714

@amirh

Description

@amirh

The popup is being added to the global window manager which fails (trace below).
Proposed workaround is to not delegate addView/removeView to the global window manager but handle it ourselves.

08-16 12:41:31.863  6285  6646 W WindowManager: Attempted to add window to a display that does not exist: 171.  Aborting.                                                                                          
08-16 12:41:31.864 10411 10411 W System.err: android.view.WindowManager$InvalidDisplayException: Unable to add window android.view.ViewRootImpl$W@a19617 -- the specified display can not be found                 
08-16 12:41:31.864 10411 10411 W System.err:    at android.view.ViewRootImpl.setView(ViewRootImpl.java:793)                                                                                                        
08-16 12:41:31.864 10411 10411 W System.err:    at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:356)                                                                                          
08-16 12:41:31.865 10411 10411 W System.err:    at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:93)                                                                                               
08-16 12:41:31.865 10411 10411 W System.err:    at android.widget.PopupWindow.invokePopup(PopupWindow.java:1433)                                                                                                   
08-16 12:41:31.865 10411 10411 W System.err:    at android.widget.PopupWindow.showAtLocation(PopupWindow.java:1203)                                                                                                
08-16 12:41:31.865 10411 10411 W System.err:    at android.widget.PopupWindow.showAtLocation(PopupWindow.java:1170)                                                                                                
08-16 12:41:31.865 10411 10411 W System.err:    at org.chromium.android_webview.PopupTouchHandleDrawable.show(SourceFile:230)  

Metadata

Metadata

Assignees

Labels

a: platform-viewsEmbedding Android/iOS views in Flutter appsc: crashStack traces logged to the consoleplatform-androidAndroid applications specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions