Closed Bug 812559 Opened 12 years ago Closed 12 years ago

java.lang.NullPointerException: at org.mozilla.fennec.db.BrowserProvider.updateFavicon(BrowserProvider.java)

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
critical

Tracking

(firefox19- fixed)

RESOLVED FIXED
Firefox 20
Tracking Status
firefox19 - fixed

People

(Reporter: scoobidiver, Assigned: bnicholson)

Details

(Keywords: crash, Whiteboard: [native-crash])

Crash Data

Attachments

(1 file)

There have been two crashes from two users since 19.0a1/20121114, including bp-2835b3d8-65b8-40c7-b189-b6ab02121116.
I think it's a regression from bug 784086.

java.lang.NullPointerException
	at org.mozilla.fennec.db.BrowserProvider.updateFavicon(BrowserProvider.java:2797)
	at org.mozilla.fennec.db.BrowserProvider.updateOrInsertFavicon(BrowserProvider.java:2735)
	at org.mozilla.fennec.db.BrowserProvider.updateInTransaction(BrowserProvider.java:2122)
	at org.mozilla.fennec.db.BrowserProvider.update(BrowserProvider.java:2038)
	at android.content.ContentProvider$Transport.update(ContentProvider.java:228)
	at android.content.ContentResolver.update(ContentResolver.java:730)
	at org.mozilla.gecko.db.LocalBrowserDB.updateFaviconForUrl(LocalBrowserDB.java:712)
	at org.mozilla.gecko.db.BrowserDB.updateFaviconForUrl(BrowserDB.java:212)
	at org.mozilla.gecko.Favicons$LoadFaviconTask.saveFaviconToDb(Favicons.java:207)
	at org.mozilla.gecko.Favicons$LoadFaviconTask.doInBackground(Favicons.java:290)
	at org.mozilla.gecko.Favicons$LoadFaviconTask.doInBackground(Favicons.java:172)
	at android.os.AsyncTask$2.call(AsyncTask.java:185)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
	at java.lang.Thread.run(Thread.java:1019)

More reports at:
https://crash-stats.mozilla.com/report/list?signature=java.lang.NullPointerException%3A+at+org.mozilla.fennec.db.BrowserProvider.updateFavicon%28BrowserProvider.java%29
I thought I had already made this change somewhere, but I guess it got lost. faviconId can be null, so we get a NPE when we try to unbox Long to a long.
Assignee: nobody → bnicholson
Status: NEW → ASSIGNED
Attachment #682547 - Flags: review?(lucasr.at.mozilla)
Comment on attachment 682547 [details] [diff] [review]
Use Long instead of long in updateFaviconIdsForUrl()

Review of attachment 682547 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good (assuming null faviconId is a valid call)
Attachment #682547 - Flags: review?(lucasr.at.mozilla) → review+
As this fix looks trivial, let's make sure it lands for 19, either before the uplift on trunk or afterwards on aurora.
Comment on attachment 682547 [details] [diff] [review]
Use Long instead of long in updateFaviconIdsForUrl()

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 784086
User impact if declined: crashes
Testing completed (on m-c, etc.): m-i
Risk to taking this patch (and alternatives if risky): very low
String or UUID changes made by this patch: none
Attachment #682547 - Flags: approval-mozilla-aurora?
Comment on attachment 682547 [details] [diff] [review]
Use Long instead of long in updateFaviconIdsForUrl()

Oops, nevermind - we're still on 19.
Attachment #682547 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/a8df98658900
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
(In reply to Brian Nicholson (:bnicholson) from comment #6)
> Oops, nevermind - we're still on 19.

Actually, this landed on 20. You actually need the approval to get it onto Aurora 19.
Comment on attachment 682547 [details] [diff] [review]
Use Long instead of long in updateFaviconIdsForUrl()

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 784086
User impact if declined: crashes
Testing completed (on m-c, etc.): m-i
Risk to taking this patch (and alternatives if risky): very low
String or UUID changes made by this patch: none
Attachment #682547 - Flags: approval-mozilla-aurora?
Comment on attachment 682547 [details] [diff] [review]
Use Long instead of long in updateFaviconIdsForUrl()

[Triage Comment]
Very low risk crash regression fix, approving for Aurora 19.
Attachment #682547 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: