Login  Register

Re: Unable to set pixel format 4 for device context

Posted by Wade Walker on Apr 30, 2011; 10:51pm
URL: https://forum.jogamp.org/Unable-to-set-pixel-format-4-for-device-context-tp2852819p2884391.html

Hmm, I'm not quite ready to give up on the thread explanation yet. The thing that makes me suspect multithreading errors is that both of our stack dumps come out of redraw events, which are triggered asynchronous to the main loop that you've set up (the error is in the AWT event thread, and your main loop is in the main thread). When one thread is asynchronously accessing data that's being changed by another, that sounds like a recipe for multithreading problems

I just thought of a new failure mode for this program -- the AWT thread could fire a redraw right between your calls to ss.cleanup() and ss.init(), while GL is in a non-set-up state. My previous version didn't account for this. Try this new version (SimpleScene.java) to see if that works for you. I've just changed the synchronization to insure that render() can never happen between cleanup() and init().