a***@gmail.com
2007-09-27 11:42:39 UTC
Hi all,
my application had the exceptionally bad habit of crashing on certain
user actions, but often in different places (once code was changed
somewhere).
It's a big application, and finding the crash location kept me busy
for several weeks, in total.
Finally, it seems I've found the cause of the crash: The glClear
function (MS OGL implementation)
If I call glClear(clrDepthBufferBit), the application will crash
(sometimes in wglMakeCurrent, sometimes in glGetIntegerv, sometimes
even in a totally different part of the executable.
If I remove this line of code, the application will run just fine.
I'm still using glClear(clrColorBufferBit), it does not seem to cause
any problems.
Any ideas, WHY glClear would cause a crash (probably overwriting a
portion of memory it doesn't own) when clearing the depth buffer?
Thanks!
Robert
my application had the exceptionally bad habit of crashing on certain
user actions, but often in different places (once code was changed
somewhere).
It's a big application, and finding the crash location kept me busy
for several weeks, in total.
Finally, it seems I've found the cause of the crash: The glClear
function (MS OGL implementation)
If I call glClear(clrDepthBufferBit), the application will crash
(sometimes in wglMakeCurrent, sometimes in glGetIntegerv, sometimes
even in a totally different part of the executable.
If I remove this line of code, the application will run just fine.
I'm still using glClear(clrColorBufferBit), it does not seem to cause
any problems.
Any ideas, WHY glClear would cause a crash (probably overwriting a
portion of memory it doesn't own) when clearing the depth buffer?
Thanks!
Robert