[GtkGLExt] gdk_gl_new_config_by_mode causes runtime exception



I've been trying to get GtkGlExt to run in my program however everytime I call gdk_gl_config_new_by_mode; it causes an access violation exception inside __security_init_cookie! I tried playing around and displaying all other GTK code, other then gtk_init and gtk_gl_init, and it still raises the exception.

I'm using Visual Studio 2008 SP1 and C++.

Thanks for any help,
James.

Here is my main function code:

int main(int argc, char* argv[])
{

   gtk_init(&argc, &argv);
   gtk_gl_init(&argc, &argv);

Globals::getSingleton().glConfig = gdk_gl_config_new_by_mode(static_cast<GdkGLConfigMode>(GDK_GL_MODE_RGB | GDK_GL_MODE_DOUBLE));
   if( !Globals::getSingleton().glConfig ) {
       g_printerr("Unable to initialize OpenGL!\n");
       exit(1);
   }

Globals::getSingleton().mainWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);
   if( !Globals::getSingleton().mainWindow ) {
       g_printerr("Unable to create main window!\n");
       exit(1);
   }

g_signal_connect(G_OBJECT(Globals::getSingleton().mainWindow), "destroy", G_CALLBACK(quitWindow), NULL);

gtk_window_resize(GTK_WINDOW(Globals::getSingleton().mainWindow), 800, 600); gtk_container_set_border_width(GTK_CONTAINER(Globals::getSingleton().mainWindow), 4);

   if( !initWidgets(Globals::getSingleton().mainWindow) ) {
       exit(1);
   }

   gtk_widget_show(Globals::getSingleton().mainWindow);

   gtk_main();

   return 0;

}

Here is what my output window coughs up:

'GtkEditor.exe': Loaded 'D:\Sources\C++\GtkEditor\Debug\GtkEditor.exe', Symbols loaded.
'GtkEditor.exe': Loaded 'C:\Windows\System32\ntdll.dll'
'GtkEditor.exe': Loaded 'C:\Windows\System32\kernel32.dll'
'GtkEditor.exe': Loaded 'D:\Sources\C++\GtkEditor\Debug\libgobject-2.0-0.dll', Binary was not built with debug information. 'GtkEditor.exe': Loaded 'D:\Sources\C++\GtkEditor\Debug\libglib-2.0-0.dll', Binary was not built with debug information.
'GtkEditor.exe': Loaded 'C:\Windows\System32\advapi32.dll'
'GtkEditor.exe': Loaded 'C:\Windows\System32\rpcrt4.dll'
'GtkEditor.exe': Loaded 'C:\Windows\System32\msvcrt.dll'
'GtkEditor.exe': Loaded 'C:\Windows\System32\ole32.dll'
'GtkEditor.exe': Loaded 'C:\Windows\System32\gdi32.dll'
'GtkEditor.exe': Loaded 'C:\Windows\System32\user32.dll'
'GtkEditor.exe': Loaded 'C:\Windows\System32\shell32.dll'
'GtkEditor.exe': Loaded 'C:\Windows\System32\shlwapi.dll'
'GtkEditor.exe': Loaded 'C:\Windows\System32\ws2_32.dll'
'GtkEditor.exe': Loaded 'C:\Windows\System32\nsi.dll'
'GtkEditor.exe': Loaded 'D:\Sources\C++\GtkEditor\Debug\libgtk-win32-2.0-0.dll', Binary was not built with debug information. 'GtkEditor.exe': Loaded 'D:\Sources\C++\GtkEditor\Debug\libgdk_pixbuf-2.0-0.dll', Binary was not built with debug information. 'GtkEditor.exe': Loaded 'D:\Sources\C++\GtkEditor\Debug\libgmodule-2.0-0.dll', Binary was not built with debug information. 'GtkEditor.exe': Loaded 'D:\Sources\C++\GtkEditor\Debug\libgdk-win32-2.0-0.dll', Binary was not built with debug information. 'GtkEditor.exe': Loaded 'D:\Sources\C++\GtkEditor\Debug\libcairo-2.dll', Binary was not built with debug information.
'GtkEditor.exe': Loaded 'C:\Windows\System32\msimg32.dll'
'GtkEditor.exe': Loaded 'D:\Sources\C++\GtkEditor\Debug\libpng12-0.dll', Binary was not built with debug information. 'GtkEditor.exe': Loaded 'D:\Sources\C++\GtkEditor\Debug\zlib1.dll', Binary was not built with debug information. 'GtkEditor.exe': Loaded 'D:\Sources\C++\GtkEditor\Debug\libpango-1.0-0.dll', Binary was not built with debug information. 'GtkEditor.exe': Loaded 'D:\Sources\C++\GtkEditor\Debug\libpangocairo-1.0-0.dll', Binary was not built with debug information. 'GtkEditor.exe': Loaded 'D:\Sources\C++\GtkEditor\Debug\libpangowin32-1.0-0.dll', Binary was not built with debug information.
'GtkEditor.exe': Loaded 'C:\Windows\System32\imm32.dll'
'GtkEditor.exe': Loaded 'C:\Windows\System32\msctf.dll'
'GtkEditor.exe': Loaded 'D:\Sources\C++\GtkEditor\Debug\libatk-1.0-0.dll', Binary was not built with debug information. 'GtkEditor.exe': Loaded 'D:\Sources\C++\GtkEditor\Debug\intl.dll', Binary was not built with debug information. 'GtkEditor.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.6001.18000_none_886786f450a74a05\comctl32.dll'
'GtkEditor.exe': Loaded 'C:\Windows\System32\comdlg32.dll'
'GtkEditor.exe': Loaded 'C:\Windows\System32\winspool.drv'
'GtkEditor.exe': Loaded 'C:\Windows\System32\lpk.dll'
'GtkEditor.exe': Loaded 'C:\Windows\System32\usp10.dll'
'GtkEditor.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6001.18000_none_5cdbaa5a083979cc\comctl32.dll' First-chance exception at 0x0001af22 in GtkEditor.exe: 0xC0000005: Access violation. Unhandled exception at 0x0001af22 in GtkEditor.exe: 0xC0000005: Access violation. The program '[2112] GtkEditor.exe: Native' has exited with code -1073741819 (0xc0000005).



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]