Jump to content

[fixed][mangos-0.12][crash]After mover movements backport


Guest CHEGOK

Recommended Posts

Crash apearing after last backports in mangos 0.12 branch.

How to reproduce?

Need hunter with pet.

1. Come to Stable Master, begin to talk.

2. Use "Eyes Of The Beast" spell

3. Move pet icon in NPC dialog on other free stable place

4. Server crash

In Russian, maybe that would be more understandable for someone)

1. Берем ханта - берем пета - подходим к стебл мастеру ( тот который хранит петов), начинаем разговор

2. Используем спел на полный контроль пета (Eyes Of The Beas)

3. Перетаскиваем пета в другую ячейку у стабл мастера

4. Краш

Core was generated by `/opt/mangos/server/bin/mangos-worldd'.
Program terminated with signal 11, Segmentation fault.
#0  0x00000000007beb8f in WorldSession::HandleSetActiveMoverOpcode (
   this=0x381efd80, recv_data=...)
   at ../../../src/game/MovementHandler.cpp:434
434<--->    if(_player->GetMover()->GetObjectGuid() != guid)
#0  0x00000000007beb8f in WorldSession::HandleSetActiveMoverOpcode (
   this=0x381efd80, recv_data=...)
   at ../../../src/game/MovementHandler.cpp:434
       guid = {m_guid = 6456}
#1  0x0000000000765666 in WorldSession::Update (this=0x381efd80)
   at ../../../src/game/WorldSession.cpp:185
       packet = 0x7f30ed1e8080
       currTime = <value optimized out>
#2  0x000000000075f098 in World::UpdateSessions (this=0x7f311802a4b0,.
   diff=<value optimized out>) at ../../../src/game/World.cpp:1788
       itr = {<std::tr1::__detail::_Hashtable_iterator_base<std::Pair<unsigned int const, WorldSession*>, false>> = {_M_cur_node = 0x4c1937f1,.
           _M_cur_bucket = 0x443a4}, <No data fields>}
       next = {<std::tr1::__detail::_Hashtable_iterator_base<std::Pair<unsigned int const, WorldSession*>, false>> = {_M_cur_node = 0x7f30fb491fc0,.
           _M_cur_bucket = 0x2d0bfbd8}, <No data fields>}
       sess = <value optimized out>
#3  0x000000000075f8af in World::Update (this=0x7f311802a4b0, diff=91)
   at ../../../src/game/World.cpp:1324
       autobroadcaston = 1
#4  0x000000000053c191 in WorldRunnable::run (this=<value optimized out>)
   at ../../../src/mangosd/WorldRunnable.cpp:60
       diff = 91
       realCurrTime = 1115850367
       realPrevTime = <value optimized out>
       prevSleepTime = 71
#5  0x0000000000807fbe in ACE_Based::Thread::ThreadTask (param=0x7f30fe51c230)
   at ../../../src/shared/Threading.cpp:187
       _task = 0x7f311a23a3a0
#6  0x00007f311e222a04 in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#7  0x00007f311d7e0d4d in clone () from /lib/libc.so.6
No symbol table info available.
#8  0x0000000000000000 in ?? ()
No symbol table info available.

Plz fix that so fast as u can. Very important crash bug

Link to comment
Share on other sites

Try this patch:

diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp
index de62d1c..601490f 100644
--- a/src/game/MovementHandler.cpp
+++ b/src/game/MovementHandler.cpp
@@ -431,12 +431,10 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data)
    ObjectGuid guid;
    recv_data >> guid;

-    if(_player->GetMover()->GetObjectGuid() != guid)
-    {
-        sLog.outError("HandleSetActiveMoverOpcode: incorrect mover guid: mover is %s and should be %s",
-            _player->GetMover()->GetObjectGuid().GetString().c_str(), guid.GetString().c_str());
-        return;
-    }
+    if (Unit *pMover = ObjectAccessor::GetUnit(*GetPlayer(), guid))
+        GetPlayer()->SetMover(pMover);
+    else
+        GetPlayer()->SetMover(NULL);
}

void WorldSession::HandleMountSpecialAnimOpcode(WorldPacket& /*recvdata*/)

Link to comment
Share on other sites

  • 1 year later...
×
×
  • 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