Closed Bug 961498 Opened 11 years ago Closed 11 years ago

Crash in java.lang.ClassCastException: org.mozilla.gecko.favicons.decoders.ICODecoder$ICOIterator cannot be cast to org.mozilla.gecko.favicons.decoders.FaviconDecoder$SingleBitmapIterator

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
critical

Tracking

(firefox29 verified)

VERIFIED FIXED
Firefox 29
Tracking Status
firefox29 --- verified

People

(Reporter: aaronmt, Assigned: ckitching)

References

()

Details

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

Crash Data

Attachments

(1 file)

E/GeckoAppShell(12437): >>> REPORTING UNCAUGHT EXCEPTION FROM THREAD 541 ("GeckoBackgroundThread") E/GeckoAppShell(12437): java.lang.ClassCastException: org.mozilla.gecko.favicons.decoders.ICODecoder$ICOIterator cannot be cast to org.mozilla.gecko.favicons.decoders.FaviconDecoder$SingleBitmapIterator E/GeckoAppShell(12437): at org.mozilla.gecko.favicons.decoders.LoadFaviconResult.getBytesForDatabaseStorage(LoadFaviconResult.java:53) E/GeckoAppShell(12437): at org.mozilla.gecko.favicons.LoadFaviconTask.doInBackground$2d4c763b(LoadFaviconTask.java:379) E/GeckoAppShell(12437): at org.mozilla.gecko.favicons.LoadFaviconTask.doInBackground$42af7916(LoadFaviconTask.java:42) E/GeckoAppShell(12437): at org.mozilla.gecko.util.UiAsyncTask$BackgroundTaskRunnable.run(UiAsyncTask.java:48) E/GeckoAppShell(12437): at android.os.Handler.handleCallback(Handler.java:733) E/GeckoAppShell(12437): at android.os.Handler.dispatchMessage(Handler.java:95) E/GeckoAppShell(12437): at android.os.Looper.loop(Looper.java:136) E/GeckoAppShell(12437): at org.mozilla.gecko.util.GeckoBackgroundThread.run(GeckoBackgroundThread.java:32) Visit http://bing.com, crash bp-2102e821-b915-447e-8fde-fd2502140119 -- Nightly (01/19)
Flags: in-testsuite?
Flags: needinfo?(rnewman)
Flags: needinfo?(chriskitching)
Severity: normal → critical
Keywords: crash
Bing doesn't work? Clearly a feature. The Bing favicon is an ICO containin a single 16x16 BMP payload. The offending cast is casting to SingleBitmapIterator if the hasMultipleBitmaps flag of the result object is false. The logic of the decoder, however, always uses an ICOIterator if the input is an ICO, even if it only has a single entry. Since the ICOIterator does some lazy-decoding stuff for ICOs, it seems that the solution is to change this flag to "isICO" and continue always using ICOIterator in such cases. Patch to follow.
Flags: needinfo?(chriskitching)
Assignee: nobody → chriskitching
This ought to do it. Locally testing bing this does the trick - loads the favicon okay (When it exploded without the patch). Comments, RNewman?
Attachment #8362256 - Flags: review?(rnewman)
Comment on attachment 8362256 [details] [diff] [review] Prevent ICO decoder from exploding when faced with single-resource ICOs Review of attachment 8362256 [details] [diff] [review]: ----------------------------------------------------------------- If this fixes things, wfm. I'll be around today to hit m-c.
Attachment #8362256 - Flags: review?(rnewman) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(rnewman)
Resolution: --- → FIXED
Hardware: ARM → All
Target Milestone: --- → Firefox 29
(In reply to Richard Newman [:rnewman] from comment #5) > https://hg.mozilla.org/mozilla-central/rev/b56b70d548a2 Why not just merge fx-team over?
Too much time pressure to wait for a full green fx-team, sheriff the rest, and spend time with m-cMerge. Working on fixing another couple of bugs before work starts for real on Monday :/
Oh happy day: there are actually two bugs here. Even if I fix the decode part, there's still no icon being returned from the DB.
It was the only cset on fx-team that would have been merged and it was already pretty green on fx-team (2hrs is plenty of time for Android builds/tests to run for the most part). Just saying.
(In reply to Richard Newman [:rnewman] from comment #8) > Oh happy day: there are actually two bugs here. Even if I fix the decode > part, there's still no icon being returned from the DB. Oops: this comment should have hit Bug 961538.
Status: RESOLVED → VERIFIED
tracking-fennec: ? → ---
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: