I have a UIWebView I’m using to show several small PDF’s. The user selects a news article from a table and then the article(PDF) is loaded in a UIWebView on the same screen. The first load always goes just fine. Then the next item I select (no matter which one) crashes the app.
This is how I’m loading each article:
NSString *filePath = [[NSBundle mainBundle] pathForResource:articleFileName ofType:@"pdf"];
[articleView stopLoading];
[articleView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:filePath]]];
The crash occurs after the loadRequest line.
The crash gives no error information. Other than:
All Exceptions {} 0x3629f000
Catchpoint 3 (exception thrown).(gdb)
It just crashes to main(). I have verified in the debugger that it is using the correct file path on each request.
I have NSZombies running and I have breakpoints set for all exceptions.
I have this exact problem as well. Big thanks to Steve for helping me narrow it down even further, my exception is the same as his.
Do you have break on all exceptions set? I found that if I disable that breakpoint, it doesn’t crash any more. Which got me thinking it was just some bug in the new debugger or iOS version? The other thing that got me thinking that was that this crash does not occur when I run on a device with iOS 4.3.x or the 4.3 simulator.