That address doesn’t help; I need to know the function. I guess we don’t ship the pdb files along with the pre-built panda (they’re too huge). That probably means the only way to get anything meaningful out of that would be to build your own Panda.
Hmm, can you package up your project file and upload it somewhere for me? Maybe I can try to reproduce your problem. Which version of Panda are you using?
Hey I tried your Code and the same thing happened it Compiled OK started and a few secconds passed and BOOM it crashed. Then this is what i did to make it work with no problems (the fog was also blue instead of black).
I deleted these :WIN32;NDEBUG;_CONSOLE;WIN32_VC from the processor definitions. and it Works fine now for me. Try it. Mybe itll help I also had to have the CG.DLL in the same DIR as my App, but that maynot be the case for u. After deleting this the fog renders correctly in a black color. and all is smooth and no crashes occur
Ah, I believe NDEBUG is the culprit. The presence of this symbol means your code is being compiled for a final production release, with all run-time parameter validation checks and other development assistance removed. (As a general rule of thumb in C/C++ development, you should never build with this symbol defined unless you are absolutely sure your code is bug-free and are ready to release it to the world.)
In the case of the Panda code, defining this symbol also removes the declaration of certain members from low-level objects which are used internally to ensure self-consistency.
The problem is, the Panda library distributed here was not built with NDEBUG defined (nor should it have been, since this Panda is used primarily for development). But when you compiled your own code with NDEBUG and included the Panda header files, you lied to the compiler, and told it that Panda had been compiled with NDEBUG defined. The compiler computed the necessary offsets into the low-level Panda structures based on the definition of NDEBUG, and got the answer wrong, or at least different than the code you were linking with at runtime. Thus, internal structures were being corrupted, and mysterious crashes were the result.
So, the short answer is: don’t define NDEBUG unless you are ready to make a full production release, and then only when you are willing to build all of Panda the same way.
Alright so this seemed to work fine on my PC which I have running VS 2008… however I am currently using a different PC with VS 2005 and this does not solve the issue. It seems whenever I try to create a PointerTo object for reference counted objects I get a crash at runtime.
e.g. PT(CollisionRay)
The NDEBUG is not in my Preprocessor definitions. The additional libraries and includes are as stated above. Once again everything compiles fine but I am left with a runtime error which crashes the program. Any additional ideas?
Well everything seems to work fine except for those PointerTo objects. So basically I need to be updated to VS 2008 in order for this problem to fixed?
What if I wear to build the source myself with VS 2005? Would that then allow me to use every thing as expected? Or would the build fail if attempted with VS 2005?