Last Comment Bug 714148 - NullPointerException at org.mozilla.gecko.db.AndroidBrowserDB.updateFaviconForUrl
: NullPointerException at org.mozilla.gecko.db.AndroidBrowserDB.updateFaviconFo...
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]
: Sebastian Kaspari (:sebastian)
Depends on:
  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:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

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(
E/AndroidRuntime(15451): 	at org.mozilla.gecko.db.BrowserDB.updateFaviconForUrl(
E/AndroidRuntime(15451): 	at org.mozilla.gecko.ProfileMigrator$PlacesTask.addFavicon(
E/AndroidRuntime(15451): 	at org.mozilla.gecko.ProfileMigrator$PlacesTask.migrateFavicons(
E/AndroidRuntime(15451): 	at org.mozilla.gecko.ProfileMigrator$PlacesTask.migratePlaces(
E/AndroidRuntime(15451): 	at org.mozilla.gecko.ProfileMigrator$
E/AndroidRuntime(15451): 	at
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
Comment 5 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-12-30 04:53:31 PST
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

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