GoogleChrome / GoogleChrome/android-browser-helper
Crash: android.view.WindowManagerGlobal.addView - window count is over max!!
- Dominant language
- Java
- Stars
- 832
- Forks
- 370
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 6
Description
**Describe the bug**
The crash it not very common, it happens randomly and for very few users got 7 crash reports from 13k installs~, I'm triying to figure out what can cause the issue, but opening this issue in case someone else is also facing the same.

Stack trace:
```java
Exception java.lang.IllegalStateException: window count is over max!!
at android.view.WindowManagerGlobal.addView (WindowManagerGlobal.java:450)
at android.view.WindowManagerImpl.addView (WindowManagerImpl.java:148)
at android.app.ActivityThread.handleResumeActivity (ActivityThread.java:5497)
at android.app.servertransaction.ResumeActivityItem.execute (ResumeActivityItem.java:54)
at android.app.servertransaction.ActivityTransactionItem.execute (ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2574)
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:8762)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:604)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1067)
```
**To Reproduce**
Unclear yet
**Expected behavior**
Not crash.
**Smartphone (please complete the following information):**
- Device: Samsung r8q (Galaxy S20 FE 5G) - based on crash report
- OS: Android 13
- Browsers Installed: Unknown... very likely Samsung internet
- Browser Versions: Unknown
- android-browser-helper library version: 2.4.0
**Additional context**
I found this stackoverflow issue https://stackoverflow.com/questions/72637865/android-windowmanager-causing-crash-with-window-count-is-over-max-300 but no clear solution yet.
Contributor guide
Assessment
This issue has not been assessed yet.