Server crash in Shattering Stars/SMN on pet release
I have:
- [x] searched existing issues (http://github.com/darkstarproject/darkstar/issues/) to see if the issue I am posting has already been addressed or opened by another contributor
- [x] checked the commit log to see if my issue has been resolved since my server was last updated
Client Version (type /ver in game) :
30190605_0
Source Branch (master/stable) : Old School server (updated 2019-06-26)
Additional Information (Steps to reproduce/Expected behavior) : Entered Shattering Stars/SMN as 75smn. Ate rolanberry pie. Drank melon juice. Summoned Garuda. Used Aerial Armor. Used Release. Server crashed.
Here is the crash dump: https://1drv.ms/u/s!AvyTIXTmkiRwpXz8Bt6u6F7NMqXm
Reproduced locally.
Exception: Unhandled exception at 0x01614D07 in DSGame-server.exe: 0xC00000FD: Stack overflow (parameters: 0x00000001, 0x00132FD8). occurred
Stack trace:
DSGame-server.exe!std::_Iterator_base12::_Orphan_me() Line 214 C++ Symbols loaded.
DSGame-server.exe!std::_Iterator_base12::_Adopt(const std::_Container_base12 * _Parent) Line 187 C++ Symbols loaded.
DSGame-server.exe!std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<unsigned short const ,CBaseEntity *> > >,std::_Iterator_base12>::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<unsigned short const ,CBaseEntity *> > >,std::_Iterator_base12>(std::_Tree_node<std::pair<unsigned short const ,CBaseEntity *>,void *> * _Pnode, const std::_Tree_val<std::_Tree_simple_types<std::pair<unsigned short const ,CBaseEntity *> > > * _Plist) Line 40 C++ Symbols loaded.
DSGame-server.exe!std::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<unsigned short const ,CBaseEntity *> > > >::_Tree_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<unsigned short const ,CBaseEntity *> > > >(std::_Tree_node<std::pair<unsigned short const ,CBaseEntity *>,void *> * _Pnode, const std::_Tree_val<std::_Tree_simple_types<std::pair<unsigned short const ,CBaseEntity *> > > * _Plist) Line 203 C++ Symbols loaded.
DSGame-server.exe!std::_Tree<std::_Tmap_traits<unsigned short,CBaseEntity *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,CBaseEntity *> >,0> >::_Eqrange<unsigned short>(const unsigned short & _Keyval) Line 1976 C++ Symbols loaded.
DSGame-server.exe!std::_Tree<std::_Tmap_traits<unsigned short,CBaseEntity *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,CBaseEntity *> >,0> >::_Eqrange<unsigned short>(const unsigned short & _Keyval) Line 1984 C++ Symbols loaded.
DSGame-server.exe!std::_Tree<std::_Tmap_traits<unsigned short,CBaseEntity *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,CBaseEntity *> >,0> >::equal_range(const unsigned short & _Keyval) Line 1509 C++ Symbols loaded.
DSGame-server.exe!std::_Tree<std::_Tmap_traits<unsigned short,CBaseEntity *,std::less<unsigned short>,std::allocator<std::pair<unsigned short const ,CBaseEntity *> >,0> >::erase(const unsigned short & _Keyval) Line 1379 C++ Symbols loaded.
DSGame-server.exe!CZoneEntities::DeletePET(CBaseEntity * PPet) Line 126 C++ Symbols loaded.
DSGame-server.exe!CZone::DeletePET(CBaseEntity * PPet) Line 431 C++ Symbols loaded.
DSGame-server.exe!CBattlefield::RemoveEntity(CBaseEntity * PEntity, unsigned char leavecode) Line 467 C++ Symbols loaded.
DSGame-server.exe!CBaseEntity::~CBaseEntity() Line 58 C++ Symbols loaded.
<<<<
(repeated 650 times)
[External Code] Annotated Frame
DSGame-server.exe!CBattlefield::RemoveEntity(CBaseEntity * PEntity, unsigned char leavecode) Line 468 C++ Symbols loaded.
DSGame-server.exe!CBaseEntity::~CBaseEntity() Line 58 C++ Symbols loaded.
>>>>
DSGame-server.exe!CBattleEntity::~CBattleEntity() Line 92 C++ Symbols loaded.
DSGame-server.exe!CMobEntity::~CMobEntity() Line 142 C++ Symbols loaded.
DSGame-server.exe!CPetEntity::~CPetEntity() Line 55 C++ Symbols loaded.
[External Code] Annotated Frame
DSGame-server.exe!CZoneEntities::ZoneServer(std::chrono::time_point<std::chrono::system_clock,std::chrono::duration<__int64,std::ratio<1,10000000> > > tick, bool check_regions) Line 974 C++ Symbols loaded.
DSGame-server.exe!CZone::ZoneServer(std::chrono::time_point<std::chrono::system_clock,std::chrono::duration<__int64,std::ratio<1,10000000> > > tick, bool check_regions) Line 782 C++ Symbols loaded.
DSGame-server.exe!zone_server(std::chrono::time_point<std::chrono::system_clock,std::chrono::duration<__int64,std::ratio<1,10000000> > > tick, CTaskMgr::CTask * PTask) Line 85 C++ Symbols loaded.
DSGame-server.exe!CTaskMgr::DoTimer(std::chrono::time_point<std::chrono::system_clock,std::chrono::duration<__int64,std::ratio<1,10000000> > > tick) Line 71 C++ Symbols loaded.
DSGame-server.exe!main(int argc, char * * argv) Line 269 C++ Symbols loaded.
[External Code] Annotated Frame
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll] Annotated Frame
Not only happening to Shattering Stars/SMN, but confirmed also happening with BST both on release of pet and BST and on different BCNM like Creeping Doom, and Trial by Lightning.
[01/Sep] [14:16:23][Fatal Error] --- gdb backtrace --- [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 0x00007efbfea4023a in __waitpid (pid=2656, stat_loc=0x0, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:30 Saved corefile core.2561 #0 0x00007efbfea4023a in __waitpid (pid=2656, stat_loc=0x0, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:30 #1 0x0000565555580383 in dump_backtrace () at src/common/kernel.cpp:128 #2 0x0000565555580725 in sig_proc (sn=6) at src/common/kernel.cpp:162 #3 <signal handler called> #4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #5 0x00007efbfd89c801 in __GI_abort () at abort.c:79 #6 0x00007efbfd88c39a in __assert_fail_base (fmt=0x7efbfda137d8 "%s%s%s:%u: %s%sAssertion %s' failed.\n%n", assertion=assertion@entry=0x5655556bea47 "rc == 0", file=file@entry=0x5655556bea32 "/usr/include/zmq.hpp", line=line@entry=406, function=function@entry=0x5655556beea0 zmq::context_t::~context_t()::__PRETTY_FUNCTION__ "zmq::context_t::~context_t()") at assert.c:92
#7 0x00007efbfd88c412 in __GI___assert_fail (assertion=assertion@entry=0x5655556bea47 "rc == 0", file=file@entry=0x5655556bea32 "/usr/include/zmq.hpp", line=line@entry=406, function=function@entry=0x5655556beea0 zmq::context_t::~context_t()::__PRETTY_FUNCTION__ "zmq::context_t::~context_t()") at assert.c:101
#8 0x00005655555ba0e4 in zmq::context_t::~context_t (this=
Found the issue with this. its seems that it is trying to delete the same pet multiple times
This issue is fixed and will do a PR soon