Page 1 of 1

FBO stack overflow

Posted: Thu Sep 05, 2013 8:18 am
by jsm
Hi all !

Does anyone already have this error message : "error [ccGLWindow::paintGL/FBOstart] stack overflow" ?
Sometimes, this message appears in a small ok window when I am handling an object with the mouse. Then, it is impossible to continue handling objects. The message appears again and again. The only solution is to quit the program.

Maybe I add this bug when modifying the code, but I do not think I changed anything in the ccGLWindow.cpp file.

JS

Re: FBO stack overflow

Posted: Thu Sep 05, 2013 8:52 am
by daniel
Well this error means that something is pushed on the GL stack (see all the glPushXXX methods, such as matrices, attributes, names, etc.) but it's not "popped out" (glPopXXX).

And this apparently happens either during FBO initialization, but more likely even before it (we just ask OpenGL for eventual errors from time to time - see the CatchGLError method).

Anyway, this kind of bug is hard to track if you don't know what kind of entity produces it. Have you guessed if it always happen when displaying a certain type of entity? Do you play a lot with particular entities (such as sensors) maybe?

One way to track this bug is to "instrument" your code with lots of calls to "CatchGLError" (with custom strings as parameters to be able to recognize them) during the 'ccGLWindow::paintGL' method course, and also in the entities "drawMeOnly" methods.

Good luck,