P3d, VC++ 2010 & VS C++ 2008 compatibility issue: 0xc000

after installing the newest ATI Drivers for my graphics card (which install a new Visual C++ 2010), I keep getting exception errors after every compile which is related in any way to Panda3d. Every other C++ source code from me, or examples from the web are still working. Panda3d with Python still works too.

Here is what I did to resolve this issue:

  • I reverted to a System Restore Point before the install of the new drivers. - No change
  • I uninstalled every little piece of Visual C++ 2005/2008/2010 and reinstalled only the 2008 version. - No change
  • I uninstalled every little piece of Visual C++ 2005/2008/2010 and reinstalled 2005, then 2008. - No change
  • I uninstalled and reinstalled Panda3d and Visual Studio C++ 2008 serveral times. - No change.

Strange is this:
When I first tried to run Panda3d with Visual Studio C++ 2010, it has thrown this exact exception in my face. Then I read that Panda was compiled with VS2008, I installed it and it worked.
Furthermore the 0xc0000005 error came up a few days ago when I tried to convert a .mb to a .egg with the use of Maya 2011 64bit. I then discovered that through that Panda is compiled in 32bit, so is the tool to convert .mb to .egg and I will need Maya with this exact architecture. After using Maya2011 32bit to convert, the error disappeared.
So I suspect that I could have encountered a architecture mismatch at some point, but I am out of ideas.

Here is the exception error:

Unhandled exception at 0x6a0526f6 in Panda.exe: 0xC0000005: Access violation reading location 0xccccccd0.

And VS2008 breaks the running program at line 121 of “atonexit.c”.

Every help would be appreciated.

Thank you for your time,
tonaus (Dennis)

Can you post the stack trace shown in VS2008 after the exception is encountered? The exception message itself is largely meaningless.

I’m pretty sure that installing graphics drivers wouldn’t automatically update your compiler, so I don’t know precisely what you’re referring to there. But it is possible that new graphics drivers would trigger an unrelated exception at exit.


Thank you for your quick reply.
I am currently trying to track down why I get at least 4 completely different stack traces.

Here are the most recent 4 ones:

After commenting out a few custom lines, I got another 2…

Hmm, also not very helpful without the debug symbols, but that’s not your fault because we don’t provide the debug symbols for the default build of Panda.

I don’t suppose it would be possible for you to download Panda from source and build it using your own compiler? That should help resolve possible conflicts from different versions of the compiler too.


Compiling a program from source in Windows…
Since I am more a Linux guy, this sounds like an interesting task ^^
Will be back as soon as it is done :wink:
(or with more errors ^^)

Thank you.


From the Tutorial:
“This process will take an hour or so, so it is best to go do something else because your comp will be using most of its resources on compiling.”

1 hour… Oo
I seriously hope that was done with a 486dx4/100 :wink:

No, it really takes a good hour to build on Windows. (The dedicated build server took an hour and 8 minutes to build 1.7.2.)

The 486dx4/100 is a CPU, not a DirectX version.
486 arch with 100Mhz and a multiplier of 4 (with a FSB of 25Mhz)
(Cyrix / AMD)
Sorry for the confusion there :wink:

I got the source downloaded just about now and will start compiling it right away.
I hope that it wont take so long since I never compiled any program on Linux that long :wink:

Thank you.

Seems there is something broken in 1.7.2.
I am currently following this: [Compiling 1.7.2 on Windows)

Replacing the Icon file and editing the file mentioned in the thread above worked. Compiling :wink:

Your original problem does seem similar to me, though. Usually these kinds of crashes are caused by use of the wrong compiler (use 2008 with 1.7.2), or the use of Debug mode (Release should be used for the public build), or perhaps you forgot to remove the NDEBUG preprocessor declaration?

That wouldn’t explain everything, but it’s good to make sure before you proceed.

I use 2008, and Release mode. The NDEBUG declaration… there was something, but I think I can remember I did that step from the manual :wink: Will check it, but again: everything worked for a few weeks, after updating my graphics driver it broke. (I thought this was because the “AMD Vision Engine Control Center”, the old Catalyst Control Center, was using a never Version of the Visual C++ 2010 runtimes and, of course, installed it right away with my driver…)

BTW: Sad to see that Panda is only compiling with one thread on one core =(

NDEBUG wasn’t defined in my project, but in the new projects I created to test if this problem was related to my source, it was. Removing it did not change the result, I got the same exception as mentioned in my first post.

Found an error! (If i only would get 1 Euro every time I found one ^^)

[ 31%] Linking dynamic library built/bin/libpanda.dll
fatal error C1900: Il mismatch between 'P1' version '20080116' and 'P2' version '20070207'
LINK : fatal error LNK1257: code generation failed
Storing dependency cache.
Elapsed Time: 18 min 54 sec

This should be taken care by the SP1 installer of VS 2008 was written in some forums, will try that.

Worked. Compile-Error is gone :wink:

Ready. Elapsed Time 31min 51sec, with only one thread! :wink:
(While compiling I read in the manual that it IS possible to compile with more than one thread… But by the time I got to that point, it would have been pointless to cancel the process and start over again)

Thank you.

I tested the Panda installation with the teapot example, it worked.
Building the installer succeeded, but I have chosen to simple copy the files I need.

Then, again, I run my Project (of course I cleaned it before I recompiled it)

 	[Frames below may be incorrect and/or missing, no symbols loaded for cg.dll]	
>	libpandagl.dll!GLGraphicsStateGuardian::reset()  Line 838 + 0xb bytes	C++
 	libpandagl.dll!wglGraphicsStateGuardian::reset()  Line 457	C++
 	libpandagl.dll!wglGraphicsWindow::open_window()  Line 256	C++
 	libpanda.dll!GraphicsWindow::set_properties_now(WindowProperties & properties={...})  Line 643 + 0x5e bytes	C++
 	libp3windisplay.dll!WinGraphicsWindow::set_properties_now(WindowProperties & properties={...})  Line 276	C++
 	libpanda.dll!GraphicsWindow::process_events()  Line 599	C++
 	libp3windisplay.dll!WinGraphicsWindow::process_events()  Line 249	C++
 	libpanda.dll!GraphicsEngine::process_events(const ov_set<PointerTo<GraphicsOutput>,IndirectLess<GraphicsOutput> > & wlist={...}, Thread * current_thread=0x0048169c)  Line 1543 + 0x1c bytes	C++
 	libpanda.dll!GraphicsEngine::WindowRenderer::do_windows(GraphicsEngine * engine=0x004878fc, Thread * current_thread=0x0048169c)  Line 2430	C++
 	libpanda.dll!GraphicsEngine::open_windows()  Line 912	C++
 	libpanda.dll!GraphicsEngine::make_output(GraphicsPipe * pipe=0x00487774, const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & name="window1", int sort=0, const FrameBufferProperties & fb_prop={...}, const WindowProperties & win_prop={...}, int flags=8, GraphicsStateGuardian * gsg=0x00000000, GraphicsOutput * host=0x00000000)  Line 394	C++
 	libp3framework.dll!WindowFramework::open_window(const WindowProperties & props={...}, int flags=8, GraphicsEngine * engine=0x004878fc, GraphicsPipe * pipe=0x00487774, GraphicsStateGuardian * gsg=0x00000000)  Line 163 + 0x30 bytes	C++
 	libp3framework.dll!PandaFramework::open_window(const WindowProperties & props={...}, int flags=8, GraphicsPipe * pipe=0x00487774, GraphicsStateGuardian * gsg=0x00000000)  Line 444	C++
 	libp3framework.dll!PandaFramework::open_window(GraphicsPipe * pipe=0x00487774, GraphicsStateGuardian * gsg=0x00000000)  Line 409 + 0x13 bytes	C++
 	libp3framework.dll!PandaFramework::open_window()  Line 361 + 0x9 bytes	C++
 	Panda.exe!main(int argc=1, char * * argv=0x00fdb140)  Line 137 + 0x56 bytes	C++
 	Panda.exe!__tmainCRTStartup()  Line 586 + 0x17 bytes	C

and this is the new Call Stack :wink:

VS now points me to:
glGraphicsStateGuardian_src.cxx Line: 838

cgGLIsProfileSupported(CG_PROFILE_ARBVP1)) {

Knock yourself out, I am going to bed (its 01:18 in Germany).

Thank you.

Beh, it does seem like an issue in your OpenGL drivers then. Is there any way you can upgrade or downgrade those to a stable release?

Thanks, I just read up on that matter. First of all my OpenGL drivers are a stable release, as much as the AVECC tells me (Version: OpenGL, Direct3d
Which is odd, because these are the newest drivers available, and AMD seems to went a step backwards on the OpenGL version. The version I installed a few days ago, and with this all my problems were starting was:

Funny thing: If I just tell Panda to use Direct3D or any other 3D-Type in the config file, this eception is gone, but another exception related to the keyboard handler in Panda occured…

doing this

#load-display pandagl
load-display pandadx9

for example gives me this on debugging:

>	libp3framework.dll!WindowFramework::enable_keyboard()  Line 398	C++
 	Panda.exe!main(int argc=1, char * * argv=0x03f9b0e0)  Line 137 + 0x60 bytes	C++
 	Panda.exe!__tmainCRTStartup()  Line 582 + 0x17 bytes	C
 	[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]	

and Visual Studio breaks at this point:
windowFramework.cxx Line: 398

 enable_keyboard() {

>  if (_got_keyboard) {



Which, again, is odd because i don’t think that this has anything to do with OpenGL.

You’re right; this new exception has nothing to do with OpenGL, and probably nothing to do with your graphics driver at all. I doubt it has anything at all to do with the other exception; it’s just the next problem.

This one is telling you that the WindowFramework is invalid at the time you call enable_keyboard() on it. I can’t speculate why this might be so without seeing your code.


int main(int argc, char *argv[]) 
  // Open a new window framework and set the title
  framework.open_framework(argc, argv);
  // Open the window
  WindowFramework *window = framework.open_window();
  //Enable KB detection

As far as I can see, there should be nothing wrong with it, since I haven’t changed this in weeks :wink:

If I comment out all the keyboard stuff my Code looks simply like this:

int main(int argc, char *argv[]) 
  // Open a new window framework and set the title
  framework.open_framework(argc, argv);
  // Open the window
  WindowFramework *window = framework.open_window();

  NodePath environ = window->load_model(framework.get_models(), "models/environment");
  environ.set_scale(1 , 1, 1);
  environ.set_pos(0, 0, 0);

  //Class MainCharacter
  MainCharacter *c = new MainCharacter(window, framework.get_models(), "panda-model"); 
  c->load_animation(window, "panda-walk4"); 

  //Class MainCam
  MainCam *cam = new MainCam(window);
  NodePath camptr = cam->get_nodepath();

  // This is a simpler way to do stuff every frame,
  // if you're too lazy to create a task.
  Thread *current_thread = Thread::get_current_thread();
  while(framework.do_frame(current_thread)) {
    // Step the interval manager
  return (0);

and still there is an exception… a new one… I am growing grey hair here -.-

>	libp3framework.dll!WindowFramework::get_render()  Line 255 + 0x7 bytes	C++
 	Panda.exe!main(int argc=1, char * * argv=0x00d0b0e0)  Line 131 + 0x16 bytes	C++
 	Panda.exe!__tmainCRTStartup()  Line 582 + 0x17 bytes	C
 	[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]	

WindowFramwork.cxx, Line: 255

 NodePath WindowFramework::
 get_render() {
>  if (_render.is_empty()) {
     _render = NodePath("render");

But the Console is now showing me some weird stuff…

:display(warning): Unable to load: Path not found
Known pipe types:
(all display modules loaded.)
No graphics pipe is available!
Your Config.prc file must name at least one valid panda display library via load-display or aux-display.
Loading models/environment

Now I am so confused…

Are you sure you still have NDEBUG removed from your project settings? These are the sorts of gray-hair-inducing problems that that mistake can cause.


Thank you again for all your help, here is proof that NDEBUG isn’t bothering my Preprocessor :wink:

Well; and yet something appears to be broken in your build. Are you sure you’re linking with your local build of Panda and not with the standard build?

I don’t know what else it could be. Have you tried to clean the project and rebuild it?


Just to be sure:
I deleted the original Panda build, and now I only have installed the self-compiled one.
Same error :frowning:

I tried not only to clean my project, I also tried to set up a whole new project in a different location…
Same error :frowning:

It seems to me that the only way to get this running would be a complete new setup of windows, which is out of question for me, I need my computer for far too many things to just have 3 days of formatting, reinstalling, reconfiguring, installing my programs, etc, etc…

I noticed something that might be worth mentioning. In VS2008 under Project Settings->Linker->Command Line I see this:

/OUT:"C:\Users\MySoSecretUsername\Documents\Visual Studio 2008\Projects\Panda\Release\Panda.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE:"Release\Panda.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"c:\Users\MySoSecretUsername\Documents\Visual Studio 2008\Projects\Panda\Release\Panda.pdb" /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /LTCG /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:PROMPT libp3framework.lib libpanda.lib libpandafx.lib libpandaexpress.lib libp3dtool.lib libp3dtoolconfig.lib libp3pystub.lib libp3direct.lib  kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

There is this “/DEBUG” right after “uiAccess=‘false’”. Should it be there? I mean, since I am building a release, whats that for?

Nevermind, learned that its just for the Debuginfo :wink:
Perhaps my compiler command line will help you to track my problem:

/O2 /Oi /GL /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FD /EHsc /MD /Gy /Fo"Release\" /Fd"Release\vc90.pdb" /W3 /nologo /c /Zi /TP /errorReport:prompt

Is this ok?

After 2 days of intensive searching (and cleaning my computer by hand from all Microsoft Updates and Programs that can be uninstalled without crashing windows), I am a little bit closer to a solution.
My error is most definitely caused by the AMD/ATI graphics drivers above catalyst 11.3.
Currently I got 11.5a installed, everything works, except Panda. (well panda works, but only in this mode: “load-display tinydisplay”, thats why I think my compiler is fine)

I also tested this behavior on my laptop, and 2nd workstation. While my laptop has AMD/ATI graphics and my 2nd workstation has a NVIDIA card.
When I use anything above Catalyst 11.3 on my Laptop, Panda wont run anymore with this display modes:

load-display pandagl
load-display pandadx9
load-display pandadx8

When I am using Catalyst 11.2 or 11.3 it is just fine. This effect doesn’t even require me to recompile after the installation of a new Catalyst version. It just appears when starting the already compiled program.
My 2nd workstation has no problems at all (due to its HW is identically with my main computer, except the graphics card, I simply made a backup from my main computer and put it on my 2nd workstation, removed the AMD/ATI drivers and installed NVIDIA drivers). Everything works there, with the exactly same SW configuration of VS / DirectX / CG / OpenGL.

Strange is this: With the 11.5a Catalyst I don’t have any problems in other Games / Graphic programs or Benchmarks. The only program that ceases to function is Panda.

Maybe my system configuration in detail will help to solve the problem:

CPU: AMD Phenom II X6 1090T @ 4013 MHz
RAM: 8GB DDR3-1333
GPU: CLUB3D ATI Radeon HD 6970 2GB GDDR5
OS: Microsoft Windows 7 Ultimate x64 SP1 with all updates
VS: Microsoft Visual Studio C++ 2008 SP1 with all updates
DX: Newest DirectX-SDK
CG: Newest Version from NVIDIA
Panda3D: Newest Source-Version from CVS (identifys itself as Panda-1.8.0) & 1.7.2 Source & 1.7.2 precompiled

Display Driver:
Driver Packaging Version: 8.85.6-110505a-118870E
Catalyst Version: 11.5a (with Hotfix)
Provider: ATI Technologies Inc.
2D Driver Version:
2D Driver File Path: /REGISTRY/MACHINE/SYSTEM/ControlSet002/Control/CLASS/{4D36E968-E325-11CE-BFC1-08002BE10318}/0002
Direct3D Version:
OpenGL Version:
AMD VISION Engine Control Center Version: 2011.0505.135.941

Perhaps someone can reproduce this?
So far I am out of ideas. Will work with my 2nd workstation if there is no solution out there =( …

Is there any reason to run a driver above Catalyst 11.3? Driver bugs are astonishingly common (I’ve never seen a category of software more chronically bug-ridden than graphics drivers, and it hasn’t been getting better), and if there’s a bug in one particular version, then don’t use it if there’s another option.