I\'m having a random UIWebView crash using iOS8.1 and UIWebView, using an iPhone5. In my tests the crash doesn\'t
I solved the problem. I had the same issue adding a video tag (source was a local mp4 file approx. 18Mb). I could identify the video tag as the crash responsible because html without video doesn't crash. Then i tried to inject two seconds later the video tag via javascript and the app crashed. After a few hours i found this: UIWebView loading html5-Video EXC_BAD_ACCESS crash.
My solution was to extract the video tag injection in a javascript function and call that function on webViewDidFinishLoad.
So, in my controller i have:
- (void)webViewDidFinishLoad:(UIWebView *)webView
{
[self.webView stringByEvaluatingJavaScriptFromString:@"placeVideoTag();"];
}
While in my index.html i have:
...
...
and (i added an audio tag too!):
I know it sounds as a strange solution, but it is really working. I had the same identical issue as stated here, also enabling Zombie tracking
Randomly the app is crashing on the WebThread with EXC_ARM_BREAKPOINT
After enabling Zombie tracking on the console there is this message:
[UIViewAnimationState release]: message sent to deallocated instance
0x14deff70