Last Comment Bug 738976 - java.lang.RuntimeException: An error occured while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java) caused by: java.lang.NullPointerException at org.mozilla.gecko.db.LocalBrowserDB.updateFaviconForUrl(LocalBrowserDB.java:589)
: java.lang.RuntimeException: An error occured while executing doInBackground()...
Status: VERIFIED FIXED
[native-crash]
: crash, regression
Product: Firefox for Android
Classification: Client Software
Component: General (show other bugs)
: 14 Branch
: ARM Android
: -- critical (vote)
: Firefox 14
Assigned To: Mark Finkle (:mfinkle) (use needinfo?)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-24 12:39 PDT by Scoobidiver (away)
Modified: 2012-06-12 02:15 PDT (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
verified
verified
-


Attachments
patch (955 bytes, patch)
2012-03-26 22:29 PDT, Mark Finkle (:mfinkle) (use needinfo?)
blassey.bugs: review+
Details | Diff | Review
logcat (31.95 KB, text/plain)
2012-03-26 22:55 PDT, Tony Chung [:tchung]
no flags Details

Description Scoobidiver (away) 2012-03-24 12:39:31 PDT
It first appeared in 14.0a1/20120323: bp-c7cf739f-bb12-411f-8e98-5cbab2120323.
The regression range might be:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=5c13fce74f83&tochange=ab2ff3b5611f

java.lang.RuntimeException: An error occured while executing doInBackground()
	at android.os.AsyncTask$3.done(AsyncTask.java:200)
	at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
	at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
	at java.util.concurrent.FutureTask.run(FutureTask.java:137)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
	at java.lang.Thread.run(Thread.java:1102)
Caused by: java.lang.NullPointerException
	at org.mozilla.gecko.db.LocalBrowserDB.updateFaviconForUrl(LocalBrowserDB.java:589)
	at org.mozilla.gecko.db.BrowserDB.updateFaviconForUrl(BrowserDB.java:186)
	at org.mozilla.gecko.Favicons$LoadFaviconTask.saveFaviconToDb(Favicons.java:265)
	at org.mozilla.gecko.Favicons$LoadFaviconTask.downloadFavicon(Favicons.java:327)
	at org.mozilla.gecko.Favicons$LoadFaviconTask.doInBackground(Favicons.java:383)
	at org.mozilla.gecko.Favicons$LoadFaviconTask.doInBackground(Favicons.java:226)
	at android.os.AsyncTask$2.call(AsyncTask.java:185)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
	... 4 more

More reports at:
https://crash-stats.mozilla.com/report/list?signature=java.lang.RuntimeException%3A+An+error+occured+while+executing+doInBackground%28%29+at+android.os.AsyncTask%243.done%28AsyncTask.java%29
Comment 1 Kevin Brosnan [:kbrosnan] 2012-03-26 09:42:48 PDT
This is 104 crashes on trunk and about the same number on Aurora.
Comment 2 Scoobidiver (away) 2012-03-26 09:49:23 PDT
(In reply to Kevin Brosnan [:kbrosnan] from comment #1)
> This is 104 crashes on trunk and about the same number on Aurora.
I see only one crash in 14.0a1 and no crashes in 13.0a2. You mixed it with bug 734624.
Comment 3 Mark Finkle (:mfinkle) (use needinfo?) 2012-03-26 22:27:23 PDT
I see this with my own builds. Patch coming up.
Comment 4 Mark Finkle (:mfinkle) (use needinfo?) 2012-03-26 22:29:47 PDT
Created attachment 609619 [details] [diff] [review]
patch

We do check higher in the callstack for a null drawable image, but in this case the drawable is fine. The getBitmap returns null though. This patch just bails if it does.

Fixes the crash I saw in my local builds. The favicon was a "jar:jar" that did not exist in the omnijar, so returning early is appropriate anyway.
Comment 5 Tony Chung [:tchung] 2012-03-26 22:55:34 PDT
Created attachment 609625 [details]
logcat

I can reproduce this.

Repro:
1) 3-26-2012 nightly fennec, Galaxy Nexus Android 4.0.2
2) open this URL in a new tab:  https://crash-stats.mozilla.com/report/index/bp-3ac9c353-2bc0-4322-afa7-930172120327
3) watch logcat, and verify the strictmode errors:

03-26 22:47:03.991: ERROR/StrictMode(29470): A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
03-26 22:47:03.991: ERROR/StrictMode(29470): java.lang.Throwable: Explicit termination method 'close' not called
03-26 22:47:03.991: ERROR/StrictMode(29470):     at dalvik.system.CloseGuard.open(CloseGuard.java:184)
03-26 22:47:03.991: ERROR/StrictMode(29470):     at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:300)
03-26 22:47:03.991: ERROR/StrictMode(29470):     at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:257)
03-26 22:47:03.991: ERROR/StrictMode(29470):     at libcore.net.http.HttpConnection.setupSecureSocket(HttpConnection.java:210)
03-26 22:47:03.991: ERROR/StrictMode(29470):     at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.makeSslConnection(HttpsURLConnectionImpl.java:477)
03-26 22:47:03.991: ERROR/StrictMode(29470):     at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.connect(HttpsURLConnectionImpl.java:432)
03-26 22:47:03.991: ERROR/StrictMode(29470):     at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:282)
03-26 22:47:03.991: ERROR/StrictMode(29470):     at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:232)
03-26 22:47:03.991: ERROR/StrictMode(29470):     at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:273)
03-26 22:47:03.991: ERROR/StrictMode(29470):     at libcore.net.http.HttpURLConnectionImpl.getHeaderField(HttpURLConnectionImpl.java:130)
03-26 22:47:03.991: ERROR/StrictMode(29470):     at java.net.URLConnection.getHeaderFieldInt(URLConnection.java:552)
03-26 22:47:03.991: ERROR/StrictMode(29470):     at java.net.URLConnection.getContentLength(URLConnection.java:320)
03-26 22:47:03.991: ERROR/StrictMode(29470):     at libcore.net.http.HttpsURLConnectionImpl.getContentLength(HttpsURLConnectionImpl.java:190)
03-26 22:47:03.991: ERROR/StrictMode(29470):     at org.mozilla.gecko.Favicons$LoadFaviconTask.downloadFavicon(Favicons.java:290)
03-26 22:47:03.991: ERROR/StrictMode(29470):     at org.mozilla.gecko.Favicons$LoadFaviconTask.doInBackground(Favicons.java:369)
03-26 22:47:03.991: ERROR/StrictMode(29470):     at org.mozilla.gecko.Favicons$LoadFaviconTask.doInBackground(Favicons.java:226)
03-26 22:47:03.991: ERROR/StrictMode(29470):     at android.os.AsyncTask$2.call(AsyncTask.java:264)
03-26 22:47:03.991: ERROR/StrictMode(29470):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
03-26 22:47:03.991: ERROR/StrictMode(29470):     at java.util.concurrent.FutureTask.run(FutureTask.java:137)
03-26 22:47:03.991: ERROR/StrictMode(29470):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
03-26 22:47:03.991: ERROR/StrictMode(29470):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
03-26 22:47:03.991: ERROR/StrictMode(29470):     at java.lang.Thread.run(Thread.java:856)
Comment 6 Mark Finkle (:mfinkle) (use needinfo?) 2012-03-27 06:05:22 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/27898323401e
Comment 7 Ed Morley [:emorley] 2012-03-28 14:24:59 PDT
https://hg.mozilla.org/mozilla-central/rev/27898323401e
Comment 8 Mark Finkle (:mfinkle) (use needinfo?) 2012-04-04 10:18:12 PDT
https://hg.mozilla.org/releases/mozilla-aurora/rev/eda41c845ed5
Comment 9 Paul Feher 2012-06-12 02:15:45 PDT
Looking trough the logs StrictMode errors are not present anymore on:
Nightly Fennec 16.0a1 (2012-06-11)
Aurora Fennec 15.0a2 (2012-06-11)
Device: HTC Desire Z
OS: Android 2.3.3

Note You need to log in before you can comment on or make changes to this bug.