You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Andrew Grieve (JIRA)" <ji...@apache.org> on 2013/10/21 19:28:44 UTC

[jira] [Resolved] (CB-4995) iOS application crashes when InAppBrowser is opened and quickly closed

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

Andrew Grieve resolved CB-4995.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 3.2.0
         Assignee: Andrew Grieve

Fixed in 0.2.4-dev.

Thanks for the pull request Hyong. I ended up fixing it in a similar-but-different manner (so that it will apply to all delegate callbacks). Please take a look and let me know if you think it's not going to work.

http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/aa81c326

> iOS application crashes when InAppBrowser is opened and quickly closed
> ----------------------------------------------------------------------
>
>                 Key: CB-4995
>                 URL: https://issues.apache.org/jira/browse/CB-4995
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin InAppBrowser
>    Affects Versions: 2.7.0, 2.8.0, 2.9.0, 3.0.0
>         Environment: iOS
>            Reporter: Hyong Kim
>            Assignee: Andrew Grieve
>             Fix For: 3.2.0
>
>
> I personally experienced the issue with 2.8.15, but it appears others are seeing the same problem even on version 3. Just now, I quickly took a look at the latest version 3 source code, and it is likely that the issue is still around. That is, I had identified the cause of the crash and we fixed it in our app.
> The issue is presented when a user rapidly opens and closes InAppBrowser while using Cordova iOS application because (referring to the latest CDVInAppBrowser.m as of 10/3/2013 with commit hash of a001cffc30cf94cb406128f7b68d143e2cd62114) self.inAppBrowserViewController (line: 332) is nil if 'browserExit' (line: 353) is called before 'webViewDidFinishLoad' (line: 328) is invoked.
> We put our own patch around line 332 as below, and didn't experience the crash any more with 2.8.15
> {code:borderStyle=solid}
> if (self.inAppBrowserViewController != nil) {
>     url = [self.inAppBrowserViewController.currentURL absoluteString];  
> } else {
>     url = @"";
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)