Closed miclee closed 9 years ago
I think your problem might orginate in data URLs that google uses for some images. http://en.wikipedia.org/wiki/Data_URI_scheme
I'm investigating a similiar issue where an EXC_BAD_ACCESS occures in copyConstantHeaderFieldValue somewhere deep in the NSURL loading framework. Not sure yet if it's the same problem. Debugging is quite hard since no language exception is thrown, but a machine exception.
Some readings:
https://devforums.apple.com/message/328401 http://stackoverflow.com/questions/916718/nsurlconnection-crashing-under-10-5-7 https://devforums.apple.com/message/325237
After a longer debugging session I am convinced, that this is an iOS Bug introduced in iOS4. The scenario:
At this point, somewhere in the deeps of Apple's CoreFoundation url connection and loading frameworks a machine exception occures when some routine is tryging to access the HTTP header fields. Since no obj-c Exception is thrown and I have no zombie or other useful debugging information, I'm not able to fix anything there. The Problem only occures when UIWebView tries to load resources via ajax.
Next steps:
addendum: Why iOS4 ? I have a report from a developer who hat a similar issue in iOS4. Compiling against iOS3 SDK solved the problem. I did not try to reproduce that yet.
i have a similar problem. not exactly with uiwebview, but i get a segfault in the same place. however there is something which may help: when i use AFCache - when NSURLConnection calls - (void)connection:(NSURLConnection )theConnection didReceiveResponse:(NSURLResponse )response - the response isn't a NSHTTPURLResponse object. If i change it in AFURLCache.m to store NSHTTPURLResponse, somehow i still get NSURLResponse object.
Did anyone make headway on this bug. I am looking to integrate AFCache into my project, but this bug is a pretty severe limitation for me. I have user inputted web URLS. google.com is bound to come up ;-)
Chlorell, did your patch at least stop the bad access crashing ? The page loads up in a WebView. The crash happens after a render, so I would be happy for now with just a way to stop the exception.
nope, i justed narrowed the group of sites which are managed by AFCache ;)
Hi,
Found a problem when using AFURLCache on iPhone (simulator or device, IOS 4.1).
Steps to repeat:
Specify the NSURLCache
Navigate UIWebView to http://www.google.com/
The AFURLCache works fine on many sites. One thing that looks suspicious on Google.com is that there is a file with content type: text/cache-manifest.
Mic