Hi all,

I am having a bit of an odd issue with my OpenGL application.
I'll first present a rough layout of the application (it's grown rather big and complex over the past half-year), this will help me describe the issue I'm having.

The application runs the traditional game-loop, switching between game-states. Currently there are two game-states, one for the main menu, and one for the level editor. The main menu is a straight-forward menu navigation system allowing the user to load up the level editor, and thus switch to other game-states.
The GUI for the main menu and GUI items in the level editor are a custom rollout, using vertex array buffers and all that to render it through shaders.

The issue I'm having is the following:
On release builds only, the level editor sometimes will not seem to initialise properly.
What is expected is that the editor loads up a terrain, a skybox and sets up the level editor GUI. The GUI (both for main menu, and level editor) is always visible, however the terrain and skybox (which is just a skydome rendered through a Mesh class) are not always visible/don't seem to load up correctly. I have a wireframe toggling button, and I don't see any traces of the terrain or skybox at all, so it seems somehow it's not loading in the necesarry buffers correctly...

The frustrating part is that, as I said, it only happens on some (release) builds. Sometimes I'll go in and add a new GUI Element, rebuild, and the terrain and skybox will be visible once again. On Debug builds, I have not experienced this terrain/skybox problem at all (yet, and I run it regularly), so it seems that this is limited to Release builds only.

I'd post code, but the codebase has become quite large, and I doubt people would want to wade through it :-)

My question is really just a request for guidance, has anyone here experienced similar issues? If so, where should I start looking in order to find the problem?

I've tried using debugger tools for windows, and squashed any warnings or errors that gave.
I've also tried using windows application verifier, however that always crashes upon the window-creation code (more specifically on the setPixelFormat method), so I can't let it run any further into the application to find potential heap-issues.

I'm of course willing to post any code if someone is willing to look at specific parts (I'm even prepared to share the SVN repository link in good trust, if necesarry). This problem has been persisting for months now, and it's about time it gets dealt with :-)

Thank you very much for any input!