TeapotWars compiles but fails to initialize

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

    • TeapotWars compiles but fails to initialize

      I've been greatly enjoying the book so far, but after many hours of trying I still haven't managed to execute (or debug) any version of TeapotWars that I build.

      The source seems to compile fine, but it appears to crash with an error when loading LuaPlusD_1100.dll or sometime shortly afterwards. I saw that some people had issues with this file and it had been updated recently, but no matter what version of the DLL I try I still get the same issue.

      I see this in the output when starting up the debugger in Visual Studio:
      ...
      'TeapotWarsd.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'
      'TeapotWarsd.exe': Loaded 'C:\Windows\SysWOW64\secur32.dll'
      'TeapotWarsd.exe': Loaded 'C:\Mike\...\gamecode3-testBranch\Bin\LuaPlusD_1100.dll'
      Debugger:: An unhandled non-continuable exception was thrown during process load
      The program '[9172] TeapotWarsd.exe: Native' has exited with code -1072365566 (0xc0150002).

      The error message displayed when it crashes is quite generic too: "The application failed to initialize properly (0xc0150002). Click Ok to terminate the application."

      I am using Visual Studio 2008 on Windows Vista 64-bit and have tried with both the trunk source and the test branch source.

      Any suggestions would be greatly appreciated. Thanks!
    • RE: TeapotWars compiles but fails to initialize

      It seems that some TeapotWars DLLs are 32-bit and you are trying to run them in a 64 bit Windows.

      Here's what I found online after a quick search: dnjonline.com/article.aspx?id=jun07_access3264

      So....the first thing you should try to do is recompile all the DLLs for Lua, Boost, etc. for 64-bit, and give it another go.

      If you get it to work send me your project files and I'll check them into the repository - more people will have this problem as they convert to 64-bit Windows.
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • Hi Mike,

      Thanks for the speedy reply! I used the link you posted as a starting point for a little research, and it seems like this should still be working with the 32-bit DLLs.

      I am compiling TeapotWars as a 32-bit application (and can see it running as 32-bit in the process explorer when it tries to start), and I believe that on 64-bit Windows a 32-bit process can still load a 32-bit DLL. A 32-bit process cannot load a 64-bit DLL and vice-versa, so I may be causing more problems if I try to use the 64-bit DLLs for Lua, etc.

      If this seems incorrect to anyone please let me know. Otherwise, there must be some other issue which is preventing LuaPlusD_1100.dll from loading correctly...
    • That would make sense - have you tried recompiling the lua dll ? It could be because the original DLL was compiled with a different version of Visual Studio - there's a thread on this site somewhere complaining about that....
      Mr.Mike
      Author, Programmer, Brewer, Patriot