Re: Luajit crashes when I call lua_error (C++ MSVC x64)

  • From: Mark Tolley <marktolley7@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Sun, 22 Jul 2012 22:11:23 +0100

On 22/07/2012 21:57, Mike Pall wrote:
Well, where do you catch the error? You can choose between
lua_pcall or C++ try/catch, but you really need to use one of
them. An uncaught exception will terminate the process.

--Mike


I've tried wrapping the lua_error call in a try-catch and it still crashes.

The error message from the debugger is also different than if I just put in a random throw new std::exception(); at the top of main, which results in this:

Unhandled exception at at 0x000007FEFDEECACD in Game.exe: Microsoft C++ exception: std::exception at memory location 0x000000000013FC68.

and the Call Stack in the debugger looks like:

     KernelBase.dll!000007fefdeecacd()    Unknown
> msvcr110d.dll!_CxxThrowException(void * pExceptionObject, const _s__ThrowInfo * pThrowInfo) Line 152 C++ Game.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * pCmdLine, int nCmdShow) Line 63 C++


Whereas what I'm seeing is this:

Unhandled exception at 0x000007FEFDEECACD (KernelBase.dll) in Game.exe: 0xE24C4A02.

     KernelBase.dll!000007fefdeecacd()    Unknown
     lua51.dll!000007fef1d3390e()    Unknown
     lua51.dll!000007fef1d3387f()    Unknown
     lua51.dll!000007fef1d33bb9()    Unknown
> Game.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * pCmdLine, int nCmdShow) Line 66 C++

The lua dll frames on the stack lead me to believe it's a problem somewhere in luajit.

Other related posts: