Access violation in get_graphics_window function

Hi all,
I have prob when i am use this function call (the bold one):

WindowFramework * win = framework.get_window(0);
GraphicsWindow *gwin = win->get_graphics_window();

and vs2008 give me thet error log:

‘panda test.exe’: Loaded ‘C:\Users\Dror\Documents\Visual Studio 2008\Projects\panda test\Release\panda test.exe’, Symbols loaded.
‘panda test.exe’: Loaded ‘C:\Windows\System32\ntdll.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\kernel32.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\KernelBase.dll’
‘panda test.exe’: Loaded ‘D:\Panda3D\bin\libp3framework.dll’
‘panda test.exe’: Loaded ‘D:\Panda3D\bin\libpanda.dll’
‘panda test.exe’: Loaded ‘D:\Panda3D\bin\libpandaexpress.dll’
‘panda test.exe’: Loaded ‘D:\Panda3D\bin\libp3dtool.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\shell32.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\msvcrt.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\shlwapi.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\gdi32.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\user32.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\lpk.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\usp10.dll’
‘panda test.exe’: Loaded ‘C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4974_none_50940634bcb759cb\msvcr90.dll’
‘panda test.exe’: Loaded ‘D:\Panda3D\python\python26.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\advapi32.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\sechost.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\rpcrt4.dll’
‘panda test.exe’: Loaded ‘C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4974_none_50940634bcb759cb\msvcp90.dll’
‘panda test.exe’: Loaded ‘D:\Panda3D\bin\libp3dtoolconfig.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\wsock32.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\ws2_32.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\nsi.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\winmm.dll’
‘panda test.exe’: Loaded ‘D:\Panda3D\bin\cg.dll’
‘panda test.exe’: Loaded ‘D:\Panda3D\bin\avcodec-51-panda.dll’, Binary was not built with debug information.
‘panda test.exe’: Loaded ‘D:\Panda3D\bin\avutil-49-panda.dll’, Binary was not built with debug information.
‘panda test.exe’: Loaded ‘D:\Panda3D\bin\avformat-50-panda.dll’, Binary was not built with debug information.
‘panda test.exe’: Loaded ‘C:\Windows\System32\imm32.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\msctf.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\avgrsstx.dll’
‘panda test.exe’: Loaded ‘D:\Panda3D\bin\libpandagl.dll’
‘panda test.exe’: Loaded ‘D:\Panda3D\bin\libp3windisplay.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\opengl32.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\glu32.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\ddraw.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\dciman32.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\setupapi.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\cfgmgr32.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\oleaut32.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\ole32.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\devobj.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\dwmapi.dll’
‘panda test.exe’: Loaded ‘D:\Panda3D\bin\cgGL.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\d3d9.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\version.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\d3d8thk.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\uxtheme.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\atiumdag.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\atiumdva.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\atipdlxx.dll’
‘panda test.exe’: Unloaded ‘C:\Windows\System32\atipdlxx.dll’
The thread ‘Win32 Thread’ (0x610) has exited with code 0 (0x0).
‘panda test.exe’: Unloaded ‘C:\Windows\System32\atiumdva.dll’
‘panda test.exe’: Unloaded ‘C:\Windows\System32\atiumdag.dll’
‘panda test.exe’: Unloaded ‘C:\Windows\System32\d3d9.dll’
‘panda test.exe’: Unloaded ‘C:\Windows\System32\d3d8thk.dll’
‘panda test.exe’: Unloaded ‘C:\Windows\System32\version.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\powrprof.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\cryptbase.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\atioglxx.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\version.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\atiadlxx.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\wintrust.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\crypt32.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\msasn1.dll’
‘panda test.exe’: Loaded ‘C:\Windows\System32\profapi.dll’
‘panda test.exe’: Loaded ‘D:\Panda3D\bin\libp3ptloader.dll’
‘panda test.exe’: Loaded ‘D:\Panda3D\bin\libpandaegg.dll’
First-chance exception at 0x10016794 in panda test.exe: 0xC0000005: Access violation reading location 0x00000028.
Unhandled exception at 0x10016794 in panda test.exe: 0xC0000005: Access violation reading location 0x00000028.
The program ‘[5792] panda test.exe: Native’ has exited with code -1073741819 (0xc0000005).

NOTE:
1.“win” is not NULL i use check it, the line:
“win->get_camera_group();” is working just fine.

  1. It’s happen even on “Roaming-Ralph” example…

Is someone know what may be the prob?
10x!!

My first guess is that either (a) you are compiling your project in Debug instead of Release mode, or (b) you have failed to remove NDEBUG from your project settings.

David

Hi david,
10x for your reply,
But I am compiling on “Release mode” and I removed the NDEBUG…

Well, I don’t have any other ideas. Have you tried running in the debugger to look at the stack trace?

David