Errno = 13 以及如何更有效地调试它?
我正在制作一个应用程序,当我从菜单转到使用 e3roid 框架显示图像的其他活动时,我总是得到这个(logcat):
D/PhoneWindow( 1562): DebugMonitor class=com.recisio.kfandroid.gui.tab.KFFeaturedTab focus=false
E/copybit ( 1562): Error opening frame buffer errno=13 (Permission denied)
D/PhoneWindow( 1562): DebugMonitor class=com.recisio.kfandroid.gui.player.KFPlayer focus=true
我在问自己错误来自哪里? 有没有办法知道它到底发生在哪里? 我可以忽略这一点吗?
显然,copybit 只是基本 2D blitter 的抽象,支持旋转、缩放和颜色/像素格式转换。
但奇怪的是,所有加载的图像都很好地显示在我的屏幕上。
好的:我尝试改变我打印的 bmp 的编码方式,如下所示:
return Bitmap.createBitmap(bitmap_width, bitmap_height, Bitmap.Config.RGB_565);
但这并不能解决问题。
通过在代码中随处打印几个显示信息,我意识到加载 e3roid 引擎时会发生错误。
我将在等待更多答案的同时查看来源。
经过一些打印我之前创建的 bmp(有效)的测试后,我得到了这个
E/copybit ( 3274): Error opening frame buffer errno=13 (Permission denied)
D/dalvikvm( 3274): GC freed 3337 objects / 132024 bytes in 150ms
I/DEBUG ( 1145): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 1145): Build fingerprint: 'vodafone_fr/htc_buzz/buzz/buzz:2.1-update1/ERE27/183733:user/release-keys'
I/DEBUG ( 1145): pid: 3274, tid: 3519 >>> com.recisio.kfandroid <<<
I/DEBUG ( 1145): signal 11 (SIGSEGV), fault addr 00000000
I/DEBUG ( 1145): r0 46c62008 r1 00000000 r2 00100000 r3 00000018
I/DEBUG ( 1145): r4 4685fd10 r5 00000002 r6 46c62008 r7 0000000c
I/DEBUG ( 1145): r8 00000000 r9 4191fd20 10 00000de1 fp 002e4428
I/DEBUG ( 1145): ip 80000000 sp 4685fc98 lr acc9697b pc afe0e060 cpsr a0000010
I/DEBUG ( 1145): #00 pc 0000e060 /system/lib/libc.so
I/DEBUG ( 1145): #01 pc 00016978 /system/lib/egl/libGLES_android.so
I/DEBUG ( 1145): #02 pc 00016d5a /system/lib/egl/libGLES_android.so
I/DEBUG ( 1145): #03 pc 0002886c /system/lib/libandroid_runtime.so
I/DEBUG ( 1145): #04 pc 0000f3f4 /system/lib/libdvm.so
I/DEBUG ( 1145):
I/DEBUG ( 1145): code around pc:
I/DEBUG ( 1145): afe0e050 0a00000a e1530002 8202301c e1b0ce03
I/DEBUG ( 1145): afe0e060 28b100f0 48b10300 28a000f0 48a00300
I/DEBUG ( 1145): afe0e070 e3130004 1491a004 1480a004 e0422003
I/DEBUG ( 1145):
I/DEBUG ( 1145): code around lr:
I/DEBUG ( 1145): acc96968 5c39008f 434b6936 435a1c30 f7ed6921
I/DEBUG ( 1145): acc96978 e020e91a fef4f7ff 28001c05 480fd101
I/DEBUG ( 1145): acc96988 69c2e01a 47901c31 1c2169ab 47981c28
I/DEBUG ( 1145):
I/DEBUG ( 1145): stack:
I/DEBUG ( 1145): 4685fc58 001615b8 [heap]
I/DEBUG ( 1145): 4685fc5c 00000800
I/DEBUG ( 1145): 4685fc60 00000000
I/DEBUG ( 1145): 4685fc64 acc97fdb /system/lib/egl/libGLES_android.so
I/DEBUG ( 1145): 4685fc68 00301418 [heap]
I/DEBUG ( 1145): 4685fc6c acc9604d /system/lib/egl/libGLES_android.so
I/DEBUG ( 1145): 4685fc70 00010002 [heap]
I/DEBUG ( 1145): 4685fc74 00100000 [heap]
I/DEBUG ( 1145): 4685fc78 00000200
I/DEBUG ( 1145): 4685fc7c 00000200
I/DEBUG ( 1145): 4685fc80 001615b8 [heap]
I/DEBUG ( 1145): 4685fc84 acc95f3d /system/lib/egl/libGLES_android.so
I/DEBUG ( 1145): 4685fc88 afe38e08 /system/lib/libc.so
I/DEBUG ( 1145): 4685fc8c afe0eed4 /system/lib/libc.so
I/DEBUG ( 1145): 4685fc90 df002777
I/DEBUG ( 1145): 4685fc94 e3a070ad
I/DEBUG ( 1145): #00 4685fc98 00000002
I/DEBUG ( 1145): 4685fc9c 46c62008
I/DEBUG ( 1145): 4685fca0 0000000c
I/DEBUG ( 1145): 4685fca4 00000000
I/DEBUG ( 1145): 4685fca8 4191fd20
I/DEBUG ( 1145): 4685fcac 00000de1
I/DEBUG ( 1145): 4685fcb0 002e4428 [heap]
I/DEBUG ( 1145): 4685fcb4 46c62008
I/DEBUG ( 1145): 4685fcb8 4685fd10
I/DEBUG ( 1145): 4685fcbc acc9697b /system/lib/egl/libGLES_android.so
I/DEBUG ( 1145): #01 4685fcc0 4106788c /dev/ashmem/dalvik-LinearAlloc (deleted)
I/DEBUG ( 1145): 4685fcc4 002e4428 [heap]
I/DEBUG ( 1145): 4685fcc8 ad053c19 /system/lib/libdvm.so
I/DEBUG ( 1145): 4685fccc 00000000
I/DEBUG ( 1145): 4685fcd0 ad080f8c /system/lib/libdvm.so
I/DEBUG ( 1145): 4685fcd4 00300ea0 [heap]
I/DEBUG ( 1145): 4685fcd8 00000200
I/DEBUG ( 1145): 4685fcdc 001615cc [heap]
I/DEBUG ( 1145): 4685fce0 00000001
I/DEBUG ( 1145): 4685fce4 acc96d5f /system/lib/egl/libGLES_android.so
I/DEBUG ( 1145): debuggerd committing suicide to free the zombie!
I/DEBUG ( 3535): debuggerd: May 28 2010 02:08:39
这是什么?
I'm making an application and when i go from menu to an other activity that display image using the e3roid framework, i allways get this (logcat):
D/PhoneWindow( 1562): DebugMonitor class=com.recisio.kfandroid.gui.tab.KFFeaturedTab focus=false
E/copybit ( 1562): Error opening frame buffer errno=13 (Permission denied)
D/PhoneWindow( 1562): DebugMonitor class=com.recisio.kfandroid.gui.player.KFPlayer focus=true
I'm questionning myself about where does the error come?
Is there a way to know exactly where it happens?
May i have to ignore this?
Apparently, copybit is just an abstraction for a basic 2D blitter with support for rotation, scaling and color/pixelformat conversions.
But where it's strange it's that all the images loaded appears well on my screen.
Ok: I tried to change the way i was encoding the bmp I print like this:
return Bitmap.createBitmap(bitmap_width, bitmap_height, Bitmap.Config.RGB_565);
but it doesn't solve the problem.
By printing several display infos everywhere in my code i realised that the error happens while loading the e3roid engine.
I'm going to look at the sources while waiting for more answers.
After some tests with printing a bmp i create before (valid), I get this
E/copybit ( 3274): Error opening frame buffer errno=13 (Permission denied)
D/dalvikvm( 3274): GC freed 3337 objects / 132024 bytes in 150ms
I/DEBUG ( 1145): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 1145): Build fingerprint: 'vodafone_fr/htc_buzz/buzz/buzz:2.1-update1/ERE27/183733:user/release-keys'
I/DEBUG ( 1145): pid: 3274, tid: 3519 >>> com.recisio.kfandroid <<<
I/DEBUG ( 1145): signal 11 (SIGSEGV), fault addr 00000000
I/DEBUG ( 1145): r0 46c62008 r1 00000000 r2 00100000 r3 00000018
I/DEBUG ( 1145): r4 4685fd10 r5 00000002 r6 46c62008 r7 0000000c
I/DEBUG ( 1145): r8 00000000 r9 4191fd20 10 00000de1 fp 002e4428
I/DEBUG ( 1145): ip 80000000 sp 4685fc98 lr acc9697b pc afe0e060 cpsr a0000010
I/DEBUG ( 1145): #00 pc 0000e060 /system/lib/libc.so
I/DEBUG ( 1145): #01 pc 00016978 /system/lib/egl/libGLES_android.so
I/DEBUG ( 1145): #02 pc 00016d5a /system/lib/egl/libGLES_android.so
I/DEBUG ( 1145): #03 pc 0002886c /system/lib/libandroid_runtime.so
I/DEBUG ( 1145): #04 pc 0000f3f4 /system/lib/libdvm.so
I/DEBUG ( 1145):
I/DEBUG ( 1145): code around pc:
I/DEBUG ( 1145): afe0e050 0a00000a e1530002 8202301c e1b0ce03
I/DEBUG ( 1145): afe0e060 28b100f0 48b10300 28a000f0 48a00300
I/DEBUG ( 1145): afe0e070 e3130004 1491a004 1480a004 e0422003
I/DEBUG ( 1145):
I/DEBUG ( 1145): code around lr:
I/DEBUG ( 1145): acc96968 5c39008f 434b6936 435a1c30 f7ed6921
I/DEBUG ( 1145): acc96978 e020e91a fef4f7ff 28001c05 480fd101
I/DEBUG ( 1145): acc96988 69c2e01a 47901c31 1c2169ab 47981c28
I/DEBUG ( 1145):
I/DEBUG ( 1145): stack:
I/DEBUG ( 1145): 4685fc58 001615b8 [heap]
I/DEBUG ( 1145): 4685fc5c 00000800
I/DEBUG ( 1145): 4685fc60 00000000
I/DEBUG ( 1145): 4685fc64 acc97fdb /system/lib/egl/libGLES_android.so
I/DEBUG ( 1145): 4685fc68 00301418 [heap]
I/DEBUG ( 1145): 4685fc6c acc9604d /system/lib/egl/libGLES_android.so
I/DEBUG ( 1145): 4685fc70 00010002 [heap]
I/DEBUG ( 1145): 4685fc74 00100000 [heap]
I/DEBUG ( 1145): 4685fc78 00000200
I/DEBUG ( 1145): 4685fc7c 00000200
I/DEBUG ( 1145): 4685fc80 001615b8 [heap]
I/DEBUG ( 1145): 4685fc84 acc95f3d /system/lib/egl/libGLES_android.so
I/DEBUG ( 1145): 4685fc88 afe38e08 /system/lib/libc.so
I/DEBUG ( 1145): 4685fc8c afe0eed4 /system/lib/libc.so
I/DEBUG ( 1145): 4685fc90 df002777
I/DEBUG ( 1145): 4685fc94 e3a070ad
I/DEBUG ( 1145): #00 4685fc98 00000002
I/DEBUG ( 1145): 4685fc9c 46c62008
I/DEBUG ( 1145): 4685fca0 0000000c
I/DEBUG ( 1145): 4685fca4 00000000
I/DEBUG ( 1145): 4685fca8 4191fd20
I/DEBUG ( 1145): 4685fcac 00000de1
I/DEBUG ( 1145): 4685fcb0 002e4428 [heap]
I/DEBUG ( 1145): 4685fcb4 46c62008
I/DEBUG ( 1145): 4685fcb8 4685fd10
I/DEBUG ( 1145): 4685fcbc acc9697b /system/lib/egl/libGLES_android.so
I/DEBUG ( 1145): #01 4685fcc0 4106788c /dev/ashmem/dalvik-LinearAlloc (deleted)
I/DEBUG ( 1145): 4685fcc4 002e4428 [heap]
I/DEBUG ( 1145): 4685fcc8 ad053c19 /system/lib/libdvm.so
I/DEBUG ( 1145): 4685fccc 00000000
I/DEBUG ( 1145): 4685fcd0 ad080f8c /system/lib/libdvm.so
I/DEBUG ( 1145): 4685fcd4 00300ea0 [heap]
I/DEBUG ( 1145): 4685fcd8 00000200
I/DEBUG ( 1145): 4685fcdc 001615cc [heap]
I/DEBUG ( 1145): 4685fce0 00000001
I/DEBUG ( 1145): 4685fce4 acc96d5f /system/lib/egl/libGLES_android.so
I/DEBUG ( 1145): debuggerd committing suicide to free the zombie!
I/DEBUG ( 3535): debuggerd: May 28 2010 02:08:39
What is this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
嗯..我猜你的设备支持 ARGB_8888 因为所有图像
在屏幕上加载良好。 OpenGL 有时会显示奇怪的错误
设备遇到内存不足的情况。
Hmm..I guess your device supports ARGB_8888 because all the images
loaded well on your screen. OpenGL sometimes shows strange errors when
the device encounters low memory situations.
我前段时间也遇到过同样的错误,这是由于内存不足造成的。在模拟器 logcat 中,而不是在我的手机上(野火),它显示:
OutOfMemoryException
。确保使用
recycle()
方法从内存中清除位图。I had the same error some times ago, it was due to a lack of memory. In the emulator logcat and not on my phone (wildfire) it was saying:
OutOfMemoryException
.Make sure you use the
recycle()
nethod to clear bitmap from the memory.如果您使用不受支持的纹理格式,则可能会发生这种情况。尝试使用 RGB565。您可以在此处找到有关该问题的一些信息:http://code.google .com/p/processing/issues/detail?id=391
This can happen if you are using a not supported texture format. Try using a RGB565. Here you can find some info about the issue: http://code.google.com/p/processing/issues/detail?id=391