Monday, March 7, 2011

[android-developers] Problem with resources while drawing

Hi,
 I am drawing some images on the canvas with a delay of 1sec continuously. I am getting the following exception when my app comes from background to foreground. 
Can any one tell me what this exception is?? Also, some times when my apps goes to background, it gives exception saying it could not find the image resource.


03-07 15:03:21.082: ERROR/qsd8k.gralloc(97): /dev/pmem: no more pmem available
03-07 15:03:21.082: ERROR/qsd8k.gralloc(97): couldn't open pmem (Try again)
03-07 15:03:21.082: ERROR/qsd8k.gralloc(97): gralloc failed err=Out of memory
03-07 15:03:21.082: WARN/GraphicBufferAllocator(97): alloc(800, 718, 1, 00000133, ...) failed -12 (Out of memory)
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97): Allocated buffers:
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x33a7b8:  539.75 KiB |  519 ( 544) x  254 |        1 | 0x00000133
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x388318: 1346.25 KiB |  480 ( 480) x  718 |        1 | 0x00000133
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x3d0e48: 1428.75 KiB |  480 ( 480) x  762 |        1 | 0x00000303
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x42f5b0: 1500.00 KiB |  480 ( 480) x  800 |        2 | 0x00000133
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x451a70: 1500.00 KiB |  480 ( 480) x  800 |        2 | 0x00000133
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x456a48:  750.00 KiB |  480 ( 480) x  800 |        4 | 0x00000133
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x4591e0: 1500.00 KiB |  480 ( 480) x  800 |        2 | 0x00000133
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x472a28:  539.75 KiB |  519 ( 544) x  254 |        1 | 0x00000133
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x47bc60: 1500.00 KiB |  480 ( 480) x  800 |        2 | 0x00000133
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x4b7ac8:   60.00 KiB |  102 ( 128) x  120 |        1 | 0x00000133
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x4c1990: 1428.75 KiB |  480 ( 480) x  762 |        1 | 0x00000303
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x4cb548: 1500.00 KiB |  480 ( 480) x  800 |        1 | 0x00000133
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x4d4230: 1500.00 KiB |  480 ( 480) x  800 |        2 | 0x00000133
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x4d9900:  539.75 KiB |  519 ( 544) x  254 |        1 | 0x00000133
03-07 15:03:21.082: DEBUG/GraphicBufferAllocator(97):   0x4dc0a0:  204.25 KiB |  603 ( 608) 
03-07 15:03:21.082: ERROR/SurfaceFlinger(97): Layer::requestBuffer(this=0x491a10), index=0, w=800, h=718 failed (Out of memory)
03-07 15:03:21.082: ERROR/Surface(264): Surface (identity=4) requestBuffer(0, 0, 0, 0, 00000033) returned a buffer with a null handle
03-07 15:03:21.082: ERROR/Surface(264): getBufferLocked(0, 0, 0, 0, 00000033) failed (Out of memory)
03-07 15:03:21.082: ERROR/Surface(264): dequeueBuffer failed (Out of memory)
03-07 15:03:21.092: INFO/zephyr.android.mhealth.ftiab.gui.ZephyrOmniSense(10622): onStart
03-07 15:03:21.092: INFO/zephyr.android.mhealth.ftiab.gui.ZephyrOmniSense(10622): onResume
03-07 15:03:21.102: ERROR/ViewRoot(264): OutOfResourcesException locking surface
03-07 15:03:21.102: ERROR/ViewRoot(264): android.view.Surface$OutOfResourcesException
03-07 15:03:21.102: ERROR/ViewRoot(264):     at android.view.Surface.lockCanvasNative(Native Method)
03-07 15:03:21.102: ERROR/ViewRoot(264):     at android.view.Surface.lockCanvas(Surface.java:314)
03-07 15:03:21.102: ERROR/ViewRoot(264):     at android.view.ViewRoot.draw(ViewRoot.java:1456)
03-07 15:03:21.102: ERROR/ViewRoot(264):     at android.view.ViewRoot.performTraversals(ViewRoot.java:1258)
03-07 15:03:21.102: ERROR/ViewRoot(264):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1859)
03-07 15:03:21.102: ERROR/ViewRoot(264):     at android.os.Handler.dispatchMessage(Handler.java:99)
03-07 15:03:21.102: ERROR/ViewRoot(264):     at android.os.Looper.loop(Looper.java:123)
03-07 15:03:21.102: ERROR/ViewRoot(264):     at android.app.ActivityThread.main(ActivityThread.java:3683)
03-07 15:03:21.102: ERROR/ViewRoot(264):     at java.lang.reflect.Method.invokeNative(Native Method)
03-07 15:03:21.102: ERROR/ViewRoot(264):     at java.lang.reflect.Method.invoke(Method.java:507)
03-07 15:03:21.102: ERROR/ViewRoot(264):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
03-07 15:03:21.102: ERROR/ViewRoot(264):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
03-07 15:03:21.102: ERROR/ViewRoot(264):     at dalvik.system.NativeStart.main(Native Method)



Thanks,
Shashidhar

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment