• Advertisement
Sign in to follow this  

lua_open cause crash in debug build

This topic is 4554 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Note: I have searched, but I didn't found any useful info. If anyone got any resources on this I would appreciate a link(to it)... I call lua_open(); and it crashes (in debug build only). It works as expected in Release. Changing run-time library to from Debug multithreaded DLL to multithreaded DLL removes the crash, but it feels like a hack, rather than fixing the problem. I link to either a debug or a release version(using only one or the other doesn't help - the problem still exist, and only in debug). The debug lib uses Debug multithreaded DLL, and the release Multithreaded DLL. Before the call to lua_open, I init SDL, OpenGL and DevIL. Doing a console app, that simply init and exit lua doesn't crash in debug, however it is a console app and not a windows one... Lua version: 5.0.2 Compiler: MsVC++ 6.0 SP6 I got the lua-build project from here. I only made it use (debug) multihread DLL. Callstack:
NTDLL! 7c901230() NTDLL! 7c96cd80() NTDLL! 7c960af8() KERNEL32! 7c85e7af() _CrtIsValidHeapPointer(const void * 0x003ebb30) line 1697 _free_dbg_lk(void * 0x003ebb30, int 1) line 1044 + 9 bytes _free_dbg(void * 0x003ebb30, int 1) line 1001 + 13 bytes free(void * 0x003ebb30) line 956 + 11 bytes BKGAMEWIN! luaM_realloc + 30 bytes BKGAMEWIN! luaS_resize + 139 bytes BKGAMEWIN! luaS_newlstr + 268 bytes BKGAMEWIN! luaS_newlstr + 117 bytes BKGAMEWIN! luaX_init + 37 bytes BKGAMEWIN! lua_open + 320 bytes BKGAMEWIN! luaD_rawrunprotected + 58 bytes BKGAMEWIN! lua_open + 64 bytes Lua::initLua() line 26 + 5 bytes Game::gameLoop() line 129 mainLoop(Log & {...}) line 82 SDL_main(int 1, char * * 0x0012fee0) line 93 + 12 bytes BKGAMEWIN! main + 217 bytes BKGAMEWIN! WinMain@16 + 460 bytes WinMainCRTStartup() line 330 + 54 bytes KERNEL32! 7c816d4f()
* I'm probably too tired to spot the stupid error I'm making :)

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement