Closed Bug 812867 Opened 12 years ago Closed 12 years ago

java.lang.IllegalArgumentException: width must be > 0 at android.graphics.Bitmap.checkWidthHeight(Bitmap.java)

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
critical

Tracking

(firefox19+ fixed, firefox20 fixed)

RESOLVED FIXED
Firefox 20
Tracking Status
firefox19 + fixed
firefox20 --- fixed

People

(Reporter: scoobidiver, Assigned: lucasr)

Details

(Keywords: crash, topcrash, Whiteboard: [native-crash])

Crash Data

Attachments

(1 file)

There's one crash after the fix of bug 810246: bp-45451617-8f63-4325-885e-5ddac2121118.

java.lang.IllegalArgumentException: width must be > 0
	at android.graphics.Bitmap.checkWidthHeight(Bitmap.java:266)
	at android.graphics.Bitmap.createBitmap(Bitmap.java:531)
	at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:466)
	at org.mozilla.gecko.AwesomeBarTab.updateFavicon(AwesomeBarTab.java:119)
	at org.mozilla.gecko.AllPagesTab.displayFavicon(AllPagesTab.java:806)
	at org.mozilla.gecko.AllPagesTab.access$1000(AllPagesTab.java:61)
	at org.mozilla.gecko.AllPagesTab$AwesomeBarCursorAdapter.getView(AllPagesTab.java:431)
	at android.widget.AbsListView.obtainView(AbsListView.java:2271)
	at android.widget.ListView.makeAndAddView(ListView.java:1769)
	at android.widget.ListView.fillDown(ListView.java:672)
	at android.widget.ListView.fillFromTop(ListView.java:733)
	at android.widget.ListView.layoutChildren(ListView.java:1608)
	at android.widget.AbsListView.onLayout(AbsListView.java:2106)
	at android.view.View.layout(View.java:13754)
	at android.view.ViewGroup.layout(ViewGroup.java:4364)
	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1649)
	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1507)
	at android.widget.LinearLayout.onLayout(LinearLayout.java:1420)
	at android.view.View.layout(View.java:13754)
	at android.view.ViewGroup.layout(ViewGroup.java:4364)
	at android.support.v4.view.ViewPager.onLayout(ViewPager.java:1388)
	at android.view.View.layout(View.java:13754)
	at android.view.ViewGroup.layout(ViewGroup.java:4364)
	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1649)
	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1507)
	at android.widget.LinearLayout.onLayout(LinearLayout.java:1420)
	at org.mozilla.gecko.AwesomeBarTabs$Background.onLayout(AwesomeBarTabs.java:324)
	at android.view.View.layout(View.java:13754)
	at android.view.ViewGroup.layout(ViewGroup.java:4364)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
	at android.view.View.layout(View.java:13754)
	at android.view.ViewGroup.layout(ViewGroup.java:4364)
	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1649)
	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1507)
	at android.widget.LinearLayout.onLayout(LinearLayout.java:1420)
	at android.view.View.layout(View.java:13754)
	at android.view.ViewGroup.layout(ViewGroup.java:4364)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
	at android.view.View.layout(View.java:13754)
	at android.view.ViewGroup.layout(ViewGroup.java:4364)
	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1649)
	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1507)
	at android.widget.LinearLayout.onLayout(LinearLayout.java:1420)
	at android.view.View.layout(View.java:13754)
	at android.view.ViewGroup.layout(ViewGroup.java:4364)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
	at android.view.View.layout(View.java:13754)
	at android.view.ViewGroup.layout(ViewGroup.java:4364)
	at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1868)
	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1689)
	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)
	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4214)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
	at android.view.Choreographer.doCallbacks(Choreographer.java:555)
	at android.view.Choreographer.doFrame(Choreographer.java:525)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
	at android.os.Handler.handleCallback(Handler.java:615)
	at android.os.Handler.dispatchMessage(Handler.java:92)
	at android.os.Looper.loop(Looper.java:137)
	at android.app.ActivityThread.main(ActivityThread.java:4745)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:511)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
	at dalvik.system.NativeStart.main(Native Method)

More reports at:
https://crash-stats.mozilla.com/report/list?signature=java.lang.IllegalArgumentException%3A+width+must+be+%3E+0+at+android.graphics.Bitmap.checkWidthHeight%28Bitmap.java%29
Assignee: nobody → lucasr.at.mozilla
It seems that my patch for bug XXX was just band-aid for a more fundamental issue. We need to discard invalid images even before saving them in our disk/memory caches.
Attachment #687098 - Flags: review?(mark.finkle)
XXX = 810246 I assume
(In reply to Scoobidiver from comment #2)
> XXX = 810246 I assume

Yep :-)
Attachment #687098 - Flags: review?(mark.finkle) → review+
https://hg.mozilla.org/mozilla-central/rev/1b808aa8cb2e
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
It's currently #21 top crasher in 19.0b1.
It's #2 top crasher in the first hours of 19.0b4. If that tendency is confirmed, it may have spiked because of bug 837373.
Keywords: topcrash
Does that mean we may still want to uplift this patch to 19/Beta, late in the cycle as we are? Those two signatures (bug 837373 and this one) are pretty dominant on b4 in early data.
lucasr/bnicholson - can you please nominate for uplift to Beta with a risk evaluation?
Flags: needinfo?(bnicholson)
Comment on attachment 687098 [details] [diff] [review]
Discard invalid favicon images

[Approval Request Comment]
Bug caused by (feature/regressing bug #): unknown (but made worse by bug 837373)
User impact if declined: crashes
Testing completed (on m-c, etc.): fx20 and fx21
Risk to taking this patch (and alternatives if risky): Low risk. On its own, there could still be crashes since this checks favicons only before they go into the DB, and users' DBs could have been affected by this bug before this patch landed. However, in combination with bug 837373 (which also checks the favicons after they're pulled from the DB), this won't be an issue.
String or UUID changes made by this patch: none
Attachment #687098 - Flags: approval-mozilla-beta?
Flags: needinfo?(bnicholson)
(In reply to Brian Nicholson (:bnicholson) from comment #11)
> Comment on attachment 687098 [details] [diff] [review]
> Discard invalid favicon images
> 
> [Approval Request Comment]
> Bug caused by (feature/regressing bug #): unknown (but made worse by bug
> 837373)

Sorry, that should have read "made worse by bug 819973".
Attachment #687098 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
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: