Pages

Monday, January 21, 2013

EXC_BAD_ACCESS from sgxTextureGetImageRowBytes

Anyone seen this error before? I can't tell if my iPad 4 is dying or not; other apps work fine, but my app (which is now a near clone of Apple's GLKit example for setting up an OpenGL ES 2.0 iOS app) has started, frequently, crashing.

 

My application was running fine yesterday, almost a hundred source files (nearly a finished iOS game). Then it starts crashing, and after reverting back to previous revisions, it still kept crashing, and now I've reverted all the way back to its origins (a copy&paste of Apple's source examples), and it crashes with just this:

 

Code:


- (void)glkView:(GLKView *)view drawInRect:(CGRect)rect

{

    glClearColor(0.0f, 0.0f, 0.0f, 0.0f);

    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

}

 

 

StackTrace:

 

#0      0x32979c20 in sgxTextureGetImageRowBytes(GLDTextureRec*, unsigned int, unsigned int) ()

#1      0x32979bd2 in CalculateChunkPlaneSizes(GLDTextureRec*, int, unsigned int*, unsigned int*, unsigned int*, unsigned int*) ()

#2      0x3297c336 in sgxConfigureTexturePrivate(GLDTextureRec*) ()

#3      0x3297af88 in glrUpdateTexture ()

#4      0x341a56c0 in gldLoadFramebuffer ()

#5      0x38387bd4 in gleUpdateDrawFramebufferState ()

#6      0x382ffa60 in glClear_Exec ()

#7      0x001221ea in clear ()



View the original article here

3 comments:

  1. I just started seeing this crash in some nearly empty sample apps, as well. I don't know what's causing it. Restarting the device seems to alleviate the problem for a launch or two, but the crashes are persistent.

    Apps I developed before (and installed through the App Store) don't exhibit the crash. I hope you come up with a solution and figure out the root of the problem. I would love to see it if you do.

    ReplyDelete
  2. I've just started running into the same problem today on my app. I'm using OpenGLES 1.1, and get the same exc_bad_access from a similar stack trace after my glDrawArrays call.

    ReplyDelete
  3. were you ever able to find a solution?

    ReplyDelete