You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Kevin Hawkins (JIRA)" <ji...@apache.org> on 2012/10/20 05:32:12 UTC

[jira] [Created] (CB-1694) [iOS]: View controller not properly unregistered in CDVURLProtocol

Kevin Hawkins created CB-1694:
---------------------------------

             Summary: [iOS]: View controller not properly unregistered in CDVURLProtocol
                 Key: CB-1694
                 URL: https://issues.apache.org/jira/browse/CB-1694
             Project: Apache Cordova
          Issue Type: Bug
          Components: iOS
    Affects Versions: 2.2.0
         Environment: Xcode 4.5 / OS X 10.7.5 (Lion) / Commit b74752f42da53532150d17aab80c0c6ae36a1a69
            Reporter: Kevin Hawkins
            Assignee: Shazron Abdullah


[CDVURLProtocol unregisterViewController:] does not properly unregister the Cordova view controller from gRegisteredControllers.  The view controller is registered in gRegisteredControllers with its "long long" representation, but it's unregistered by attempting to remove the view controller object itself from the list, which of course is not in the set.

This causes a crash (EXC_BAD_ACCESS) in my test app (which removes and re-creates the view controller through a plugin), because something seems to call /!gap_exec again after my view controller has been deallocated.  I'm not sure if that points to a bigger problem or not.  But at any rate, when I change [CDVURLProtocol unregisterViewController:] to properly remove the view controller from the set, my app never crashes, through multiple recycles of the view controller.

I can attach my sample app, if that's helpful to understanding the crash scenario.  But the unregister bug is unambiguous, so we could just fix that.

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

[jira] [Updated] (CB-1694) [iOS]: View controller not properly unregistered in CDVURLProtocol

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1694?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah updated CB-1694:
---------------------------------

    Fix Version/s: 2.2.0
    
> [iOS]: View controller not properly unregistered in CDVURLProtocol
> ------------------------------------------------------------------
>
>                 Key: CB-1694
>                 URL: https://issues.apache.org/jira/browse/CB-1694
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.2.0
>         Environment: Xcode 4.5 / OS X 10.7.5 (Lion) / Commit b74752f42da53532150d17aab80c0c6ae36a1a69
>            Reporter: Kevin Hawkins
>            Assignee: Shazron Abdullah
>             Fix For: 2.2.0
>
>   Original Estimate: 2m
>  Remaining Estimate: 2m
>
> [CDVURLProtocol unregisterViewController:] does not properly unregister the Cordova view controller from gRegisteredControllers.  The view controller is registered in gRegisteredControllers with its "long long" representation, but it's unregistered by attempting to remove the view controller object itself from the list, which of course is not in the set.
> This causes a crash (EXC_BAD_ACCESS) in my test app (which removes and re-creates the view controller through a plugin), because something seems to call /!gap_exec again after my view controller has been deallocated.  I'm not sure if that points to a bigger problem or not.  But at any rate, when I change [CDVURLProtocol unregisterViewController:] to properly remove the view controller from the set, my app never crashes, through multiple recycles of the view controller.
> I can attach my sample app, if that's helpful to understanding the crash scenario.  But the unregister bug is unambiguous, so we could just fix that.

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

[jira] [Resolved] (CB-1694) [iOS]: View controller not properly unregistered in CDVURLProtocol

Posted by "Andrew Grieve (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1694?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Grieve resolved CB-1694.
-------------------------------

    Resolution: Fixed
      Assignee: Andrew Grieve  (was: Shazron Abdullah)

Kevin, thanks for pointing this out! I've made the fix that you suggested:

https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-ios.git;a=commit;h=ef67dcf7bce56c69299bb89ab16c1803d0edd895
                
> [iOS]: View controller not properly unregistered in CDVURLProtocol
> ------------------------------------------------------------------
>
>                 Key: CB-1694
>                 URL: https://issues.apache.org/jira/browse/CB-1694
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.2.0
>         Environment: Xcode 4.5 / OS X 10.7.5 (Lion) / Commit b74752f42da53532150d17aab80c0c6ae36a1a69
>            Reporter: Kevin Hawkins
>            Assignee: Andrew Grieve
>             Fix For: 2.2.0
>
>   Original Estimate: 2m
>  Remaining Estimate: 2m
>
> [CDVURLProtocol unregisterViewController:] does not properly unregister the Cordova view controller from gRegisteredControllers.  The view controller is registered in gRegisteredControllers with its "long long" representation, but it's unregistered by attempting to remove the view controller object itself from the list, which of course is not in the set.
> This causes a crash (EXC_BAD_ACCESS) in my test app (which removes and re-creates the view controller through a plugin), because something seems to call /!gap_exec again after my view controller has been deallocated.  I'm not sure if that points to a bigger problem or not.  But at any rate, when I change [CDVURLProtocol unregisterViewController:] to properly remove the view controller from the set, my app never crashes, through multiple recycles of the view controller.
> I can attach my sample app, if that's helpful to understanding the crash scenario.  But the unregister bug is unambiguous, so we could just fix that.

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

[jira] [Commented] (CB-1694) [iOS]: View controller not properly unregistered in CDVURLProtocol

Posted by "Kevin Hawkins (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13481072#comment-13481072 ] 

Kevin Hawkins commented on CB-1694:
-----------------------------------

Great, thanks for the quick turnaround!
                
> [iOS]: View controller not properly unregistered in CDVURLProtocol
> ------------------------------------------------------------------
>
>                 Key: CB-1694
>                 URL: https://issues.apache.org/jira/browse/CB-1694
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.2.0
>         Environment: Xcode 4.5 / OS X 10.7.5 (Lion) / Commit b74752f42da53532150d17aab80c0c6ae36a1a69
>            Reporter: Kevin Hawkins
>            Assignee: Andrew Grieve
>             Fix For: 2.2.0
>
>   Original Estimate: 2m
>  Remaining Estimate: 2m
>
> [CDVURLProtocol unregisterViewController:] does not properly unregister the Cordova view controller from gRegisteredControllers.  The view controller is registered in gRegisteredControllers with its "long long" representation, but it's unregistered by attempting to remove the view controller object itself from the list, which of course is not in the set.
> This causes a crash (EXC_BAD_ACCESS) in my test app (which removes and re-creates the view controller through a plugin), because something seems to call /!gap_exec again after my view controller has been deallocated.  I'm not sure if that points to a bigger problem or not.  But at any rate, when I change [CDVURLProtocol unregisterViewController:] to properly remove the view controller from the set, my app never crashes, through multiple recycles of the view controller.
> I can attach my sample app, if that's helpful to understanding the crash scenario.  But the unregister bug is unambiguous, so we could just fix that.

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