[ https://issues.apache.org/jira/browse/CB-7182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14069209#comment-14069209 ]
Shazron Abdullah edited comment on CB-7182 at 7/21/14 8:27 PM: --------------------------------------------------------------- Found it. My bad implementation using NSInvocation. https://github.com/apache/cordova-ios/blob/28b4475070cd61587c8e7ac8e7f0102d8101367f/CordovaLib/Classes/CDVCommandQueue.m#L127 The getReturnValue here just copies buffer data, and does not retain. The runtime thinks it does a retain, so it tries to release it again, thus crash (through the Get Rule https://developer.apple.com/library/mac/documentation/corefoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html ARC would normally retain it, but not in this case it doesn't seem) Fix: Use a different way instead of NSInvocation to achieve this, see: https://github.com/apache/cordova-ios/blob/28b4475070cd61587c8e7ac8e7f0102d8101367f/CordovaLib/Classes/CDVWebViewOperationsDelegate.m#L67 was (Author: shazron): Found it. My bad implementation using NSInvocation. https://github.com/apache/cordova-ios/blob/28b4475070cd61587c8e7ac8e7f0102d8101367f/CordovaLib/Classes/CDVCommandQueue.m#L127 The getReturnValue here just copies buffer data, and does not retain. The runtime thinks it does a retain, so it tries to release it again, thus crash. Fix: Use a different way instead of NSInvocation to achieve this, see: https://github.com/apache/cordova-ios/blob/28b4475070cd61587c8e7ac8e7f0102d8101367f/CordovaLib/Classes/CDVWebViewOperationsDelegate.m#L67 > Running mobile-spec in an iOS 8 project but using UIWebView results in an > exception > ----------------------------------------------------------------------------------- > > Key: CB-7182 > URL: https://issues.apache.org/jira/browse/CB-7182 > Project: Apache Cordova > Issue Type: Sub-task > Components: iOS > Reporter: Shazron Abdullah > Assignee: Shazron Abdullah > > This is using the dev branch in the parent issue. > Can't really trace it properly yet since it throws it in the > UIApplicationDelegate and putting symbolic breakpoints and catching all > exceptions didn't give any results, but the clue is in JavaScriptCore, > probably. Note this is when the preference UseWKWebView is false (which is by > default) -- This message was sent by Atlassian JIRA (v6.2#6252)