incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Clarkson (JIRA)" <>
Subject [jira] [Commented] (CB-1404) EXC_BAD_ACCESS when using XHR bridge mode
Date Mon, 10 Sep 2012 14:11:07 GMT


Tom Clarkson commented on CB-1404:

I have confirmed that the issue is not related to the plugin used - I added the below code
to app startup calling the simplest plugin in the app.

With XHR_WITH_PAYLOAD, it usually crashes with less than 100 calls, though it did get to over
2,000 a couple of times. In actual use with the sqlite plugin it was usually crashing in the
first 20 calls, so the amount of work done in the plugin probably does have some effect.

With XHR_NO_PAYLOAD, it is at 45,000 and still running.

app.tryToCrash = function(i) {

console.log("reporting ready for file plugin");
            Cordova.exec(function(result) {
                console.log("plugin call "+i+" - "+result);
                window.setTimeout(function() {app.tryToCrash(i+1);}, 0);

            }, function(result) {
                console.log("plugin call "+i+" - "+result);
                window.setTimeout(function() {app.tryToCrash(i+1);}, 0);
            }, "FileStorePlugin", "reportReadyToOpenFiles", []);


- (void)reportReadyToOpenFiles:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options

    NSString *callback = [arguments objectAtIndex:0];

    self.readyToOpenFiles = YES;
    CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:
    [self writeJavascript:[result toSuccessCallbackString:callback]];
    if (self.queuedUrl != nil) {
        [self handleOpenUrlInternal:self.queuedUrl];
        self.queuedUrl = nil;
> EXC_BAD_ACCESS when using XHR bridge mode
> -----------------------------------------
>                 Key: CB-1404
>                 URL:
>             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
> 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:

View raw message