out of memory - Please help solve these exceptions, android? -
this logcat of app
07-11 11:31:25.269: d/-heap(6666): gc_for_alloc freed 1256k, 13% free 28316k/32227k, paused 34ms 07-11 11:31:25.309: d/-heap(6666): gc_before_oom freed 414k, 14% free 27901k/32227k, paused 42ms 07-11 11:31:25.309: e/dalvikvm-heap(6666): out of memory on 20155408-byte allocation. 07-11 11:31:25.309: i/dalvikvm(6666): "main" prio=5 tid=1 runnable 07-11 11:31:25.309: i/dalvikvm(6666): | group="main" scount=0 dscount=0 obj=0x40b01c58 self=0x1640e80 07-11 11:31:25.309: i/dalvikvm(6666): | systid=6666 nice=0 sched=0/0 cgrp=default handle=1074922856 07-11 11:31:25.319: i/dalvikvm(6666): | schedstat=( 0 0 0 ) utm=351 stm=36 core=0 07-11 11:31:25.319: i/dalvikvm(6666): @ android.graphics.bitmapfactory.nativedecodestream(native method) 07-11 11:31:25.319: i/dalvikvm(6666): @ android.graphics.bitmapfactory.decodestream(bitmapfactory.java:500) 07-11 11:31:25.319: i/dalvikvm(6666): @ android.graphics.bitmapfactory.decodefile(bitmapfactory.java:306) 07-11 11:31:25.319: i/dalvikvm(6666): @ android.graphics.bitmapfactory.decodefile(bitmapfactory.java:331) 07-11 11:31:25.319: i/dalvikvm(6666): @ com.callplanets.chat.ui.talk$discussarrayadapter.getview(talk.java:939) 07-11 11:31:25.319: i/dalvikvm(6666): @ android.widget.abslistview.obtainview(abslistview.java:2045) 07-11 11:31:25.319: i/dalvikvm(6666): @ android.widget.listview.makeandaddview(listview.java:1772) 07-11 11:31:25.319: i/dalvikvm(6666): @ android.widget.listview.fillup(listview.java:705) 07-11 11:31:25.319: i/dalvikvm(6666): @ android.widget.listview.correcttoohigh(listview.java:1395) 07-11 11:31:25.319: i/dalvikvm(6666): @ android.widget.listview.fillspecific(listview.java:1333) 07-11 11:31:25.319: i/dalvikvm(6666): @ android.widget.listview.layoutchildren(listview.java:1615) 07-11 11:31:25.319: i/dalvikvm(6666): @ android.widget.abslistview.onlayout(abslistview.java:1875) 07-11 11:31:25.319: i/dalvikvm(6666): @ android.view.view.layout(view.java:11390) 07-11 11:31:25.319: i/dalvikvm(6666): @ android.view.viewgroup.layout(viewgroup.java:4332) 07-11 11:31:25.319: i/dalvikvm(6666): @ android.widget.relativelayout.onlayout(relativelayout.java:930) 07-11 11:31:25.319: i/dalvikvm(6666): @ android.view.view.layout(view.java:11390) 07-11 11:31:25.319: i/dalvikvm(6666): @ android.view.viewgroup.layout(viewgroup.java:4332) 07-11 11:31:25.319: i/dalvikvm(6666): @ android.widget.framelayout.onlayout(framelayout.java:444) 07-11 11:31:25.319: i/dalvikvm(6666): @ android.view.view.layout(view.java:11390) 07-11 11:31:25.319: i/dalvikvm(6666): @ android.view.viewgroup.layout(viewgroup.java:4332) 07-11 11:31:25.319: i/dalvikvm(6666): @ android.widget.linearlayout.setchildframe(linearlayout.java:1653) 07-11 11:31:25.319: i/dalvikvm(6666): @ android.widget.linearlayout.layoutvertical(linearlayout.java:1511) 07-11 11:31:25.319: i/dalvikvm(6666): @ android.widget.linearlayout.onlayout(linearlayout.java:1416) 07-11 11:31:25.329: i/dalvikvm(6666): @ android.view.view.layout(view.java:11390) 07-11 11:31:25.329: i/dalvikvm(6666): @ android.view.viewgroup.layout(viewgroup.java:4332) 07-11 11:31:25.329: i/dalvikvm(6666): @ android.widget.framelayout.onlayout(framelayout.java:444) 07-11 11:31:25.329: i/dalvikvm(6666): @ android.view.view.layout(view.java:11390) 07-11 11:31:25.329: i/dalvikvm(6666): @ android.view.viewgroup.layout(viewgroup.java:4332) 07-11 11:31:25.329: i/dalvikvm(6666): @ android.view.viewrootimpl.performtraversals(viewrootimpl.java:1490) 07-11 11:31:25.329: i/dalvikvm(6666): @ android.view.viewrootimpl.handlemessage(viewrootimpl.java:2455) 07-11 11:31:25.329: i/dalvikvm(6666): @ android.os.handler.dispatchmessage(handler.java:99) 07-11 11:31:25.329: i/dalvikvm(6666): @ android.os.looper.loop(looper.java:137) 07-11 11:31:25.329: i/dalvikvm(6666): @ android.app.activitythread.main(activitythread.java:4424) 07-11 11:31:25.329: i/dalvikvm(6666): @ java.lang.reflect.method.invokenative(native method) 07-11 11:31:25.329: i/dalvikvm(6666): @ java.lang.reflect.method.invoke(method.java:511) 07-11 11:31:25.329: i/dalvikvm(6666): @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:817) 07-11 11:31:25.329: i/dalvikvm(6666): @ com.android.internal.os.zygoteinit.main(zygoteinit.java:584) 07-11 11:31:25.329: i/dalvikvm(6666): @ dalvik.system.nativestart.main(native method) 07-11 11:31:26.399: e/dalvikvm(6666): can't open /data/misc/hprof_oom_dump.hprof: permission denied 07-11 11:31:26.419: d/-heap(6666): dump of hprof not done 07-11 11:31:26.419: d/skia(6666): --- decoder->decode returned false 07-11 11:31:26.419: w/dalvikvm(6666): threadid=1: thread exiting uncaught exception (group=0x40b009f0) 07-11 11:31:26.429: e/androidruntime(6666): fatal exception: main 07-11 11:31:26.429: e/androidruntime(6666): java.lang.outofmemoryerror 07-11 11:31:26.429: e/androidruntime(6666): @ android.graphics.bitmapfactory.nativedecodestream(native method) 07-11 11:31:26.429: e/androidruntime(6666): @ android.graphics.bitmapfactory.decodestream(bitmapfactory.java:500) 07-11 11:31:26.429: e/androidruntime(6666): @ android.graphics.bitmapfactory.decodefile(bitmapfactory.java:306) 07-11 11:31:26.429: e/androidruntime(6666): @ android.graphics.bitmapfactory.decodefile(bitmapfactory.java:331) 07-11 11:31:26.429: e/androidruntime(6666): @ com.callplanets.chat.ui.talk$discussarrayadapter.getview(talk.java:939) 07-11 11:31:26.429: e/androidruntime(6666): @ android.widget.abslistview.obtainview(abslistview.java:2045) 07-11 11:31:26.429: e/androidruntime(6666): @ android.widget.listview.makeandaddview(listview.java:1772) 07-11 11:31:26.429: e/androidruntime(6666): @ android.widget.listview.fillup(listview.java:705) 07-11 11:31:26.429: e/androidruntime(6666): @ android.widget.listview.correcttoohigh(listview.java:1395) 07-11 11:31:26.429: e/androidruntime(6666): @ android.widget.listview.fillspecific(listview.java:1333) 07-11 11:31:26.429: e/androidruntime(6666): @ android.widget.listview.layoutchildren(listview.java:1615) 07-11 11:31:26.429: e/androidruntime(6666): @ android.widget.abslistview.onlayout(abslistview.java:1875) 07-11 11:31:26.429: e/androidruntime(6666): @ android.view.view.layout(view.java:11390) 07-11 11:31:26.429: e/androidruntime(6666): @ android.view.viewgroup.layout(viewgroup.java:4332) 07-11 11:31:26.429: e/androidruntime(6666): @ android.widget.relativelayout.onlayout(relativelayout.java:930) 07-11 11:31:26.429: e/androidruntime(6666): @ android.view.view.layout(view.java:11390) 07-11 11:31:26.429: e/androidruntime(6666): @ android.view.viewgroup.layout(viewgroup.java:4332) 07-11 11:31:26.429: e/androidruntime(6666): @ android.widget.framelayout.onlayout(framelayout.java:444) 07-11 11:31:26.429: e/androidruntime(6666): @ android.view.view.layout(view.java:11390) 07-11 11:31:26.429: e/androidruntime(6666): @ android.view.viewgroup.layout(viewgroup.java:4332) 07-11 11:31:26.429: e/androidruntime(6666): @ android.widget.linearlayout.setchildframe(linearlayout.java:1653) 07-11 11:31:26.429: e/androidruntime(6666): @ android.widget.linearlayout.layoutvertical(linearlayout.java:1511) 07-11 11:31:26.429: e/androidruntime(6666): @ android.widget.linearlayout.onlayout(linearlayout.java:1416) 07-11 11:31:26.429: e/androidruntime(6666): @ android.view.view.layout(view.java:11390) 07-11 11:31:26.429: e/androidruntime(6666): @ android.view.viewgroup.layout(viewgroup.java:4332) 07-11 11:31:26.429: e/androidruntime(6666): @ android.widget.framelayout.onlayout(framelayout.java:444) 07-11 11:31:26.429: e/androidruntime(6666): @ android.view.view.layout(view.java:11390) 07-11 11:31:26.429: e/androidruntime(6666): @ android.view.viewgroup.layout(viewgroup.java:4332) 07-11 11:31:26.429: e/androidruntime(6666): @ android.view.viewrootimpl.performtraversals(viewrootimpl.java:1490) 07-11 11:31:26.429: e/androidruntime(6666): @ android.view.viewrootimpl.handlemessage(viewrootimpl.java:2455) 07-11 11:31:26.429: e/androidruntime(6666): @ android.os.handler.dispatchmessage(handler.java:99) 07-11 11:31:26.429: e/androidruntime(6666): @ android.os.looper.loop(looper.java:137) 07-11 11:31:26.429: e/androidruntime(6666): @ android.app.activitythread.main(activitythread.java:4424) 07-11 11:31:26.429: e/androidruntime(6666): @ java.lang.reflect.method.invokenative(native method) 07-11 11:31:26.429: e/androidruntime(6666): @ java.lang.reflect.method.invoke(method.java:511) 07-11 11:31:26.429: e/androidruntime(6666): @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:817) 07-11 11:31:26.429: e/androidruntime(6666): @ com.android.internal.os.zygoteinit.main(zygoteinit.java:584) 07-11 11:31:26.429: e/androidruntime(6666): @ dalvik.system.nativestart.main(native method)
these main exceptions: 07-11 11:31:25.309: e/dalvikvm-heap(6666): out of memory on 20155408-byte allocation. 07-11 11:31:26.399: e/dalvikvm(6666): can't open /data/misc/hprof_oom_dump.hprof: permission denied
how can solve these issue? please tell....
i have activity on show thumbnail of image picked gallery. on click of thumbnail take user activity , display regular size.
on of 2nd activity exception occurs.
by reducing/scale size of image can rid out of out of memory exception, try this
bitmapfactory.options options = new bitmapfactory.options(); options.insamplesize = 8; bitmap receipt = bitmapfactory.decodefile(photo.tostring(),options); //from file can customise on needs.
Comments
Post a Comment