Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash report "android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@f55c196 is not valid; is your activity running? in Updatemanager.onCancel()" #665

Closed
K1rakishou opened this issue Feb 16, 2020 · 2 comments
Assignees
Labels
bug Something isn't working report/crash report Report made via the in-app reporter (auto or manual)

Comments

@K1rakishou
Copy link

/Kuroba-dev | FileCacheV2: [NormalFileCacheV2Thread-3]: Request [FileDownloadRequest: url = https://kuroba.io:8443/apk/41100_6c52470b13f53057e1c06e860edf0c89e4ea0a35.apk, outputFileName = d6a0b63ae578d000df651e1163c98c51.cache] canceled, downloaded = 376680, total = 10813446, network class = WIFI, downloads = 1
E/Kuroba-dev | UNCAUGHT: Called from unhandled exception handler.
E/Kuroba-dev | UNCAUGHT: android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@f55c196 is not valid; is your activity running?
E/Kuroba-dev | UNCAUGHT: 	at android.view.ViewRootImpl.setView(ViewRootImpl.java:931)
E/Kuroba-dev | UNCAUGHT: 	at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:387)
E/Kuroba-dev | UNCAUGHT: 	at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:95)
E/Kuroba-dev | UNCAUGHT: 	at android.app.Dialog.show(Dialog.java:342)
E/Kuroba-dev | UNCAUGHT: 	at androidx.appcompat.app.AlertDialog$Builder.show(AlertDialog.java:1009)
E/Kuroba-dev | UNCAUGHT: 	at com.github.adamantcheese.chan.core.manager.UpdateManager$1.onCancel(UpdateManager.java:341)
E/Kuroba-dev | UNCAUGHT: 	at com.github.adamantcheese.chan.core.cache.FileCacheV2$handleResults$6.invoke(FileCacheV2.kt:742)
E/Kuroba-dev | UNCAUGHT: 	at com.github.adamantcheese.chan.core.cache.FileCacheV2$handleResults$6.invoke(FileCacheV2.kt:43)
E/Kuroba-dev | UNCAUGHT: 	at com.github.adamantcheese.chan.core.cache.FileCacheV2$resultHandler$1$1.run(FileCacheV2.kt:827)
E/Kuroba-dev | UNCAUGHT: 	at android.os.Handler.handleCallback(Handler.java:883)
E/Kuroba-dev | UNCAUGHT: 	at android.os.Handler.dispatchMessage(Handler.java:100)
E/Kuroba-dev | UNCAUGHT: 	at android.os.Looper.loop(Looper.java:214)
E/Kuroba-dev | UNCAUGHT: 	at android.app.ActivityThread.main(ActivityThread.java:7356)
E/Kuroba-dev | UNCAUGHT: 	at java.lang.reflect.Method.invoke(Native Method)
E/Kuroba-dev | UNCAUGHT: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
E/Kuroba-dev | UNCAUGHT: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
@K1rakishou K1rakishou added bug Something isn't working report/crash report Report made via the in-app reporter (auto or manual) labels Feb 16, 2020
@K1rakishou
Copy link
Author

Maybe it's better to just add the "isInForeground()" check to the FileCacheV2 where the callbacks are called, so if the activity is stopped no callbacks are called than adding these checks everywhere else?

@Adamantcheese Adamantcheese self-assigned this Feb 17, 2020
@Adamantcheese
Copy link
Owner

There are instances where the FileCache should continue to call the callback, but we don't want certain specific rendering actions to occur. The rest of the AlertDialog instances seem to be fine and shouldn't cause this sort of crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working report/crash report Report made via the in-app reporter (auto or manual)
Projects
None yet
Development

No branches or pull requests

2 participants