Skip to main content
gamedev.net
🔒 Locked

OpenGL debugging

Started by Zeu5 Dec 27, 2006 at 10:48 AM 5 replies 2k views
Original Post
Zeu5
Zeu5
Hi, I'm in trouble with my OpenGL application. Sometimes it crashes the OpenGL driver, especially on ATIs, a few times it happened on nvidia too. Result: system reboot (nvidia) or corrupted graphics (ATI). Note that with ATI, my application doesn't crash, only the drivers do. With nvidia, the system hangs with a blue screen, showing a crash in the nvidia driver. I don't think it is an hardware problem, because it happened on different computers (all with WinXP, though). I suspect I'm wrong using the API, maybe passing invalid memory pointers to OpenGL or something. I'm calling glGetError once per frame, and I don't get any errors.. Do you know any method to "debug" effectively my application, monitoring the API calls and check if they are valid? Thanks.
sqrt-1
sqrt-1
You could also try GLIntercept with the Full Debug profile. (Hope the crash happens at the start - Full debug is slow)

You can get it here: http://glintercept.nutty.org/

then after the crash, check the log files (gliLog.txt and gliInterceptLog.txt) for any errors. Also look at the last line in gliInterceptLog.txt to see what was the last function call made before the crash.
Zeu5
Zeu5
Ok I'll try with GLIntercept.
Too bad the crash doesn't occour frequently.. and not very soon..
I think I'll get a huge log file! But I'm going to try anyway.

Thanks!
_the_phantom_
_the_phantom_
Quote:
Original post by Richy2k
gDebugger is good at this, but it'll cost you [sad]


note: if you are a student then you can get a full version of gDEBugger for free, provided you can prove it.

Full details are on the Gremedy website
MARS_999
MARS_999
Hmm may have to look at this again when I go back to school next year to finish up my degree in programming... Only thing that sucks is this is only allowed for one year, which you have to renew it and I only plan on taking two classes to finish... :( Who knows maybe I will forkout the cash sometime... Thing that sucks is Mac has a tool already like this and it's for free when you buy a Mac. GLProfiler IIRC. Sometimes I still think about getting one again. :)
GuentherKrass
GuentherKrass
Hi,

I've had the same problems (infrequent unreproductible chrashes, but no bluescreens) when switching a big application to use vertex buffer objects. Program crashed in the driver (oglxx.dll) and I couldn't really debug it.

I guess you're providing invalid memory pointers. One way to get some information if the program crashes is to use try-catch-blocks. I don't know if this helps in your situation, but anyway, here's some code you could try out:


#ifdef _DEBUGint iDriverException = 0;	try	{		glDrawRangeElementsEXT( triangleType, startindex, endindex, vertexCount, GL_UNSIGNED_SHORT, pIndexBufferOffset );	}	catch(...)	{		iDriverException = 1;	}	assert( iDriverException == 0 );#else	glDrawRangeElementsEXT( triangleType, startindex, endindex, vertexCount, GL_UNSIGNED_SHORT, pIndexBufferOffset );#endif


Hope this helps,

Guenther

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.