Crash Information:
Server crashes when a player uses "/cast on" -> spectator 1 joins cast -> spectator 1 leaves (ctrl+l) -> server crashes.
Sometimes can happen just from using "/cast on" then "/cast off" as well.
Sources: GitHub - Fir3element/3777: The Forgotten Server 0.4 (rev 3777) with several improvements and bugfixes (https://github.com/Fir3element/3777)
OS: Ubuntu 20.04.3 LTS (Crash does NOT happen on Ubuntu 16.04.)
Crash Log Information:
@Fir3element - Any ideas what could be causing this?
Regards and as always, thank you for any help in advance!
Server crashes when a player uses "/cast on" -> spectator 1 joins cast -> spectator 1 leaves (ctrl+l) -> server crashes.
Sometimes can happen just from using "/cast on" then "/cast off" as well.
Sources: GitHub - Fir3element/3777: The Forgotten Server 0.4 (rev 3777) with several improvements and bugfixes (https://github.com/Fir3element/3777)
OS: Ubuntu 20.04.3 LTS (Crash does NOT happen on Ubuntu 16.04.)
sudo apt-get update
sudo apt-get install --no-install-recommends -y git autoconf automake pkg-config build-essential cmake liblua5.1-0-dev libsqlite3-dev libmysqlclient-dev libxml2-dev libgmp3-dev libboost-filesystem-dev libboost-regex-dev libboost-thread-dev
git clone https://github.com/Fir3element/3777
cd /3777-master
mkdir build
cd build
cmake ..
make -j$(grep processor /proc/cpuinfo | wc -l)
sudo apt-get install --no-install-recommends -y git autoconf automake pkg-config build-essential cmake liblua5.1-0-dev libsqlite3-dev libmysqlclient-dev libxml2-dev libgmp3-dev libboost-filesystem-dev libboost-regex-dev libboost-thread-dev
git clone https://github.com/Fir3element/3777
cd /3777-master
mkdir build
cd build
cmake ..
make -j$(grep processor /proc/cpuinfo | wc -l)
Crash Log Information:
C++:
(gdb) bt full
#0 0x0000ffffacfeb24c in std::_Rb_tree_increment(std::_Rb_tree_node_base*) ()
from /lib/aarch64-linux-gnu/libstdc++.so.6
No symbol table info available.
#1 0x0000aaaad6c04bd8 in ProtocolGame::logout(bool, bool) ()
No symbol table info available.
#2 0x0000aaaad6ad29c8 in Dispatcher::dispatcherThread(void*) ()
No symbol table info available.
#3 0x0000ffffad392624 in ?? () from /lib/aarch64-linux-gnu/libboost_thread.so.1.71.0
No symbol table info available.
#4 0x0000fffface39624 in start_thread (arg=0xffffad392598) at pthread_create.c:477
ret = <optimized out>
pd = <optimized out>
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {281473546450380, 281474911953024,
281474911953022, 281473582485504, 281474911953023, 281473587946904,
281473546451120, 281473546449328, 281473582489600, 281473546449328,
281473546447248, 14304704568303608131, 0, 14304704568342650319, 0, 0, 0,
0, 0, 0, 0, 0}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0,
0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = <optimized out>
#5 0x0000ffffacd9049c in thread_start ()
at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78
No locals.
C++:
bool ProtocolGame::logout(bool displayEffect, bool forceLogout)
{
//dispatcher thread
if(!player)
return false;
if(getIsCast() && !player->isAccountManager())
{
PlayerCast pc = player->getCast();
for(AutoList<ProtocolGame>::iterator it = Player::cSpectators.begin(); it != Player::cSpectators.end(); ++it)
if(it->second == this)
if(Connection_ptr connection = it->second->getConnection())
{
PrivateChatChannel* channel = g_chat.getPrivateChannel(player);
if(channel) {
channel->talk("", SPEAK_CHANNEL_RA, (getViewerName() + " has left the cast."));
}
connection->close();
player->removeCastViewer(it->first);
}
return false;
}
if(!player->isRemoved())
{
if(!forceLogout)
{
if(!IOLoginData::getInstance()->hasCustomFlag(player->getAccount(), PlayerCustomFlag_CanLogoutAnytime))
{
if(player->getTile()->hasFlag(TILESTATE_NOLOGOUT))
{
player->sendCancelMessage(RET_YOUCANNOTLOGOUTHERE);
return false;
}
if(player->getZone() != ZONE_PROTECTION && player->hasCondition(CONDITION_INFIGHT))
{
player->sendCancelMessage(RET_YOUMAYNOTLOGOUTDURINGAFIGHT);
return false;
}
if(!g_creatureEvents->playerLogout(player, false)) //let the script handle the error message
return false;
}
else
g_creatureEvents->playerLogout(player, true);
}
else if(!g_creatureEvents->playerLogout(player, true))
return false;
if(displayEffect && !player->isGhost())
g_game.addMagicEffect(player->getPosition(), MAGIC_EFFECT_POFF);
}
player->kickCastViewers();
if(Connection_ptr connection = getConnection())
connection->close();
if(player->isRemoved())
return true;
return g_game.removeCreature(player);
}
@Fir3element - Any ideas what could be causing this?
Regards and as always, thank you for any help in advance!
Last edited: