TeapotWars Crashes after running exe

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • TeapotWars Crashes after running exe

      I picked this book up in November and am just now going through it and getting the source code working. I've spent the last two days straight seems like going through this forum and working out the various issues with compiling the code and getting the 3rd party libraries together and I finally got everything working this afternoon. I'm on Windows 7 64-bit and using VS2010 by the way. After getting everything to successfully build I then attempted to launch the TeapotWarsd.exe executable. At first it gave me grief about dll's being missing but I found a thread on that issue. However now it looks like the program is crashing as soon as I try to launch it. It shows up in my processes list for a second or two then disappears. Anyone have any idea why this is happening. Given there is no error dialog I have no idea what could be going wrong at this point.

      Update #1
      Well it appears after some debugging that the program is not able to open the resource cache and exits accordingly. Thought it might be a permissions issue but I am running visual studio as Administrator and its still not working. Anyone else run into this?

      Source Code

      1. m_ResCache = GCC_NEW ResCache(30, GCC_NEW ResourceZipFile(_T("data\\GameCode3.zip")));
      2. if (!m_ResCache->Init())
      3. {
      4. return false;
      5. }

      The post was edited 2 times, last by cloudtx ().

    • Yes, when debugging Visual Studio will use the working directory of the sln, not the exe. You can change this by right clicking on the TeapotWars project, going to Properties, then going to the Debugging section (chosen on the left). Change the Working Directory option to wherever you want the working directory of your executable to be (in this case, where the EXE is). There are a number Visual Studio environment variables you can use as well.

      -Rez