Last Comment Bug 714148 - NullPointerException at org.mozilla.gecko.db.AndroidBrowserDB.updateFaviconForUrl
: NullPointerException at org.mozilla.gecko.db.AndroidBrowserDB.updateFaviconFo...
Status: RESOLVED FIXED
:
Product: Firefox for Android
Classification: Client Software
Component: General (show other bugs)
: unspecified
: ARM Android
: P1 normal (vote)
: Firefox 12
Assigned To: Gian-Carlo Pascutto [:gcp]
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-29 12:19 PST by Gian-Carlo Pascutto [:gcp]
Modified: 2012-01-09 18:22 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed
11+


Attachments
Patch 1. Check for incomplete/undecodable images (1.64 KB, patch)
2011-12-29 16:14 PST, Gian-Carlo Pascutto [:gcp]
mark.finkle: review+
akeybl: approval‑mozilla‑aurora+
Details | Diff | Splinter Review

Description Gian-Carlo Pascutto [:gcp] 2011-12-29 12:19:26 PST
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)
Comment 1 Gian-Carlo Pascutto [:gcp] 2011-12-29 12:20:52 PST
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.
Comment 2 Gian-Carlo Pascutto [:gcp] 2011-12-29 16:14:24 PST
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.
Comment 3 Mark Finkle (:mfinkle) (use needinfo?) 2011-12-29 16:45:11 PST
Comment on attachment 584879 [details] [diff] [review]
Patch 1. Check for incomplete/undecodable images

Simple fix, we should take for aurora
Comment 4 Gian-Carlo Pascutto [:gcp] 2011-12-29 17:45:24 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/aaf31de64891
Comment 5 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-12-30 04:53:31 PST
https://hg.mozilla.org/mozilla-central/rev/aaf31de64891
Comment 6 Alex Keybl [:akeybl] 2012-01-03 13:32:09 PST
Comment on attachment 584879 [details] [diff] [review]
Patch 1. Check for incomplete/undecodable images

[Triage Comment]
Mobile only - approving for Aurora.
Comment 7 Gian-Carlo Pascutto [:gcp] 2012-01-09 11:36:37 PST
https://hg.mozilla.org/releases/mozilla-aurora/rev/579bcfe3d3ac

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