Closed
Bug 707675
Opened 14 years ago
Closed 14 years ago
avoid java.lang.OutOfMemoryError: bitmap size exceeds VM budget
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: aaronmt, Assigned: blassey)
References
Details
(Keywords: crash, reproducible, Whiteboard: [native-crash][inbound])
Attachments
(2 files)
|
5.17 KB,
patch
|
blassey
:
review+
|
Details | Diff | Splinter Review |
|
1.17 KB,
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
E/AndroidRuntime( 1173): FATAL EXCEPTION: Thread-13
E/AndroidRuntime( 1173): java.lang.OutOfMemoryError: bitmap size exceeds VM budget
E/AndroidRuntime( 1173): at android.graphics.Bitmap.nativeCreate(Native Method)
E/AndroidRuntime( 1173): at android.graphics.Bitmap.createBitmap(Bitmap.java:477)
E/AndroidRuntime( 1173): at org.mozilla.gecko.gfx.GeckoSoftwareLayerClient.getBitmap(GeckoSoftwareLayerClient.java:193)
E/AndroidRuntime( 1173): at org.mozilla.gecko.GeckoApp$3.run(GeckoApp.java:601)
E/AndroidRuntime( 1173): at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 1173): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 1173): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 1173): at org.mozilla.gecko.GeckoAppShell$LooperThread.run(GeckoAppShell.java:153)
W/ActivityManager( 110): Force finishing activity org.mozilla.fennec/org.mozilla.gecko.TabsTray
W/ActivityManager( 110): Force finishing activity org.mozilla.fennec/.App
STR:
1. http://espn.com, http://m.engadget.com
2. Switch between tabs
Surely my SII can be capable of opening two tabs without OOMing?
--
Samsung Galaxy SII (Android 2.3.4)
20111205040214
http://hg.mozilla.org/projects/birch/rev/85e665cc4a97
Comment 1•14 years ago
|
||
This is related to bug 706614 - there are multiple instances where the "thumbnail" is generated, and I only caught the OOM in one of them. We should definitely fix this properly and not be allocating ginormous bitmaps for thumbnail purposes.
Updated•14 years ago
|
Keywords: reproducible
Updated•14 years ago
|
Summary: java.lang.OutOfMemoryError: bitmap size exceeds VM budget → Pre-scale thumbnail bitmap to avoid java.lang.OutOfMemoryError: bitmap size exceeds VM budget
Comment 2•14 years ago
|
||
I'm getting this in the emulator, but 5 secs after startup, on about:home (with no other tabs open). I'm presuming it's the same issue, but can file separately if you think it happening on about:home/the slightly different line numbers in the stacktrace mean it's not the same?
http://pastebin.mozilla.org/1394210
emulator settings:
vm.heapSize 24
hw.ramSize 768
| Assignee | ||
Updated•14 years ago
|
Assignee: nobody → blassey.bugs
Comment 3•14 years ago
|
||
Just returning and handling null seemed cleaner than adding a new checked exception to wrap the OOM, so I went with that approach. This should be enough to unblock lucasr.
Attachment #579763 -
Flags: review?(blassey.bugs)
| Assignee | ||
Updated•14 years ago
|
Attachment #579763 -
Flags: review?(blassey.bugs) → review+
| Assignee | ||
Updated•14 years ago
|
Summary: Pre-scale thumbnail bitmap to avoid java.lang.OutOfMemoryError: bitmap size exceeds VM budget → avoid java.lang.OutOfMemoryError: bitmap size exceeds VM budget
| Assignee | ||
Comment 4•14 years ago
|
||
pushed to inbound https://hg.mozilla.org/integration/mozilla-inbound/rev/25bbec664cb0
Whiteboard: [native-crash] → [native-crash][inbound]
Comment 5•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
To QA Testers : When running tests to verify this bug fix, please run steps in bug 706878 to verify it's a dup.
| Reporter | ||
Comment 9•14 years ago
|
||
I can still reproduce this (icanhazcheeseburger.com):
D/dalvikvm( 3405): GC_EXTERNAL_ALLOC freed 838K, 67% free 3488K/10311K, external 20942K/22868K, paused 66ms
E/dalvikvm-heap( 3405): 4194304-byte external allocation too large for this process.
D/dalvikvm( 3405): GC_FOR_MALLOC freed 0K, 67% free 3488K/10311K, external 20942K/22868K, paused 27ms
E/GraphicsJNI( 3405): VM won't let us allocate 4194304 bytes
E/GeckoSoftwareLayerClient( 3405): Unable to create bitmap
E/GeckoSoftwareLayerClient( 3405): java.lang.OutOfMemoryError: bitmap size exceeds VM budget
E/GeckoSoftwareLayerClient( 3405): at android.graphics.Bitmap.nativeCreate(Native Method)
E/GeckoSoftwareLayerClient( 3405): at android.graphics.Bitmap.createBitmap(Bitmap.java:477)
E/GeckoSoftwareLayerClient( 3405): at org.mozilla.gecko.gfx.GeckoSoftwareLayerClient.getBitmap(GeckoSoftwareLayerClient.java:207)
E/GeckoSoftwareLayerClient( 3405): at org.mozilla.gecko.GeckoApp$SessionSnapshotRunnable.run(GeckoApp.java:607)
E/GeckoSoftwareLayerClient( 3405): at android.os.Handler.handleCallback(Handler.java:587)
E/GeckoSoftwareLayerClient( 3405): at android.os.Handler.dispatchMessage(Handler.java:92)
E/GeckoSoftwareLayerClient( 3405): at android.os.Looper.loop(Looper.java:130)
E/GeckoSoftwareLayerClient( 3405): at org.mozilla.gecko.GeckoAppShell$LooperThread.run(GeckoAppShell.java:153)
Running an hourly from today (12/13)
Samsung Nexus S (Android 2.3.6)
20111213113518
http://hg.mozilla.org/mozilla-central/rev/a111d03d465c
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 10•14 years ago
|
||
Aaron - but it's no longer a fatal exception, right? Yes, we still log the exception, but we should no longer crash.
Status: REOPENED → RESOLVED
Closed: 14 years ago → 14 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 11•14 years ago
|
||
Comment on attachment 579763 [details] [diff] [review]
Catch/handle OOMs
Review of attachment 579763 [details] [diff] [review]:
-----------------------------------------------------------------
::: mobile/android/base/gfx/GeckoSoftwareLayerClient.java
@@ +204,5 @@
> + CairoUtils.cairoFormatTobitmapConfig(mFormat));
> + b.copyPixelsFromBuffer(mBuffer.asIntBuffer());
> + return b;
> + } catch (OutOfMemoryError oom) {
> + Log.e(LOGTAG, "Unable to create bitmap", oom);
Let's use the logging level correctly. This should be logged as a warning and not an error. Kat's can you push a follow up, preemptive r=blassey
Comment 13•14 years ago
|
||
Landed on m-c:
https://hg.mozilla.org/mozilla-central/rev/57d355d65a64
Comment 14•13 years ago
|
||
Unable to reproduce this issue on:
Nightly 13.0a1(2012-03-04)
Device: Samsung Galaxy S2
OS: Android 2.3.4
Status: RESOLVED → VERIFIED
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•