gpus_ReturnGuiltyForHardwareRestart崩溃 [英] gpus_ReturnGuiltyForHardwareRestart crash

查看:3624
本文介绍了gpus_ReturnGuiltyForHardwareRestart崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前帧缓冲区中的应用程序崩溃(在前台运行时,没有发生中断)。



它不会在第一帧中崩溃,它画了一段时间,然后它突然崩溃。



没有确切的步骤来重现,但似乎相关的绘制的东西具体,仍然我没有openGL错误报告通过应用程序,包括一个错误检查前的presentFrameBuffer。如果我在glFinish中的presentFrameBuffer之前添加glFinish。



应用程序崩溃与EXC_BAD_ACCESS(代码= 1,地址= 0x1)和上述callstack没有任何其他错误/ log / debug info。



这是在崩溃时报告的callstack:



com.apple.main-thread

 > #0 0x36871e46 in gpus_ReturnGuiltyForHardwareRestart()
> #1 0x36872764 in gpusSubmitDataBuffers()
> #2 0x31eae624 in SubmitPacketsIfAny()
> #3 0x378a337a in gliPresentViewES()
> #4 0x325b6df2 in - [EAGLContext presentRenderbuffer:]()
> #5 0x0052986e in EAGLContext_presentRenderbuffer(EAGLContext *,objc_selector *,unsigned int)()
> #6 0x000e2a48 in - [EAGLView presentFramebuffer] at /svn/src_svn/GG/iphone/Classes/EAGLView.mm:228
> #7 0x000e4066 in - [GGViewController drawFrame] at /svn/src_svn/GG/iphone/Classes/GGViewController.mm:504
> #8 0x3809ab0a in __NSFireTimer()
> #9 0x39d36856 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__()
> #10 0x39d36502 in __CFRunLoopDoTimer()
> #11 0x39d35176 in __CFRunLoopRun()
> #12 0x39ca823c in CFRunLoopRunSpecific()
> #13 0x39ca80c8 in CFRunLoopRunInMode()
> #14 0x39b9333a in GSEventRunModal()
> #15 0x3551b288 in UIApplicationMain()
> #16 0x000e1bae in main at /svn/src_svn/GG/iphone/main.m:14

任何人

如果你使用VAO,这可能是由索引缓冲区(元素数组缓冲区)引起的)引用超出顶点缓冲区限制(VBO)的顶点。



请记住,元素数组缓冲区存储在VAO中,因此只要VAO绑定,每次调用glBindBuffer(GL_ELEMENT_ARRAY_BUFFER)替换索引缓冲区。如果您在移动到场景的下一个对象时忘记解除VAO的绑定,则会更改上一个调用的VAO。



更多信息在此处: http://www.opengl.org/wiki/Vertex_Specification#Index_buffers



和一个调试提示:超大你的顶点缓冲区,它可能会把这个崩溃变成一个毛刺,然后你可以检查与XCode的OpenGL ES帧捕获工具(这需要XCode 4.5和iOS 6) 。


Application crashes in presentFrameBuffer (while running in foreground, no interruption occurring).

It's not crashing in the first frame, it draws for a while then it suddenly crashes.

I don't have exact steps to reproduce, but seems related to drawing something specific, still I have no openGL error reported trough the application, including one error check right before the presentFrameBuffer. If I add glFinish before the presentFrameBuffer will crash in the glFinish.

Application is crashing with EXC_BAD_ACCESS (code=1, address=0x1) and the above callstack without any other error/log/debug info.

Here is the callstack reported at the crash:

Thread 1, Queue : com.apple.main-thread

>     #0    0x36871e46 in gpus_ReturnGuiltyForHardwareRestart ()
>     #1    0x36872764 in gpusSubmitDataBuffers ()
>     #2    0x31eae624 in SubmitPacketsIfAny ()
>     #3    0x378a337a in gliPresentViewES ()
>     #4    0x325b6df2 in -[EAGLContext presentRenderbuffer:] ()
>     #5    0x0052986e in EAGLContext_presentRenderbuffer(EAGLContext*, objc_selector*, unsigned int) ()
>     #6    0x000e2a48 in -[EAGLView presentFramebuffer] at /svn/src_svn/GG/iphone/Classes/EAGLView.mm:228
>     #7    0x000e4066 in -[GGViewController drawFrame] at /svn/src_svn/GG/iphone/Classes/GGViewController.mm:504
>     #8    0x3809ab0a in __NSFireTimer ()
>     #9    0x39d36856 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ ()
>     #10   0x39d36502 in __CFRunLoopDoTimer ()
>     #11   0x39d35176 in __CFRunLoopRun ()
>     #12   0x39ca823c in CFRunLoopRunSpecific ()
>     #13   0x39ca80c8 in CFRunLoopRunInMode ()
>     #14   0x39b9333a in GSEventRunModal ()
>     #15   0x3551b288 in UIApplicationMain ()
>     #16   0x000e1bae in main at /svn/src_svn/GG/iphone/main.m:14

Anyone has any clue about this one ?

解决方案

If you are using VAO, this can be caused by the index buffer (element array buffer) referencing vertices beyond the vertex buffer limits (VBO).

Keep in mind that the element array buffer is stored in the VAO, so as long as the VAO is bound, each call to glBindBuffer( GL_ELEMENT_ARRAY_BUFFER ) replaces the index buffer. If you forget to unbind the VAO when you move to your scene's next object you will be altering the VAO of the previous call.

More info over here: http://www.opengl.org/wiki/Vertex_Specification#Index_buffers

And a debugging tip: oversize your vertex buffers, it might turn this crash into a glitch that you can then inspect with the OpenGL ES frame capture tool of XCode (this requires XCode 4.5 and iOS 6).

这篇关于gpus_ReturnGuiltyForHardwareRestart崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆