Jump to content

[crash] Waypoints


Auntie Mangos

Recommended Posts

  • Replies 73
  • Created
  • Last Reply

Top Posters In This Topic

Updated to last revision 9447 but the server crashed again.

Core was generated by `/home/DangeR/server/bin/mangos-worldd -c ../etc/mangosd.conf'.
Program terminated with signal 11, Segmentation fault.
[New process 20272]
[New process 20276]
[New process 20275]
[New process 20274]
[New process 20273]
[New process 20177]
[New process 20180]
[New process 20179]
[New process 20178]
#0  Map::UnloadGrid (this=0x4137c10, x=@0x42777f98, y=@0x42777f9c, 
   pForce=<value optimized out>)
   at ../../../src/game/../framework/GameSystem/NGrid.h:39
39        void setUnloadReferenceLock( bool on ) { i_unloadReferenceLock = on; }
#0  Map::UnloadGrid (this=0x4137c10, x=@0x42777f98, y=@0x42777f9c, 
   pForce=<value optimized out>)
   at ../../../src/game/../framework/GameSystem/NGrid.h:39
   grid = <value optimized out>
   gx = 26
   gy = 31
   __PRETTY_FUNCTION__ = "bool Map::UnloadGrid(const uint32&, const uint32&, bool)"
#1  0x0000000000605bca in ~Map (this=0x4137c10)
   at ../../../src/game/Map.cpp:1096
No locals.
#2  0x000000000060601d in ~InstanceMap (this=0x4137c10)
   at ../../../src/game/Map.cpp:2367
No locals.
#3  0x000000000083527f in MapInstanced::DestroyInstance (this=0x411d940, 
   itr=@0x42778010) at ../../../src/game/MapInstanced.cpp:242
No locals.
#4  0x00000000008359b2 in MapInstanced::Update (this=0x411d940, t=@0x4277804c)
   at ../../../src/game/MapInstanced.cpp:58
   i = {<std::tr1::__detail::_Hashtable_iterator_base<std::Pair<const unsigned int, Map*>, false>> = {_M_cur_node = 0x40d6b40, 
   _M_cur_bucket = 0x40eb840}, <No data fields>}
#5  0x000000000061f54f in MapManager::Update (this=0x1dce590, 
   diff=<value optimized out>) at ../../../src/game/MapManager.cpp:265
No locals.
#6  0x00000000007ccf92 in World::Update (this=0x7fc8a4006d00, diff=48)
   at ../../../src/game/World.cpp:1405
No locals.
#7  0x00000000004e619c in WorldRunnable::run (this=<value optimized out>)
   at ../../../src/mangosd/WorldRunnable.cpp:60
   diff = 48
   realCurrTime = 44789191
   realPrevTime = <value optimized out>
   prevSleepTime = 48
#8  0x0000000000884f3c in ACE_Based::Thread::ThreadTask (param=0x411d940)
   at ../../../src/shared/Threading.cpp:183
   _task = (class ACE_Based::Runnable *) 0x7fc89adf41b0
#9  0x00007fc8ab5c1fc7 in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#10 0x00007fc8aab9159d in clone () from /lib/libc.so.6
No symbol table info available.
#11 0x0000000000000000 in ?? ()
No symbol table info available.

Link to comment
Share on other sites

Vladimir, any chance of the problem continuing here?

   if (i_destinationHolder.UpdateTraveller(traveller, time_diff, false))
   {
       i_destinationHolder.ResetUpdate(50);
       if(i_nextCheckTime.Passed() && i_destinationHolder.HasArrived())
       {
           _setTargetLocation(owner);
           return true;
       }
   }
   return true;

FleeingMovementGenerator.cpp

"So as i understand it more seldom now but happens at same line" looks like it. I'll repost when i'll have a full backtrace.

Link to comment
Share on other sites

I'll try again to explain my idea.

A bug is here (MotionMaster.cpp, line 40):

MotionMaster::Initialize()
{
   // clear ALL movement generators (including default)
   while(!empty())
   {
       MovementGenerator *curr = top();
       pop();
       curr->Finalize(*i_owner);
       if( !isStatic( curr ) )
           delete curr;
   }

There aren't checks about the flag MMCF_UPDATE, so the reset of MotionMaster is never delayed.

Instead of "delete curr;" it should be like:

if (m_cleanFlag & MMCF_UPDATE) // need delayed?
{
   if (!m_expList)
       m_expList = new ExpireList();

   m_expList->push_back(curr);
}
else
     delete curr;

Link to comment
Share on other sites

All fixes related to the Waypoints and MovGens seem to reduce the number of crashes drastically. Good work guys!!!

Here is another dump ( http://pastebin.mozilla.org/705378 ).

I do not think it is linked to the Waypoint but there is a reference to TargetedMovementGeneratorMedium, so perhaps there is another missing check.

By the way, it seems that the following patch fix the problem:

diff --git a/src/game/CellImpl.h b/src/game/CellImpl.h
index 2c8048d..67c5ae5 100644
--- a/src/game/CellImpl.h
+++ b/src/game/CellImpl.h
@@ -182,6 +182,10 @@ Cell::Visit(const CellPair &standing_cell, TypeContainerVisitor<T, CONTAINER> &v
    if(radius > 333.0f)
        radius = 333.0f;

+    // fdb avoid null ptr being processed
+    if (&obj == NULL)
+        return;
+
    //lets calculate object coord offsets from cell borders.
    CellArea area = Cell::CalculateCellArea(obj, radius);
    //if radius fits inside standing cell

Vladimir, do you think it is a good way to handle this kind of crashes ?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use