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

RESOLVED FIXED in Firefox 19

Status

()

Firefox for Android
General
--
critical
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Scoobidiver (away), Assigned: bnicholson)

Tracking

({crash})

Trunk
Firefox 20
ARM
Android
crash
Points:
---

Firefox Tracking Flags

(firefox19- fixed)

Details

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

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
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
(Assignee)

Comment 1

5 years ago
Created attachment 682547 [details] [diff] [review]
Use Long instead of long in updateFaviconIdsForUrl()

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+

Comment 3

5 years ago
As this fix looks trivial, let's make sure it lands for 19, either before the uplift on trunk or afterwards on aurora.
tracking-firefox19: --- → ?
(Assignee)

Comment 5

5 years ago
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?
(Assignee)

Comment 6

5 years ago
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
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
(Reporter)

Updated

5 years ago
status-firefox19: --- → affected

Comment 8

5 years ago
(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.
(Assignee)

Comment 9

5 years ago
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?

Updated

5 years ago
tracking-firefox19: ? → -
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+
You need to log in before you can comment on or make changes to this bug.