Skip to content

Conversation

@zeraien
Copy link

@zeraien zeraien commented Mar 18, 2015

Kept crashing with EXC_BAD_ACCESS on this line in CCTextureAtlas:
glDrawElements(GL_TRIANGLES, (GLsizei) n*6, GL_UNSIGNED_SHORT, (GLvoid*)(start*6*sizeof(_indices[0])) );

Finding others with similar issues led me to a cocos2d-x commit that seems to fix this issue. See links.

In summary: adding ccGLBindVAO(0); after all calls to glDeleteVertexArrays(1, &_VAOname); seems to fix the issue.

More info here:
http://stackoverflow.com/questions/19236534/ios-7-and-cocos2d-exc-bad-access-on-gldrawelements-completely-random
And here:
https://github.com/jllust/cocos2d-x/commit/1f3c1145362c921bf5232c4ffbca4a5245042bae

patrick99e99 pushed a commit to patrick99e99/cocos2d-iphone-classic that referenced this pull request Nov 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant