View Full Version : EXC_BAD_ACCESS on calling glGenRenderbuffers()

Nov 30, 2011, 05:26 PM
I'm trying to move a codebase I have from GL2 to GL3 and as soon as I call glGenRenderbuffers() I get EXC_BAD_ACCESS. I think the function pointer itself is the problem and not the second pointer parameter (the code works perfectly when using a GL 2.X profile with GLEW extension loading). Any ideas?

Nov 30, 2011, 06:26 PM
Any ideas?

Use the debugger.

If you don't know how to use it, learn to. Not knowing how to use a debugger is a serious impediment.

I recommend learning to use a debugger by doing it on a known-working program, rather than a known-failing one (suggested: one of Apple's sample code projects). It lets you see the normal operation of setting breakpoints, watchpoints, tracing, stepping, inspecting values, etc. If you try doing that on a malfunctioning program, it's a lot harder to see what's normal, since a malfunctioning program is abnormal.

Nov 30, 2011, 09:12 PM
Ran across this today:

How to debug EXC_BAD_ACCESS (http://www.touch-code-magazine.com/how-to-debug-exc_bad_access/)

Perhaps it'll help.