[
https://issues.apache.org/jira/browse/CB-4620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13774662#comment-13774662
]
Joe Bowser commented on CB-4620:
--------------------------------
I don't think that'll accomplish much, since the issue is that the UI isn't
ready on these phones when it calls spinnerStart. The patch should work, since
it checks to see if the appView is attached to anything. If the appView isn't
attached, then there's no UI for a spinner dialog to attach either.
We might just have to wait until 3.1.0 is out to actually resolve this, since
the check is in there.
> spinnerStop causes "java.lang.IllegalArgumentException: View not attached to
> window manager"
> --------------------------------------------------------------------------------------------
>
> Key: CB-4620
> URL: https://issues.apache.org/jira/browse/CB-4620
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: 3.0.0
> Environment: Android 4.1.1
> Reporter: Clayton Grassick
> Assignee: Joe Bowser
>
> Occasionally, when a Cordova application is switched away from and then
> switched back to, it crashes with the following stack trace:
> java.lang.IllegalArgumentException: View not attached to window manager
> android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:378)
> android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:223)
> android.view.Window$LocalWindowManager.removeView(Window.java:432)
> android.app.Dialog.dismissDialog(Dialog.java:278)
> android.app.Dialog.access$000(Dialog.java:71)
> android.app.Dialog$1.run(Dialog.java:111)
> android.app.Dialog.dismiss(Dialog.java:268)
> org.apache.cordova.CordovaActivity.spinnerStop(CordovaActivity.java:812)
> org.apache.cordova.CordovaActivity.onMessage(CordovaActivity.java:1132)
> org.apache.cordova.PluginManager.postMessage(PluginManager.java:336)
> org.apache.cordova.CordovaWebView.postMessage(CordovaWebView.java:538)
>
> org.apache.cordova.CordovaWebViewClient$1$1.run(CordovaWebViewClient.java:311)
> android.os.Handler.handleCallback(Handler.java:587)
> android.os.Handler.dispatchMessage(Handler.java:92)
> android.os.Looper.loop(Looper.java:130)
> android.app.ActivityThread.main(ActivityThread.java:3687)
> java.lang.reflect.Method.invokeNative(Native Method)
> java.lang.reflect.Method.invoke(Method.java:507)
>
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
> dalvik.system.NativeStart.main(Native Method)
> It occurs approximately once per day per user, enough to flood ACRA with
> crash reports.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira