Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-9167

Crash when closing InAppBrowser on iOS

    XMLWordPrintableJSON

Details

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            AlfredOlsson Alfred Olsson
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: