Fatal Error - Need Help

I have been trying to follow the introduction in the tutorial in my free time. I had some issues before with the window title being gibberish (discourse.panda3d.org/viewtopic.php?t=9192). I had posted this in the Installation forum thinking I set something up wrong. As I can compile and run up to that point, I am convinced the error is somewhere else.

I have moved onto the next step of the introduction, found here. (panda3d.org/manual/index.php/C … the_Camera) I am using the C++ side, but I think the URL will default to the Python version. I simply put this new code into my project and when I compiled, I got a fatal error and the program would not run. Suspecting I had changed something inadvertently, I commented out all my code and pasted in the new code with the same results. Removing the code from this step results in a working application identical to the step before it in the tutorial, albeit with my messed up window title. I am now convinced there is some underlying issue that I want to help solve. I don’t know where to begin, so please feel free to ask any questions that may help us all to arrive at a conclusion.

OS: Windows 7 x64
IDE: MS Visual C++ 2010 Express
Panda Version 1.7.0 (Full Source Install)

I can post all my code if someone wants to see it, but it’s literally just copied and pasted from the tutorial at the link above. Someone please help!

~ David

Let’s pursue that messed up window title. My first guess is that it’s somehow compiling to the Unicode interface, which will expect wide-strings, which is going to be bad because we’re passing normal strings.

Is this from your own build of Panda, or are you using the build provided here? Are you capable of generating your own build of Panda? If so, we can experiment with the CreateWindow() call in winGraphicsWindow.cxx to see what variant produces a working window title.


All I did was download the SDK and sources (as well as the optional artwork package) and drop them all into c:\Work\Panda3D-1.7.0. From there I followed the tutorial to try to get up to speed on the engine and figure out where to begin with my own coding.

So yes, this is technically my build, but only insofar as I am compiling my own .exe, no engine code has been modified in any way.

Could I have set something up wrong, perhaps between the installation and setup in VS2010?

Is there any other way of compilation? I know that in something like idTech3 I can compile my code as the ‘game’ portion and have the pre-built engine run it. Is that even possible here, I mean without me coding that functionality in to begin with? I’m under the impression that the Python portion works that way, but can the C++ version as well? Or did I just totally screw up what I thought I was doing? Which is entirely possible, I might add.

~ David

It is certainly possible that something is wrong in your application project. I believe you have already said that you have set it to “Release” mode, and that you have cleared the NDEBUG flag. Hmm, is there also a UNICODE setting? You should make sure this is not set.

I’m not 100% sure that VS2010 has been tested. I believe the SDK provided here was built with VS2008 or 2009, and historically the different versions of the MSVS compiler have not been cross-compatible.

But the fact that your Python program crashes also suggests that something’s wrong with Panda itself. Can you run pview.exe (provided with the SDK)? If that also crashes, or produces a bogus window title, that argues also that Panda is fubar.

In any case, it may be a good idea to attempt to build the Panda project from source. The makepanda script in the SDK provides this capability. I believe there is documentation in the manual and in README files in the SDK; there are also lots of forum posts on the subject. Let me know if you have difficulties with this.


First, pview.exe does work, and provides the correct window title.
Second, I looked through the project settings in VS2010 for a Unicode setting. The only option I found was in Configuration Properties->General. It allowed me to change my character type from Unicode to Multi-Byte characters to “Not Set.” None of the options fixed my fatal error. Pasting the code from the previous tutorial page (simply loading the scene in the viewport, where I only had title issues) provides no solution to that issue, but now will compile and run. Whether Unicode or not, the garbled title is the same garbled text. I don’t know if that’s relevant or not though.

I’m working on running the makepanda.bat script now. What would you like me to try after that? It may take a little research to get it working first. The script keeps telling me I lack the ‘thirdparty’ directory, but I’ve verified its presence and redownloaded and extracted the archive there. I have to figure out what I’m doing wrong.

You make reference to a Python program. I actually haven’t written one, and wouldn’t know where to begin with it. The samples from the SDK all load and run perfectly though if that helps.

~ David

Oh, I misunderstood, sorry. I thought you were crashing with a Python sample, but you meant you were using a C++ sample.

So this suggests that there really is something wrong with your project settings, or maybe it is a fundamental incompatibility with VS2010.

If you are able to build Panda successfully with makepanda, and then link against that particular build, it will prove whether the problem is the project settings, or whether it is a problem with VS2010 itself.


Well, I’ve been hacking away at the MakePanda Python script all night. It started with a 45-minute argument with Notepad++ about why indentation was really important (including myself getting firmly scolded because I used a TAB instead of SPACE x4). I’ve managed to muck my way about enough to find where the directories for Visual Studio and the Platform SDK are discovered. As I’m running VS2010 and the SDK7.0, I had to figure out syntax to manually add them. It doesn’t throw any errors now with my path, but when I try to run the script, I get “Cannot find rc.exe in the search path.”

I quickly followed this up with a search on the forums, finding an individual with the same, but with mt.exe. I took the advice from the thread about adding the Platform SDK bin directory to my PATH, though why the installer didn’t do this I’m not sure. This hasn’t helped. I have tried adding (in the Python script and the PATH variable) both the x86 and x64 directories for the SDK as well as with “\bin” appended to the end, with and without a trailing slash, etc, all in every possible combination I can think of. No luck. I’m about tuckered from all of it this morning, so I’m taking a break on it. I’ll get back to it this evening if time permits.

In the meantime, if anyone has any suggestions, please fire away.

~ David

Never try to add any visual studio directory to your path. Just invoke makepanda from within the Visual Studio Prompt and rc.exe and others will be found in the environment. You can find the prompt somewhere on the start menu or start it from Tools -> Visual Studio X Command Prompt.

Well, that helped quite a bit. MakePanda.bat runs now, but the build is terminated within a minute.

I’m now getting an error on both lines 266 and 280 of “‘back-inserter’: identifier not found” (Error C3861) and I haven’t had luck finding a solution a on the forums. I’ll keep looking, but I can’t seem to solve this one.

Thanks for the tip about using the VS command line. I wouldn’t have thought about that.

~ David

Hmm, back_inserter is a standard template provided by STL. It’s a simple class that uses an STL iterator interface to call insert() on its object with each store operation.

Perhaps it must be included from some nonstandard header file in VS2010?

Edit: ah, a quick Google search turns up the answer. Add an #include line to any file that references back_inserter.



I have been short on time, so I haven’t researched much of an answer yet, but after adding the include I get past that error, only to receive:

Cannot read built/bin/libp3dtool.dll.manifest
Build terminated.

My command prompt is running as Administrator, so it’s not a read/write access error. I have more searching to do on the topic first, though. I’m considering uninstalling and getting back to the old editions of VS and the Platform SDK. This is getting frustrating.

~ David

I’ve seen issues before where, after a previously failed build, the compiler is unable to recover properly. Have you tried cleaning the build directory and starting fresh?


Yeah, no go there. And my searching on the forum give only one thread in the first two pages that seems to match my error and it’s just a way to get MakePanda working with a newer version of Python, keeping in mind that this was an old version of Panda3D to begin with.

I did find a lot of suggestions to run makepanda.bat with --verbose appended and I did. I noticed that when a source file was getting compiled the progress indicator at the beginning of the line read [ 1%] or even just 0. Does this mean a failure to compile the .cpp file or is it just because my computer is moving faster than the line gets updated so it’s abandoned? I’m running a dual-core 2.1 x64 with 4GB of RAM, so I thought the latter was the case, but I thought I would make note of it.

Any help would be appreciated, but with this taking over a week to get to the third page of a tutorial and still getting nowhere, I don’t really have high expectations anymore.

Note: I did clean the built folder and re-ran MakePanda.bat. Twice. Still getting the exact same error on the same .manifest file. I don’t know what to do with it any more.

~ David

Edit: I decided to demonstrate my failure to my wife. While running the version of the program that crashes before the window actually is spawned, VS2010 shows which line has the error. It’s the “framework.set_window_title(“My Panda3D Window”);” line that doesn’t seem to work in the previous version. (See my other post in the Installation forum as well for more info.) Maybe this will help everyone, maybe it won’t.

~ David (Again)

Edit 2: It seems that there won’t be any help coming for this one at this point, but if I don’t hear anything in the next couple of days, I’ll just assume that’s the case. If there’s any more information I can offer to help solve this, for me or the next person who has issues with Platform SDK 7.0 and/or Visual Studio 2010, I’d love to put it up here.

~ David