Android bug: WebViewCore fails with Assertion error
<p>Unfortunately I cannot reliably reproduce this error but infrequently I get it and occasionally it gets reported in the live crash logs also. Here's a stacktrace reported by user with <code>Droid 2.2.2 FRG83G</code></p>

<pre><code>junit.framework.AssertionFailedError
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.assertTrue(Assert.java:20)
at junit.framework.Assert.assertNull(Assert.java:233)
at junit.framework.Assert.assertNull(Assert.java:226)
at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:594)
at java.lang.Thread.run(Thread.java:1096)
</code></pre>

<p>This seems to be due to this line in <code>WebViewCore.java</code></p>

<pre><code>Assert.assertNull(sWebCoreHandler);
</code></pre>

<p>Somehow sWebCoreHandler which is private static instance of <code>android.os.Handler</code> is <strike>not</strike> <i>(Thanks @Idolon for the correction)</i> <b>already</b> initialized but I have no clue how to work around or prevent this issue.</p>

<p>This occurs often enough for me to worry. What is also interesting is seemingly happens when the app is loading <code>Activity</code> that doesn't even have WebView though one of the activities does have it. </p>

<p>P.S. This was filed as bug #<a href="http://code.google.com/p/android/issues/detail?id=16258" rel="nofollow">16258</a></p>
