Closed Bug 863154 Opened 7 years ago Closed 7 years ago

java.lang.OutOfMemoryError: at android.graphics.BitmapFactory.nativeDecodeStream(Native Method) at org.mozilla.gecko.Favicons$LoadFaviconTask.downloadFavicon(Favicons.java) on ICS and above

Categories

(Firefox for Android :: General, defect)

ARM
Android
defect
Not set
critical

Tracking

()

RESOLVED FIXED
Firefox 23
Tracking Status
firefox20 --- affected
firefox21 --- wontfix
firefox22 --- fixed
firefox23 --- fixed

People

(Reporter: scoobidiver, Assigned: cpeterson)

References

()

Details

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

Crash Data

Attachments

(2 files)

It's #200 crasher in 20.0.1 and #60 in 21.0b2.

Here is a crash report: bp-2c1d5de6-063c-4810-b62f-464b72130418.

java.lang.OutOfMemoryError
	at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
	at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:529)
	at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:601)
	at org.mozilla.gecko.Favicons$LoadFaviconTask.downloadFavicon(Favicons.java:270)
	at org.mozilla.gecko.Favicons$LoadFaviconTask.doInBackground(Favicons.java:318)
	at org.mozilla.gecko.Favicons$LoadFaviconTask.doInBackground(Favicons.java:201)
	at android.os.AsyncTask$2.call(AsyncTask.java:287)
	at java.util.concurrent.FutureTask.run(FutureTask.java:234)
	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
	at java.lang.Thread.run(Thread.java:856)

More reports at:
https://crash-stats.mozilla.com/report/list?signature=java.lang.OutOfMemoryError%3A+at+android.graphics.BitmapFactory.nativeDecodeStream%28Native+Method%29
Keywords: reproducible
Version: Firefox 20 → Trunk
This bitmap OOM is related to bug 863288.
Assignee: nobody → cpeterson
Status: NEW → ASSIGNED
Part 1: Catch Bitmap OOMs when decoding streams.
Attachment #746719 - Flags: review?(mark.finkle)
Part 2: Catch Bitmap OOMs when decoding resources.
Attachment #746720 - Flags: review?(mark.finkle)
Attachment #746719 - Flags: review?(mark.finkle) → review+
Attachment #746720 - Flags: review?(mark.finkle) → review+
Comment on attachment 746720 [details] [diff] [review]
part-2-catch-decodeResource-oom.patch

Now that we are returning null for failures, we might starting seeing other types of crashes that we need to "null check" to victory.
Comment on attachment 746719 [details] [diff] [review]
part-1-catch-decodeStream-oom.patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): N/A
User impact if declined: No change in the number of OOM crashes.
Testing completed (on m-c, etc.): Test locally with 100% repro test case.
Risk to taking this patch (and alternatives if risky): Low risk because it mostly consolidates some error handling and catches OOM exceptions.
String or IDL/UUID changes made by this patch: N/A
Attachment #746719 - Flags: approval-mozilla-aurora?
Comment on attachment 746720 [details] [diff] [review]
part-2-catch-decodeResource-oom.patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): N/A
User impact if declined: No change in the number of OOM crashes.
Testing completed (on m-c, etc.): Test locally with 100% repro test case.
Risk to taking this patch (and alternatives if risky): Low risk because it mostly consolidates some error handling and catches OOM exceptions.
String or IDL/UUID changes made by this patch: N/A
Attachment #746720 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/814044b7f853
https://hg.mozilla.org/mozilla-central/rev/ae87f942ac08
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 23
Attachment #746719 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Attachment #746720 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.