Crash when exit with OF 0.6 OF_GAME_MODE

OF_GAME_MODE will change the screen resolution, which is expected, but when quit from the program it crash, then my task bar will keep the position (middle of the desktop). It’s not a major issue, but it was working fine with 0.5. maybe this is not using glut anymore?

take a look at main.cpp if you have something like:

  
  
testApp app;  
ofRunApp(&app);  

change it with:

  
ofRunApp(new testApp());  

in 006 the app is being deleted when the application is closed, if you have created it like in the first example it cannot be deleted as it’s created in the stack and the application crashes.

Here is my main.cpp.

  
	  
// can be OF_WINDOW or OF_FULLSCREEN  
// pass in width and height too:  
	ofSetupOpenGL(1024,768, OF_WINDOW);	// <-------- setup the GL context  
//OF_GAME_MODE  
//OF_WINDOW  
// this kicks off the running of my app  
	ofRunApp(new testApp);  
  

The problem is it’s only happens when using GL_GAME_MODE, which means when it changes the current screen resolution. FULL_SCREEN and WINDOW mode are fine.

Test with WindowsXP, Windows Vista both.

One quick thought, is that possible because of CB it self, from 0.6 I switched from VS.Net to CB then the problem start to happen

One quick thought, is that possible because of CB it self, from 0.6 I switched from VS.Net to CB then the problem start to happen

Negative. I’m still using VS and this began happening upon upgrading to 0.6 for me as well.

i also get this error.
it says there is an access violation in ofAppGlutWindow.cpp in row 681

are there any solutions or workarounds yet?

I’m experiencing the same crash. I can’t find any calls for glutLeaveGameMode() in ofAppGlutWindow. Could this be causing the problem?

Is OF_GAME_MODE the only way to change resolution?

http://forum.openframeworks.cc/t/switching-to-game-mode-at-runtime/871/0

i find that if i don’t set the callback of glutReshapeFunc in OF_GAME_MODE, the program will not crash.

file: ofAppGlutWindow.cpp
void ofAppGlutWindow::initializeWindow(){

if (windowMode != OF_GAME_MODE)
glutReshapeFunc(resize_cb);
}

Hope it is the solution of this.

this also seems to be fixed in the version I grabbed from github