Reusing VBO's causing errors.

I realize this thread is a bit old, but I'd rather post here than make a new thread about the same problem.

My renderer has 4 stages, and for whatever reason stages 2 3 and 4 cause issues. They work on their own, and when one of the stages is commented out, but they fail when working together. When everything is enabled and glDrawArrays in stage 4 is called, the application exists with ACCESS VIOLATION error in the nvoglv64.dll file.

I do initialize every opengl object (nothing is 0, and as I mentioned they all work perfectly when at least 1 other stage is commented out). I also checked the FBO, and it didn't show any errors.

I actually think it might be the VBO, since the thing works without either stage 2 or 4. I enabled everything and used glDrawArrays(GL_TRIANGLES, 0, 3) in the stage 4, and it drew exactly 1 triangle as expected, but drawing 2 causes the error.

It is the same VAO/VBO as used in stage 2, which is even more strange.