Jump to content

[CRASH] Creature::LoadFromDB()


michalpolko

Recommended Posts

M: 11237

Program received signal SIGSEGV, Segmentation fault.
[switching to Thread 0x436f3950 (LWP 8666)]
0x000000000087ce04 in Object::GetEntry (this=0x7f946b1a4100) at /home/MaNGOS/source/src/game/Object.h:142
142    /home/MaNGOS/source/src/game/Object.h: No such file or directory.
   in /home/MaNGOS/source/src/game/Object.h
#0  0x000000000087ce04 in Object::GetEntry (this=0x7f946b1a4100) at /home/MaNGOS/source/src/game/Object.h:142
#1  0x00000000009b9ba6 in Creature::LoadFromDB (this=0x7f946b1a4100, guidlow=1049904, map=0x1604000)
   at /home/MaNGOS/source/src/game/Creature.cpp:1242
#2  0x0000000000b609cc in LoadHelper<Creature> (guid_set=@0x7f949d4ee848, cell=@0x436f2500, m=@0x55ae980, count=@0x436f274c, 
   map=0x1604000, grid=@0x55ae950) at /home/MaNGOS/source/src/game/ObjectGridLoader.cpp:120
#3  0x0000000000b5f541 in ObjectGridLoader::Visit (this=0x436f2730, m=@0x55ae980)
   at /home/MaNGOS/source/src/game/ObjectGridLoader.cpp:197
#4  0x0000000000b60b07 in VisitorHelper<ObjectGridLoader, Creature> (v=@0x436f2730, c=@0x55ae980)
   at /home/MaNGOS/source/src/framework/GameSystem/TypeContainerVisitor.h:50
#5  0x0000000000b60b26 in VisitorHelper<ObjectGridLoader, Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > (
   v=@0x436f2730, c=@0x55ae980) at /home/MaNGOS/source/src/framework/GameSystem/TypeContainerVisitor.h:57
#6  0x0000000000b60d42 in VisitorHelper<ObjectGridLoader, GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > (v=@0x436f2730, c=@0x55ae950) at /home/MaNGOS/source/src/framework/GameSystem/TypeContainerVisitor.h:58
#7  0x0000000000b60d69 in VisitorHelper<ObjectGridLoader, TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > > (v=@0x436f2730, c=@0x55ae950)
   at /home/MaNGOS/source/src/framework/GameSystem/TypeContainerVisitor.h:65
#8  0x0000000000b60d8c in TypeContainerVisitor<ObjectGridLoader, TypeMapContainer<TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > > >::Visit (this=0x436f2660, c=@0x55ae950)
   at /home/MaNGOS/source/src/framework/GameSystem/TypeContainerVisitor.h:80
#9  0x0000000000b60dab in Grid<Player, TypeList<Player, TypeList<Creature, TypeList<Corpse, TypeList<Camera, TypeNull> > > >, TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > >::Visit<ObjectGridLoader> (
   this=0x55ae950, visitor=@0x436f2660) at /home/MaNGOS/source/src/framework/GameSystem/Grid.h:80
#10 0x0000000000b5f9a4 in ObjectGridLoader::Load (this=0x436f2730, grid=@0x55ae950)
   at /home/MaNGOS/source/src/game/ObjectGridLoader.cpp:220
#11 0x0000000000b60eed in GridLoader<Player, TypeList<Player, TypeList<Creature, TypeList<Corpse, TypeList<Camera, TypeNull> > > >, TypeList<GameObject, TypeList<Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > > >::Load<ObjectGridLoader> (this=0x436f26cf, grid=@0x55ae950, loader=@0x436f2730) at /home/MaNGOS/source/src/framework/GameSystem/GridLoader.h:52
#12 0x0000000000b5fa8e in ObjectGridLoader::LoadN (this=0x436f2730) at /home/MaNGOS/source/src/game/ObjectGridLoader.cpp:242
#13 0x0000000000966dee in Map::EnsureGridLoaded (this=0x1604000, cell=@0x436f28b0)
   at /home/MaNGOS/source/src/game/Map.cpp:272
#14 0x0000000000967c4e in Map::EnsureGridLoadedAtEnter (this=0x1604000, cell=@0x436f28b0, player=0x7f9475a40000)
   at /home/MaNGOS/source/src/game/Map.cpp:234
#15 0x00000000009681b2 in Map::PlayerRelocation (this=0x1604000, player=0x7f9475a40000, x=-12467.248, y=208.898224, 
   z=36.2116661, orientation=4.29879761) at /home/MaNGOS/source/src/game/Map.cpp:689
#16 0x0000000000c1f146 in Unit::SetPosition (this=0x7f9475a40000, x=-12467.248, y=208.898224, z=36.2116661, 
   orientation=4.29879761, teleport=false) at /home/MaNGOS/source/src/game/Unit.cpp:504
#17 0x0000000000bcea09 in Player::SetPosition (this=0x7f9475a40000, x=-12467.248, y=208.898224, z=36.2116661, 
   orientation=4.29879761, teleport=false) at /home/MaNGOS/source/src/game/Player.cpp:6161
#18 0x0000000000aaaea6 in WorldSession::HandleMoverRelocation (this=0x7f9478c573c0, movementInfo=@0x436f2c10)
   at /home/MaNGOS/source/src/game/MovementHandler.cpp:1114
#19 0x0000000000aaf7e4 in WorldSession::HandleMovementOpcodes (this=0x7f9478c573c0, recv_data=@0x7f9478c6d2d0)
   at /home/MaNGOS/source/src/game/MovementHandler.cpp:636
#20 0x000000000087eb8d in WorldSession::ExecuteOpcode (this=0x7f9478c573c0, opHandle=@0x12598c0, packet=0x7f9478c6d2d0)
   at /home/MaNGOS/source/src/game/WorldSession.cpp:928
#21 0x000000000088153f in WorldSession::Update (this=0x7f9478c573c0, diff=100, updater=@0x436f2f60)
   at /home/MaNGOS/source/src/game/WorldSession.cpp:227
#22 0x000000000096deb1 in Map::Update (this=0x1604000, t_diff=@0x7f946b2b60e0) at /home/MaNGOS/source/src/game/Map.cpp:452
#23 0x0000000000d07dd4 in MapUpdateRequest::call (this=0x7f946b2b60c0) at /home/MaNGOS/source/src/game/MapUpdater.cpp:47
#24 0x0000000000d5cf76 in DelayExecutor::svc (this=0x7f94798693d0) at /home/MaNGOS/source/src/shared/DelayExecutor.cpp:60
#25 0x00007f94a94b16d7 in ACE_Task_Base::svc_run (args=<value optimized out>)
   at /home/MaNGOS/source/dep/ACE_wrappers/ace/Task.cpp:271
#26 0x00007f94a94b2d85 in ACE_Thread_Adapter::invoke (this=0x7f947952fe20)
   at /home/MaNGOS/source/dep/ACE_wrappers/ace/Thread_Adapter.cpp:94
#27 0x00007f94a7725fc7 in start_thread () from /lib/libpthread.so.0
#28 0x00007f94a749b64d in clone () from /lib/libc.so.6
#29 0x0000000000000000 in ?? ()
#0  0x000000000087ce04 in Object::GetEntry (this=0x7f946b1a4100) at /home/MaNGOS/source/src/game/Object.h:142

With my database (UDB 39x) if I go to Grom Gol village, then when some creature is loaded the code is executed and a crash occurs:

   if (!IsPositionValid())
   {
       sLog.outError("Creature (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)", GetGUIDLow(), data->id, GetPositionX(), GetPositionY());
       return false;
   }

either in IsPositionValid() or one of the functions in sLog.outError as parameters.

Link to comment
Share on other sites

OK I fixed this in this way:

- sLog.outError("Creature (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)", GetGUIDLow(), data->id, GetPositionX(), GetPositionY());
+ sLog.outError("Creature (guidlow %d, entry %d) not loaded. Suggested coordinates isn't valid (X: %f Y: %f)", guidlow, data->id, data->posX, data->posY);

Not loaded creature can't call these functions?

Link to comment
Share on other sites

×
×
  • 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