Debugging session started
Debugger attached to process
0x012d9698: VM created
0x012d9698: VM destroyed
Debugging session ended
Lua Release Mode Crash
Hello, for some reason whenever I try to compile my project in release mode it crashes at luaL_dofile, when I try debug mode it compiles just fine.
Using decoda all I get from the output log is.
VSC++ 2008 output log
'SpaceShooter.exe': Loaded 'C:\Documents and Settings\David\Mis documentos\Visual Studio 2008\Projects\SpaceShooter\Release\SpaceShooter.exe', Symbols loaded.
'SpaceShooter.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll'
'SpaceShooter.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll'
'SpaceShooter.exe': Loaded 'C:\Documents and Settings\David\Mis documentos\Visual Studio 2008\Projects\SpaceShooter\Release\sfml-audio.dll'
'SpaceShooter.exe': Loaded 'C:\Documents and Settings\David\Mis documentos\Visual Studio 2008\Projects\SpaceShooter\Release\openal32.dll', Binary was not built with debug information.
'SpaceShooter.exe': Loaded 'C:\WINDOWS\system32\user32.dll'
'SpaceShooter.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll'
'SpaceShooter.exe': Loaded 'C:\WINDOWS\system32\winmm.dll'
'SpaceShooter.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll'
'SpaceShooter.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll'
'SpaceShooter.exe': Loaded 'C:\WINDOWS\system32\secur32.dll'
'SpaceShooter.exe': Loaded 'C:\WINDOWS\system32\dsound.dll'
'SpaceShooter.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll'
'SpaceShooter.exe': Loaded 'C:\WINDOWS\system32\ole32.dll'
'SpaceShooter.exe': Loaded 'C:\WINDOWS\system32\version.dll'
'SpaceShooter.exe': Loaded 'C:\Documents and Settings\David\Mis documentos\Visual Studio 2008\Projects\SpaceShooter\Release\libsndfile-1.dll', Binary was not built with debug information.
'SpaceShooter.exe': Loaded 'C:\Documents and Settings\David\Mis documentos\Visual Studio 2008\Projects\SpaceShooter\Release\sfml-system.dll'
'SpaceShooter.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_6f74963e\msvcp90.dll'
'SpaceShooter.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_6f74963e\msvcr90.dll'
'SpaceShooter.exe': Loaded 'C:\WINDOWS\system32\comdlg32.dll'
'SpaceShooter.exe': Loaded 'C:\WINDOWS\system32\comctl32.dll'
'SpaceShooter.exe': Loaded 'C:\WINDOWS\system32\shell32.dll'
'SpaceShooter.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll'
'SpaceShooter.exe': Loaded 'C:\WINDOWS\system32\D3DX9_39.dll'
'SpaceShooter.exe': Loaded 'C:\WINDOWS\system32\d3d9.dll'
'SpaceShooter.exe': Loaded 'C:\WINDOWS\system32\d3d8thk.dll'
'SpaceShooter.exe': Loaded 'C:\Documents and Settings\David\Mis documentos\Visual Studio 2008\Projects\SpaceShooter\SpaceShooter\lua5.1.dll', Binary was not built with debug information.
'SpaceShooter.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989\msvcr80.dll', Symbols loaded.
'SpaceShooter.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\comctl32.dll'
Any help is much appreciated, thanks.
When a program works in debug mode and crashes in release mode, it usually has something to do with uninitialized variables.
Post the code that calls luaL_dofile (and any other code you think might be relevant).
Post the code that calls luaL_dofile (and any other code you think might be relevant).
I placed a breakpoint just before luaL_dofile and that's the last thing it reaches :S.
void edit_state::init(application *app){ this->app = app; this->app->d3d->gs = this; tex = app->getTexture("dot_white"); glow_tex = app->getTexture("glow"); app->d3d->cam_coord = coord(0,0); c_state = EDIT_; show_menu = false; drag = false; ctrl_down = false; place_unit = false; place_span = 300; x_current = 0; y_current = 0; scr_speed = (app->d3d->max_x - app->d3d->min_x)*.1; whe_speed = (app->d3d->max_x - app->d3d->min_x)*.1; place_selection = NULL; place_segment = false; place_segment_ = false; place_area = false; place_seed = false; selected_area = NULL; shape *_level = new shape(); _level->loop = false; _level->draw(coord(0,0),0,this,false); world_shapes.push_back(_level); world_shape.loop = false; ss = shape_state::instance(); map_width = 1000; map_height = 1000; create_map(); lua_atpanic(app->l_state,NULL); bool lua_success = luaL_dofile(app->l_state, "gw_clone.lua"); if(lua_success){ MessageBox(app->hWnd,"Failed to run gw_clone.lua.","Warning",MB_ICONEXCLAMATION | MB_OK); luaL_dofile(app->l_state, "safe.lua"); }}
Yeah, before the call to that function
[souce lang="c++"]
/* initialize Lua */
l_state = lua_open();
if(l_state == NULL){
MessageBox(hWnd, "Failure to initialize lua.","Warning",MB_ICONEXCLAMATION | MB_OK);
return false;
}
luaL_openlibs ( l_state );
[/source]
[souce lang="c++"]
/* initialize Lua */
l_state = lua_open();
if(l_state == NULL){
MessageBox(hWnd, "Failure to initialize lua.","Warning",MB_ICONEXCLAMATION | MB_OK);
return false;
}
luaL_openlibs ( l_state );
[/source]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement