memory - Android - view.Surface OutOfResourcesException -


my android app seems not releasing views when move around inside of listview navigation , standard menu key. after hundred or different (of 10 or unique views) loads, starts lagging , black screening.

error log:

07-01 09:54:42.913: info/activitymanager(1279): starting: intent { cmp=com.site.android.conferencecompanion/.search } pid 31290 07-01 09:54:43.013: error/msm7x30.gralloc(1279): /dev/pmem: no more pmem available 07-01 09:54:43.013: error/msm7x30.gralloc(1279): couldn't open pmem (no such file or directory) 07-01 09:54:43.013: error/msm7x30.gralloc(1279): gralloc failed err=out of memory 07-01 09:54:43.013: warn/graphicbufferallocator(1279): alloc(480, 800, 1, 00000133, ...) failed -12 (out of memory) 07-01 09:54:43.013: debug/graphicbufferallocator(1279): allocated buffers: 07-01 09:54:43.013: debug/graphicbufferallocator(1279):   0x290740: 1500.00 kib |  480 ( 480) x  800 |        1 | 0x00000133 07-01 09:54:43.013: debug/graphicbufferallocator(1279):   0x307448:   60.00 kib |  102 ( 128) x  120 |        1 | 0x00000133 07-01 09:54:43.013: debug/graphicbufferallocator(1279):   0x32e4c0:   71.25 kib |  480 ( 480) x   38 |        1 | 0x00000133 07-01 09:54:43.013: debug/graphicbufferallocator(1279):   0x3caad8:   60.00 kib |  102 ( 128) x  120 |        1 | 0x00000133 07-01 09:54:43.013: debug/graphicbufferallocator(1279):   0x4a47f8: 1346.25 kib |  480 ( 480) x  718 |        1 | 0x00000133 07-01 09:54:43.013: debug/graphicbufferallocator(1279):   0x4f9710: 1500.00 kib |  480 ( 480) x  800 |        1 | 0x00000133 07-01 09:54:43.013: debug/graphicbufferallocator(1279):   0x54c500: 1500.00 kib |  480 ( 480) x  800 |        1 | 0x00000133 07-01 09:54:43.013: debug/graphicbufferallocator(1279):   0x5d1c00: 1500.00 kib |  480 ( 480) x  800 |        1 | 0x00000133 07-01 09:54:43.013: debug/graphicbufferallocator(1279):   0x5f5f98: 1500.00 kib |  480 ( 480) x  800 |        1 | 0x00000133 07-01 09:54:43.013: debug/graphicbufferallocator(1279):   0x604600:   60.00 kib |  126 ( 128) x  120 |        1 | 0x00000133 07-01 09:54:43.013: debug/graphicbufferallocator(1279):   0x60a3d0:  750.00 kib |  480 ( 480) x  800 |        4 | 0x00000133 07-01 09:54:43.013: debug/graphicbufferallocator(1279):   0x661270: 1428.75 kib |  480 ( 480) x  762 |        1 | 0x00000133 07-01 09:54:43.013: debug/graphicbufferallocator(1279):   0x6830b8:  750.00 kib |  480 ( 480) x  800 |        4 | 0x00000133 07-01 09:54:43.013: debug/graphicbufferallocator(1279):   0x70e0e8: 1500.00 kib |  480 ( 480) x  800 |        1 | 0x00000133 07-01 09:54:43.013: debug/graphicbufferallocator(1279):   0x71f238:   71.25 kib |  480 ( 480)  07-01 09:54:43.013: error/surfaceflinger(1279): layer::requestbuffer(this=0x189d50), index=0, w=480, h=800 failed (out of memory) 07-01 09:54:43.013: error/surface(31290): surface (identity=4545) requestbuffer(0, 0, 0, 0, 00000033) returned buffer null handle 07-01 09:54:43.013: error/surface(31290): getbufferlocked(0, 0, 0, 0, 00000033) failed (out of memory) 07-01 09:54:43.013: error/surface(31290): dequeuebuffer failed (out of memory) 07-01 09:54:43.013: error/viewroot(31290): outofresourcesexception locking surface 07-01 09:54:43.013: error/viewroot(31290): android.view.surface$outofresourcesexception 07-01 09:54:43.013: error/viewroot(31290):     @ android.view.surface.lockcanvasnative(native method) 07-01 09:54:43.013: error/viewroot(31290):     @ android.view.surface.lockcanvas(surface.java:314) 07-01 09:54:43.013: error/viewroot(31290):     @ android.view.viewroot.draw(viewroot.java:1457) 07-01 09:54:43.013: error/viewroot(31290):     @ android.view.viewroot.performtraversals(viewroot.java:1259) 07-01 09:54:43.013: error/viewroot(31290):     @ android.view.viewroot.handlemessage(viewroot.java:1860) 07-01 09:54:43.013: error/viewroot(31290):     @ android.os.handler.dispatchmessage(handler.java:99) 07-01 09:54:43.013: error/viewroot(31290):     @ android.os.looper.loop(looper.java:123) 07-01 09:54:43.013: error/viewroot(31290):     @ android.app.activitythread.main(activitythread.java:3839) 07-01 09:54:43.013: error/viewroot(31290):     @ java.lang.reflect.method.invokenative(native method) 07-01 09:54:43.013: error/viewroot(31290):     @ java.lang.reflect.method.invoke(method.java:507) 07-01 09:54:43.013: error/viewroot(31290):     @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:841) 07-01 09:54:43.013: error/viewroot(31290):     @ com.android.internal.os.zygoteinit.main(zygoteinit.java:599) 07-01 09:54:43.013: error/viewroot(31290):     @ dalvik.system.nativestart.main(native method) 07-01 09:54:43.203: info/activitymanager(1279): displayed com.site.android.conferencecompanion/.search: +292ms 

adb shell dumpsys window reveals following:

#1 - #29, junk #30: appwindowtoken{40bbc000 token=historyrecord{408cc260 com.site.android.conferencecompanion/.programdates}}  ...  #142: appwindowtoken{40ba65a8 token=historyrecord{40b93808 com.site.android.conferencecompanion/.programspeakers}} 

so, if understand correctly, 112 views being held in memory. there can this? there check or flag or parameter i'm missing? misinterpretting dump?

thanks!

a great way check see leaks coming , if in eclipse, window->open perspecive -> ddms select running process process selection , use allocation tracker.boot app do not touch app before start allocation tracker. think cause problem , check allocations every time. should show code causing leak.

also if post code take @ it.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -