PROBLEM DESCRIPTION
Upon opening a window which includes a webView the following errors are seen in the console and the app crashes.
LOG
[DEBUG] objc[35284]: Method cache corrupted. This may be a message to an invalid object, or a memory error somewhere else.
[DEBUG] objc[35284]: receiver 0xe592b10, SEL 0x43d3643, isa 0xf2f4a8, cache 0xf2f4b0, buckets 0xe9e74b, mask 0xb, occupied 0x0
[DEBUG] objc[35284]: receiver 32 bytes, buckets 0 bytes
[DEBUG] objc[35284]: selector 'release'
[DEBUG] objc[35284]: isa ''
[DEBUG] objc[35284]: Method cache corrupted.
TESTCASE
Here's the webview.js file
var win = Ti.UI.createWindow();
win.orientationModes= [Ti.UI.LANDSCAPE_LEFT,Ti.UI.LANDSCAPE_RIGHT,Ti.UI.PORTRAIT,Ti.UI.UPSIDE_PORTRAIT];
var web = Ti.UI.createWebView({
url: url,
width: Ti.UI.FILL,
height: Ti.UI.FILL,
top: 0,
left: 0
});
web.addEventListener('load', function() {
win.setTitle(web.evalJS('document.title'));
});
web.addEventListener('error', function(e) {
if(e.errorCode== -1003 || e.error == -1000 || e.error == -1006) al.add("That's one bad URL.");
else alert(e.message)
});
win.add(web);
return win;
The above is wrapped inside a module.exports. The calling window grabs the returned win object, and opens it as a child window in the active tab of a Tab Group.
Is this specifically an iOS 7 issue, or does it occur on previous versions?
Initial read by Sabil and Blain is that this is not a bug of ours, and not something to be immediately concerned with.
This doesn't seem to happen on iOS 6 (still using the aforementioned TiSDK). Although, I've narrowed this down further. If the url assigned to the webview is invalid (eg. not a valid NSURL), the above errors are thrown and the application crashes instantly.
This issue likely is a apple bug. I could not reproduce the issue with the invalid URL code used in testing.
Unless we have a better reproducible test case, it would be hard for us to narrow down the bug here. with the testing that i have done. I cannot reproduce this issue.
Closing ticket as the issue cannot be reproduced and due to the above comments.