Quote Originally Posted by code_glitch View Post
So, I've done some looking and it seems that the BadAccess is supposedly caused by trying to make an opengl current while it is being used by another thread. However - the same binary works fine on most desktop environments (cinnamon, gnome 2.x and 3.x, IceWM (with metacity running)) but not on unity and lxde (sometimes - this one is hit and miss).

Thus, I tested it in a single threaded program - with exactly the same results under the troublesome desktop environments. GDB is of no use at all as it thinks the program terminated successfully and thus refuses to give me a trace of any kind.
Another thread doesen't just mean another thread of your application. It could mean another thread of any application even the OS for that mater. And based on my short survey Unity shell is GPU acelerated. So there is a remote posibility that your application can't sucsessfully get OpenGL hande becouse the OS already has one.

Just my thoughts. They might be compleetly off since I have no expirience with Linux development.