Closed Bug 863288 Opened 12 years ago Closed 11 years ago

java.lang.OutOfMemoryError: at android.graphics.BitmapFactory.nativeDecodeByteArray(Native Method) at org.mozilla.gecko.AboutHomeContent/TopSitesView.getThumbnailsFromCursor(TopSitesView.java)

Categories

(Firefox for Android Graveyard :: General, defect)

22 Branch
ARM
Android
defect
Not set
critical

Tracking

(firefox21 unaffected, firefox22 fixed, firefox23 fixed)

RESOLVED FIXED
Firefox 23
Tracking Status
firefox21 --- unaffected
firefox22 --- fixed
firefox23 --- fixed

People

(Reporter: scoobidiver, Assigned: cpeterson)

References

Details

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

Crash Data

Attachments

(1 file)

It's similar to bug 827248. Here is a crash report: bp-52483582-7f66-4990-bc73-8433d2130414. java.lang.OutOfMemoryError at android.graphics.BitmapFactory.nativeDecodeByteArray(Native Method) at android.graphics.BitmapFactory.decodeByteArray(BitmapFactory.java:430) at android.graphics.BitmapFactory.decodeByteArray(BitmapFactory.java:447) at org.mozilla.gecko.widget.TopSitesView.getThumbnailsFromCursor(TopSitesView.java:302) at org.mozilla.gecko.widget.TopSitesView$5.doInBackground(TopSitesView.java:324) at org.mozilla.gecko.widget.TopSitesView$5.doInBackground(TopSitesView.java:321) at org.mozilla.gecko.util.UiAsyncTask$BackgroundTaskRunnable.run(UiAsyncTask.java:48) at android.os.Handler.handleCallback(Handler.java:605) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:137) at org.mozilla.gecko.util.GeckoBackgroundThread.run(GeckoBackgroundThread.java:32) More reports at: https://crash-stats.mozilla.com/query/query?product=FennecAndroid&query_search=signature&query_type=contains&query=android.graphics.BitmapFactory.nativeDecodeByteArray%28Native+Method%29+&&do_query=1
Add sanity checks and error logging for bitmap decoding. This patch won't "fix" the OutOfMemoryErrors, but it should avoid some random crashes. Do we need to support bitmaps with width or height of 0 pixels?
Attachment #740589 - Flags: review?(sriram)
(Sriram is on PTO for the next 2 weeks, so you may want to find another reviewer.)
(In reply to Chris Peterson (:cpeterson) from comment #2) > Do we need to support bitmaps with width or height of 0 pixels? Not that I am aware.
Attachment #740589 - Flags: review?(sriram) → review+
Summary: java.lang.OutOfMemoryError: at android.graphics.BitmapFactory.nativeDecodeByteArray(Native Method) at org.mozilla.gecko.AboutHomeContent.getThumbnailsFromCursor(TopSitesView.java) → java.lang.OutOfMemoryError: at android.graphics.BitmapFactory.nativeDecodeByteArray(Native Method) at org.mozilla.gecko.AboutHomeContent/TopSitesView.getThumbnailsFromCursor(TopSitesView.java)
Crash Signature: [@ java.lang.OutOfMemoryError: at android.graphics.BitmapFactory.nativeDecodeByteArray(Native Method)] [@ java.lang.OutOfMemoryError: (Heap Size=49187KB, Allocated=43866KB) at android.graphics.BitmapFactory.nativeDecodeByteArray(Native Method)] [@ java.… → [@ java.lang.OutOfMemoryError: at android.graphics.BitmapFactory.nativeDecodeByteArray(Native Method) ] [@ java.lang.OutOfMemoryError: (Heap Size=49187KB, Allocated=43866KB) at android.graphics.BitmapFactory.nativeDecodeByteArray(Native Method) ] [@ jav…
Assignee: nobody → cpeterson
Status: NEW → ASSIGNED
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/96c0eae610a2 - six of the seven Android 4.0 robocop-1 runs that have finished so far have hung starting up testAwesomebar.
(In reply to Phil Ringnalda (:philor) from comment #6) > Backed out in > https://hg.mozilla.org/integration/mozilla-inbound/rev/96c0eae610a2 - six of > the seven Android 4.0 robocop-1 runs that have finished so far have hung > starting up testAwesomebar. Looks like the Android 4.0 rc1 tests are still hanging after the backout: https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=96c0eae610a2
Fun, huh? By this morning, it's more like a 50% hang in the middle of testBookmarksTab, before it even gets to that testAwesomebar startup hang.
Free to reland, I hid robocop-1 on pandas on mozilla-inbound and mozilla-central, bug 865557.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 23
Blocks: 827248
Comment on attachment 740589 [details] [diff] [review] robustify-bitmap-decoding.patch [Approval Request Comment] Bug caused by (feature/regressing bug #): N/A User impact if declined: Some infrequent OOM crashes Testing completed (on m-c, etc.): m-c Risk to taking this patch (and alternatives if risky): Low risk. This patch tries to avoid crashing on a Java OutOfMemoryError when creating large bitmaps, but we might just be pushing the OOM exception to a later memory allocation. String or IDL/UUID changes made by this patch: N/A
Attachment #740589 - Flags: approval-mozilla-aurora?
Attachment #740589 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Blocks: 778459
Depends on: 867058
Depends on: 878424
Depends on: 890515
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: