otland / forgottenserver

A free and open-source MMORPG server emulator written in C++
https://otland.net
GNU General Public License v2.0
1.59k stars 1.06k forks source link

Crash after starting forgottenserver #214

Closed ghost closed 10 years ago

ghost commented 10 years ago

Call stack:

>   theforgottenserver.exe!std::list<std::pair<unsigned int const ,Thing * __ptr64>,std::allocator<std::pair<unsigned int const ,Thing * __ptr64> > >::clear() Line 1496    C++
    theforgottenserver.exe!std::_Hash<std::_Umap_traits<unsigned int,Thing * __ptr64,std::_Uhash_compare<unsigned int,std::hash<unsigned int>,std::equal_to<unsigned int> >,std::allocator<std::pair<unsigned int const ,Thing * __ptr64> >,0> >::clear() Line 718  C++
    theforgottenserver.exe!ScriptEnvironment::resetEnv() Line 92    C++
    theforgottenserver.exe!LuaScriptInterface::resetScriptEnv() Line 251    C++
    theforgottenserver.exe!LuaScriptInterface::loadFile(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & file, Npc * npc) Line 513  C++
    theforgottenserver.exe!LuaEnvironment::initState() Line 11926   C++
    theforgottenserver.exe!LuaScriptInterface::LuaScriptInterface(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & interfaceName) Line 448  C++
    theforgottenserver.exe!LuaEnvironment::LuaEnvironment() Line 11906  C++
    theforgottenserver.exe!`dynamic initializer for 'g_luaEnvironment''() Line 70   C++
    [External Code] 
dalkon commented 10 years ago

Change

if (!g_luaEnvironment.getLuaState()) {

To

if (interfaceName != "Main Interface" && !g_luaEnvironment.getLuaState()) {