PDA

View Full Version : Anyone ever borked OpenGL like this?


scratt
2008-07-15, 03:43
This was fun for a few minutes, before I decided that it might be a good idea to reboot!

borkedGL! (http://www.extremesportscafe.com/hosting_offsite/borkedGL.mov)

Basically a thread went rouge (or more likely was *forgotten* about by XCode) when I quickly restarted a debug session.
All kinds of hilarity ensued as the process still running kept issuing random commands to OpenGL, while the OS tried to be sensible and draw windows..
I am not sure that kind of thing is supposed to happen, certainly not by accident, even when hacking in XCode!

It's a bit like the OpenGL debugging tool that allows you to see updates to the screen as yellow flashes. Except mine is psychedelic!! ;)

Sorry for the crap video, but Snapz Pro (not unsurprisingly as it too uses OpenGL) was unable to record a video so I had to go 'handy-cam' with my iPhone!

I am operating on two monitors hence the switch back and forth, and whenever I tried to do Expose it would freak the whole screen out.
The rest of the time it just borked up whatever was being updated by the system. Most noticeably my iStat Menus.

To be honest I am surprised the GPU kept running, as far less has frozen it on my MBP.

:)

RobUSVI
2008-07-31, 09:18
I've noticed that Apple's OpenGL implementation doesn't have much in the way of error checking on input parameters. I usually end up with kernel panics rather than interesting artifacts as you demonstrate above.

scratt
2008-07-31, 10:07
Heh. This post sort of sunk without a trace... how did you bump into it?
Actually, I guess the 'Nook' ones hang around a while...

I've had some even more interesting ones recently.. and yes you are right.. OpenGL allows a lot of 'freedom', and it seems awfully easy to take the GPU out with careless code, often forcing you to reboot...

That kind of took me by surprise when I got heavily into using it without the indirection of a Scene Graph API above it.