NullPointerException at org.mozilla.gecko.db.AndroidBrowserDB.updateFaviconForUrl

RESOLVED FIXED in Firefox 11

Status

()

Firefox for Android
General
P1
normal
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: gcp, Assigned: gcp)

Tracking

unspecified
Firefox 12
ARM
Android
Points:
---

Firefox Tracking Flags

(firefox11 fixed, fennec11+)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
E/AndroidRuntime(15451): FATAL EXCEPTION: Thread-14
E/AndroidRuntime(15451): java.lang.NullPointerException
E/AndroidRuntime(15451): 	at org.mozilla.gecko.db.AndroidBrowserDB.updateFaviconForUrl(AndroidBrowserDB.java:273)
E/AndroidRuntime(15451): 	at org.mozilla.gecko.db.BrowserDB.updateFaviconForUrl(BrowserDB.java:140)
E/AndroidRuntime(15451): 	at org.mozilla.gecko.ProfileMigrator$PlacesTask.addFavicon(ProfileMigrator.java:276)
E/AndroidRuntime(15451): 	at org.mozilla.gecko.ProfileMigrator$PlacesTask.migrateFavicons(ProfileMigrator.java:302)
E/AndroidRuntime(15451): 	at org.mozilla.gecko.ProfileMigrator$PlacesTask.migratePlaces(ProfileMigrator.java:345)
E/AndroidRuntime(15451): 	at org.mozilla.gecko.ProfileMigrator$PlacesTask.run(ProfileMigrator.java:377)
E/AndroidRuntime(15451): 	at java.lang.Thread.run(Thread.java:1020)
(Assignee)

Comment 1

5 years ago
BitmapDrawable image = (BitmapDrawable) Drawable.createFromStream(byteStream, "src");

Using the result of this is wrapped in a try/catch but it doesn't handle the NPE. Want to add some logging to see what image is failing anyway.
Assignee: nobody → gpascutto
Priority: -- → P1
(Assignee)

Comment 2

5 years ago
Created attachment 584879 [details] [diff] [review]
Patch 1. Check for incomplete/undecodable images

If Android can't decode the stored favicon because the data is truncated or in a format it can't handle, just skip it.
Attachment #584879 - Flags: review?(mark.finkle)
Attachment #584879 - Flags: approval-mozilla-aurora?
Comment on attachment 584879 [details] [diff] [review]
Patch 1. Check for incomplete/undecodable images

Simple fix, we should take for aurora
Attachment #584879 - Flags: review?(mark.finkle) → review+
(Assignee)

Comment 4

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/aaf31de64891
https://hg.mozilla.org/mozilla-central/rev/aaf31de64891
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 12

Comment 6

5 years ago
Comment on attachment 584879 [details] [diff] [review]
Patch 1. Check for incomplete/undecodable images

[Triage Comment]
Mobile only - approving for Aurora.
Attachment #584879 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
tracking-fennec: --- → 11+
status-firefox11: --- → affected
(Assignee)

Comment 7

5 years ago
https://hg.mozilla.org/releases/mozilla-aurora/rev/579bcfe3d3ac

Updated

5 years ago
status-firefox11: affected → fixed
You need to log in before you can comment on or make changes to this bug.