You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Tom Clarkson (JIRA)" <ji...@apache.org> on 2012/09/11 03:03:07 UTC

[jira] [Commented] (CB-1404) EXC_BAD_ACCESS when using XHR_WITH_PAYLOAD bridge mode

    [ https://issues.apache.org/jira/browse/CB-1404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13452626#comment-13452626 ] 

Tom Clarkson commented on CB-1404:
----------------------------------

So far I have only seen the crash while debugging - so potentially only seen by developers, but still a bit of a concern when we don't have an explanation.

The queuedUrl code in that plugin is simply a one time handling of files opened before the app is ready - it won't run any more than the null check after the first call. In any case, I commented out everything except the three lines needed for the callback, and still got the error.

I have taken the reproduction a couple of steps further. I created a new project and added the tryToCrash script to app.onDeviceReady. No error. I then replaced the www folder from my app project with the one from the new project. Also no error. 

The error only seems to come up when the more complex app is loaded. I removed most of the plugin calls from app startup (switching the sql plugin calls to web sql and removing the more complex custom plugin calls entirely) but still got the error. The app isn't doing anything other than calling the test plugin at the time it crashes - the only difference I can think of is that there is more stuff in memory than with a new template app.

I also left the XHR_NO_PAYLOAD version of the app running overnight. I wasn't able to see how many calls it got to, but this morning the app was still running and xcode had become unresponsive with the size of the log.



                
> EXC_BAD_ACCESS when using XHR_WITH_PAYLOAD bridge mode 
> -------------------------------------------------------
>
>                 Key: CB-1404
>                 URL: https://issues.apache.org/jira/browse/CB-1404
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.1.0
>         Environment: iPad 2, iOS 5.1.1
>            Reporter: Tom Clarkson
>            Assignee: Andrew Grieve
>             Fix For: 2.2.0
>
>
> When calling a plugin the app crashes on WebThread with EXC_BAD_ACCESS in WebCore::DocumentThreadableLoader::cancel.
> This appears to be some sort of timing issue, as it does not happen on every call - I am seeing it in an autosave function which makes lots of calls to PGSQLitePlugin. 
> The error did not appear before upgrading to 2.1, and setting the bridge mode to IFRAME_NAV restores the previous behaviour (no crashes, but odd scrolling functionality).
> Setting the bridge mode to XHR_NO_PAYLOAD also seems to fix it - not sure if removing the payload actually does anything different or just makes it fast enough that the timing condition does not come up in normal app usage.
>   

--
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