incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Bowser (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CB-76) PhoneGap Android JSAlerts may have a memory leak
Date Tue, 17 Apr 2012 21:17:13 GMT

     [ https://issues.apache.org/jira/browse/CB-76?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Joe Bowser resolved CB-76.
--------------------------

    Resolution: Fixed

This is where you use an alert in a Callback that takes longer to come back than the timeout
on the loadUrl. If you have an Async call to Alert happen the same time as you close the app,
this will happen, and I don't think there's an easy way to avoid it.
                
> PhoneGap Android JSAlerts may have a memory leak
> ------------------------------------------------
>
>                 Key: CB-76
>                 URL: https://issues.apache.org/jira/browse/CB-76
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android
>            Reporter: Simon MacDonald
>            Assignee: Joe Bowser
>             Fix For: 1.7.0
>
>
> This was discovered on a client project, and is intermittent. I wrote it off as a device
issue until I ran into the same issue today on a Nexus S running CyanogenMod. Here's the issue
in question!
> E/WindowManager( 4255): android.view.WindowLeaked: Activity (removed for confidentiality)
has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@40586158 that was
originally added here
> E/WindowManager( 4255):     at android.view.ViewRoot.<init>(ViewRoot.java:259)
> E/WindowManager( 4255):     at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
> E/WindowManager( 4255):     at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
> E/WindowManager( 4255):     at android.view.Window$LocalWindowManager.addView(Window.java:465)
> E/WindowManager( 4255):     at android.app.Dialog.show(Dialog.java:241)
> E/WindowManager( 4255):     at android.app.AlertDialog$Builder.show(AlertDialog.java:812)
> E/WindowManager( 4255):     at com.phonegap.DroidGap$GapClient.onJsAlert(DroidGap.java:824)
> E/WindowManager( 4255):     at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:501)
> E/WindowManager( 4255):     at android.os.Handler.dispatchMessage(Handler.java:99)
> E/WindowManager( 4255):     at android.os.Looper.loop(Looper.java:130)
> E/WindowManager( 4255):     at android.app.ActivityThread.main(ActivityThread.java:3835)
> E/WindowManager( 4255):     at java.lang.reflect.Method.invokeNative(Native Method)
> E/WindowManager( 4255):     at java.lang.reflect.Method.invoke(Method.java:507)
> E/WindowManager( 4255):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
> E/WindowManager( 4255):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
> E/WindowManager( 4255):     at dalvik.system.NativeStart.main(Native Method)
> This happens when people are using an Alert in a callback, in this case the reachability
API. I'm going to investigate this further, but its the reason there's the infamous "The connection
to the server was unsuccessful" is happening.
> Of course, once you kill it and restart the app, the problem goes away, but this doesn't
provide a great user experience. I'll assign this to myself.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message