• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

C++ Crash in monster combat?

mano368

Senior Support Team Member
Staff member
Support Team
Joined
Sep 2, 2011
Messages
671
Solutions
50
Reaction score
320
Location
Brazil
can anyone help me understand what problem in the server functions are causing the crash?

Using Nekiro Downgrade 1.5 7.72

C++:
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000055fa5b6e8f94 in Monster::doAttacking(unsigned int) ()
[Current thread is 1 (Thread 0x7f8f3aa06700 (LWP 137994))]
(gdb) bt full
#0  0x000055fa5b6e8f94 in Monster::doAttacking(unsigned int) ()
No symbol table info available.
#1  0x000055fa5b52c76b in Creature::onAttacking(unsigned int) ()
No symbol table info available.
#2  0x000055fa5b56d0a4 in Game::checkCreatures(unsigned long) ()
No symbol table info available.
#3  0x000055fa5b59d4cd in void std::__invoke_impl<void, void (Game::*&)(unsigned long), Game*&, unsigned long&>(std::__invoke_memfun_deref, void (Game::*&)(unsigned long), Game*&, unsigned long&) ()
No symbol table info available.
#4  0x000055fa5b59894f in std::__invoke_result<void (Game::*&)(unsigned long), Game*&, unsigned long&>::type std::__invoke<void (Game::*&)(unsigned long), Game*&, unsigned long&>(void (Game::*&)(unsigned long), Game*&, unsigned long&) ()
No symbol table info available.
#5  0x000055fa5b59246c in void std::_Bind<void (Game::*(Game*, unsigned long))(unsigned long)>::__call<void, , 0ul, 1ul>(std::tuple<>&&, std::_Index_tuple<0ul, 1ul>) ()
No symbol table info available.
#6  0x000055fa5b589f45 in void std::_Bind<void (Game::*(Game*, unsigned long))(unsigned long)>::operator()<, void>() ()
No symbol table info available.
#7  0x000055fa5b582223 in std::_Function_handler<void (), std::_Bind<void (Game::*(Game*, unsigned long))(unsigned long)> >::_M_invoke(std::_Any_data const&) ()
No symbol table info available.
#8  0x000055fa5b7eaece in std::function<void ()>::operator()() const ()
No symbol table info available.
#9  0x000055fa5b7ea7e2 in Task::operator()() ()
No symbol table info available.
#10 0x000055fa5b7eaa9c in Dispatcher::threadMain() ()
No symbol table info available.
#11 0x000055fa5b72e96e in void std::__invoke_impl<void, void (Dispatcher::*)(), Dispatcher*>(std::__invoke_memfun_deref, void (Dispatcher::*&&)(), Dispatcher*&&) ()
No symbol table info available.
#12 0x000055fa5b72e703 in std::__invoke_result<void (Dispatcher::*)(), Dispatcher*>::type std::__invoke<void (Dispatcher::*)(), Dispatcher*>(void (Dispatcher::*&&)(), Dispatcher*&&) ()
No symbol table info available.
--Type <RET> for more, q to quit, c to continue without paging--
 
Try checking if your sources have the changes from Combat_raw to Combat_ptr, that solved many problems with combat objects, besides fixing the issue with /reload spells and addEvent.
okay, a brief search in the sources of my server returned combat_prt, so I imagine that it already has this change, as for the change in the reload of spells and addEvent, I still haven't found any changes.

I remember that OT crashed when I put a Ferumbras to fight a Morgaroth XD, which seemed like just a joke returned the crash.
 
okay, a brief search in the sources of my server returned combat_prt, so I imagine that it already has this change, as for the change in the reload of spells and addEvent, I still haven't found any changes.

I remember that OT crashed when I put a Ferumbras to fight a Morgaroth XD, which seemed like just a joke returned the crash.
Meaby, these bosses' attacks are from the new Tibia and should not be used in lowered protocols
 
I remember that OT crashed when I put a Ferumbras to fight a Morgaroth XD, which seemed like just a joke returned the crash.
Compile engine in debug mode. Then we will get report with variables and line in which it crashed.
Did you run any /reload before crash?
 
Compile engine in debug mode. Then we will get report with variables and line in which it crashed.
Did you run any /reload before crash?
Yes, I reloaded the scripts almost an hour before the crash.
The same in another crash days ago.

Crash time 7:13pm, reload time 6:36pm

So, is it involved with reloading scripts? My spells are revscripts too, even monsters
 
So, is it involved with reloading scripts?
Some scripts reloads may result in delayed crash, when something that was wrongly reloaded tries to execute some script, that does not exist in RAM anymore. /reload is for development environment, not for real server with players online.
 
okay, a brief search in the sources of my server returned combat_prt, so I imagine that it already has this change, as for the change in the reload of spells and addEvent, I still haven't found any changes.

I remember that OT crashed when I put a Ferumbras to fight a Morgaroth XD, which seemed like just a joke returned the crash.
Is this reproducible or just a one-time thing?

How often does it happen, have you already done tests?
 
Is this reproducible or just a one-time thing?

How often does it happen, have you already done tests?
probably yes, I just don't know how exactly, what I can say is, I used reload almost an hour before, then my friend summoned a morgaroth and a ferumbras to fight and in the middle of that battle the crash came

I did try after I saw the crashlog mentioning creatures, but I didn't know about the reload so I didn't even test it in the same way. I've had a crash before, also with reload, but I imagine that in these cases it was with normal monsters or something similar. I'll take a look here at the log and share the commands from moments before the crash.

In total I believe I had 3 crashes, but I couldn't get the crashlog of 2 because I had to do a configuration in Linux that I only found out about after reading a post by Gesior.pl, the only logs I have access to are from the console and the gms
 
Back
Top