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

ASF GitHub Bot commented on CB-9167:
------------------------------------

GitHub user davidmweber opened a pull request:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/110

    Fix crash on browser window close

    This fixes references to webView delegates on deallocation to prevent 
crashes in iOS apps. It is particularly a problem when opening and closing 
multiple webViews during an Oauth authentication. See
    https://issues.apache.org/jira/bro…wse/CB-9167

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/8eo/cordova-plugin-inappbrowser master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-inappbrowser/pull/110.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #110
    
----
commit 2279aee4ff4e7c363392dc9de4af278f96c2dca7
Author: David Weber <[email protected]>
Date:   2015-07-20T11:09:58Z

    Fix crash on browser window close 
(https://issues.apache.org/jira/browse/CB-9167)

----


> Crash when closing InAppBrowser on iOS
> --------------------------------------
>
>                 Key: CB-9167
>                 URL: https://issues.apache.org/jira/browse/CB-9167
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin InAppBrowser
>            Reporter: Alfred Olsson
>
> Closing the InAppBrowsers sometimes causes a crash on iOS.
> I think the problem is with the UIWebView delegate.
> Apple documentation states that the delegate should be set to nil before 
> release but it is not done.
> See: 
> https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIWebViewDelegate_Protocol/
> The following code in CDVInAppBrowserViewController seems to solve the 
> problem:
> -(void)dealloc
> {
>     self.webView.delegate = nil;
> }
> The crashes are seen in an App that closes the IAB at 'loadstart'.
> I think this is required to get the crashes that occur around 1/10 times.
> The following error is seen at crashes when Zombie Objects are enabled:
> *** -[CDVWebViewDelegate respondsToSelector:]: message sent to deallocated 
> instance 0x171846e70



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to