OOM in BitmapFactory.decodeResource() in ImageUtilities.loadImageResource()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Collectionista |
New
|
Low
|
Unassigned |
Bug Description
Monkey caught this on emulator-2.1 (seen twice, 0.3.4). The 2.1 emulator is old and very slow. So this even recreated the problem from bug #767567, but then on opening a resId drawable, instead of an unknown drawable. Maybe I should make the CD default covers smaller. Or I should fix it in the same way. But I don't think this is a big issue in real life, when you run OOM, you run OOM.
// CRASH: net.lp.
// Short Msg: bitmap size exceeds VM budget
// Long Msg: java.lang.
// Build Label: android:
// Build Changelist: 35983
// Build Time: 1273161972
// ID:
// Tag: AndroidRuntime
// java.lang.
// at android.
// at android.
// at android.
// at android.
// at net.lp.
// at net.lp.
// at net.lp.
// at net.lp.
// at net.lp.
// at java.lang.
** Monkey aborted due to error.
Events injected: 3582
:Dropped: keys=0 pointers=4 trackballs=0 flips=0
## Network stats: elapsed time=380857ms (380857ms mobile, 0ms wifi, 0ms not connected)
** System appears to have crashed at event 3582 of 10000 using seed 1
Idem with this one, same monkey. Also a built-in drawable: mOverlayImage = resources. getDrawable( R.drawable. cd);
// CRASH: net.lp. collectionista (pid 647)
// Short Msg: bitmap size exceeds VM budget
// Long Msg: java.lang. OutOfMemoryErro r: bitmap size exceeds VM budget
// Build Label: android: generic/ sdk/generic/ :2.1-update1/ ECLAIR/ 35983:eng/ test-keys
// Build Changelist: 35983
// Build Time: 1273161972
// ID:
// Tag: AndroidRuntime
// java.lang. OutOfMemoryErro r: bitmap size exceeds VM budget
// at android. graphics. BitmapFactory. nativeDecodeAss et(BitmapFactor y.java: -2)
// at android. graphics. BitmapFactory. decodeStream( BitmapFactory. java:447)
// at android. graphics. BitmapFactory. decodeResourceS tream(BitmapFac tory.java: 323)
// at android. graphics. drawable. Drawable. createFromResou rceStream( Drawable. java:697)
// at android. content. res.Resources. loadDrawable( Resources. java:1705)
// at android. content. res.Resources. getDrawable( Resources. java:580)
// at net.lp. collectionista. domain. items.cd. CDItem$ CDArtworkCreato r.<init> (CDItem. java:124)
// at net.lp. collectionista. ui.activities. collections. cd.CDCollection ViewWindow. setupViews( CDCollectionVie wWindow. java:1176)
// at net.lp. collectionista. ui.activities. collections. cd.CDCollection ViewWindow. onCreate( CDCollectionVie wWindow. java:720)
// at android. app.Instrumenta tion.callActivi tyOnCreate( Instrumentation .java:1047)
// at android. app.ActivityThr ead.performLaun chActivity( ActivityThread. java:2459)
// at android. app.ActivityThr ead.handleLaunc hActivity( ActivityThread. java:2512)
// at android. app.ActivityThr ead.access$ 2200(ActivityTh read.java: 119)
// at android. app.ActivityThr ead$H.handleMes sage(ActivityTh read.java: 1863)
// at android. os.Handler. dispatchMessage (Handler. java:99)
// at android. os.Looper. loop(Looper. java:123)
// at android. app.ActivityThr ead.main( ActivityThread. java:4363)
// at java.lang. reflect. Method. invokeNative( Method. java:-2)
// at java.lang. reflect. Method. invoke( Method. java:521)
// at com.android. internal. os.ZygoteInit$ MethodAndArgsCa ller.run( ZygoteInit. java:860)
// at com.android. internal. os.ZygoteInit. main(ZygoteInit .java:618)
// at dalvik. system. NativeStart. main(NativeStar t.java: -2)
** Monkey aborted due to error.
Events injected: 2947
:Dropped: keys=0 pointers=87 trackballs=0 flips=0
## Network stats: elapsed time=359613ms (359613ms mobile, 0ms wifi, 0ms not connected)
** System appears to have crashed at event 2947 of 10000 using seed 3