Jump to content

[patch/dev] Fix for crash in Pool system


Guest KAPATEJIb

Recommended Posts

I'm trying to find a way how to fix these annoying crashes...

#0  0x0061f410 in __kernel_vsyscall ()
No symbol table info available.
#1  0x004d8df0 in raise () from /lib/libc.so.6
No symbol table info available.
#2  0x004da701 in abort () from /lib/libc.so.6
No symbol table info available.
#3  0x004d226b in __assert_fail () from /lib/libc.so.6
No symbol table info available.
#4  0x08390723 in PoolGroup<Creature>::SpawnObject (this=0x988e0e8,
   spawns=@0xd3715a4, limit=1, triggerFrom=119807, instantly=false)
   at ../../../src/game/PoolManager.cpp:279
       obj = (PoolObject *) 0xa50c0b0
       i = 0
       lastDespawned = 0
       count = 1
       __PRETTY_FUNCTION__ = "void PoolGroup<T>::SpawnObject(SpawnedPoolData&, uint32, uint32, bool) [with T = Creature]"
       __FUNCTION__ = "SpawnObject"
#5  0x0838d201 in PoolManager::SpawnPoolGroup<Creature> (this=0xd371528,
   pool_id=5676, db_guid=119807, instantly=false)
   at ../../../src/game/PoolManager.cpp:726
No locals.
#6  0x08390b3c in PoolManager::UpdatePool<Creature> (this=0xd371528,
   pool_id=5676, db_guid_or_pool_id=119807)
   at ../../../src/game/PoolManager.cpp:787
       motherpoolid = <value optimized out>
#7  0x081aff15 in Creature::Update (this=0x273f9bd8, diff=129)
   at ../../../src/game/Creature.cpp:407
       poolid = 5676
#8  0x0829b07a in VisitorHelper<MaNGOS::ObjectUpdater, Creature> (
   v=@0xaa6ee280, c=@0x251c8384) at ../../../src/game/GridNotifiersImpl.h:48
No locals.
#9  0x0829cbd1 in VisitorHelper<MaNGOS::ObjectUpdater, Creature, TypeList<DynamicObject, TypeList<Corpse, TypeNull> > > (v=@0xaa6ee280, c=@0x251c8384)
   at ../../../src/game/../framework/GameSystem/TypeContainerVisitor.h:57
No locals.
#10 0x08296c3d in Map::Update (this=0x14cbb8b8, t_diff=@0xaa6ee2b8)
   at ../../../src/game/../framework/GameSystem/TypeContainerVisitor.h:80
       plr = <value optimized out>
       area = {right_offset = 1, left_offset = 2, upper_offset = 1,
 lower_offset = 2}
       updater = {i_timeDiff = 129}
       __FUNCTION__ = "Update"
       __PRETTY_FUNCTION__ = "virtual void Map::Update(const uint32&)"
#11 0x082a8a35 in MapManager::Update (this=0x130b8140, diff=32)
   at ../../../src/game/MapManager.cpp:262

I doesn't know if it works, but seems it's a typo in Poolmanager.cpp

need some tests.

diff --git a/src/game/PoolManager.cpp b/src/game/PoolManager.cpp
index d94381d..cef9ab9 100644
--- a/src/game/PoolManager.cpp
+++ b/src/game/PoolManager.cpp
@@ -276,9 +276,9 @@ void PoolGroup<T>::SpawnObject(SpawnedPoolData& spawns, uint32 limit, uint32 tri

        if (obj->guid == triggerFrom)
        {
+            ReSpawn1Object(obj);
            ASSERT(spawns.IsSpawnedObject<T>(obj->guid));
            ASSERT(spawns.GetSpawnedObjects(poolId) > 0);
-            ReSpawn1Object(obj);
            triggerFrom = 0;
            continue;
        }

If you have ideas how to fix it with more generic way - post it.

Link to comment
Share on other sites

it's because of

ASSERT(spawns.IsSpawnedObject<T>(obj->guid));

it's return "false", it's mean Object doesn't spawned. I think need to respawn it if object isn't spawned, that what i do in my patch.

ofcourse this is just in theory, i didn't test this yet, because i don't know how to reproduce this crash.

Link to comment
Share on other sites

  • 6 months 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