iphone sdk - stringByEvaluatingJavaScriptFromString causing EXC_BAD_ACCESS
<p>in my tab bar app where memory is getting low:</p>

<pre><code>- (void)webViewDidFinishLoad:(UIWebView *)webView {
  pageText = [NSString stringWithFormat:[webView stringByEvaluatingJavaScriptFromString:@"document.body.innerHTML"]];
</code></pre>

<p>The pageText line is causing a crash. If I comment out this line then there is no crash and I don't think it's the pageText NSString at fault.</p>

<p>I think this is on the final instance of the webViewDidFinishLoad and it looks like something is being released before webViewDidFinishLoad is done with it?</p>

<p>or there is no document.body.innerHTML for this webViewDidFinishLoad?</p>

<p>any ideas?</p>

<p>thanks in advance,</p>

<p>ade.</p>
