this is the output of some print's and backtrace put when reproducing this crash:
--- RemoveGridMapReference: p(25,30) value = 1
--- getNGrid(38,33,0) = 4a10e00
--- RemoveGridMapReference: p(26,30) value = 1
--- getNGrid(37,33,0) = 49ecda0
--- RemoveGridMapReference: p(26,31) value = 1
--- getNGrid(37,32,0) = 49caf70
--- getNGrid(38,33,1) = 4a10e00
0 GameObjects, 59 Creatures, and 0 Corpses/Bones loaded for grid 2465 on map 615
--- getNGrid(37,32,1) = 49caf70
0 GameObjects, 35 Creatures, and 0 Corpses/Bones loaded for grid 2400 on map 615
WORLD: Send SMSG_THREAT_CLEAR Message
WORLD: Send SMSG_THREAT_CLEAR Message
--- RemoveGridMapReference: p(25,31) value = 1
--- getNGrid(38,32,0) = 4ab3660
--- RemoveGridMapReference: p(26,31) value = 1
--- getNGrid(37,32,0) = 0
Program received signal SIGSEGV, Segmentation fault.
[switching to Thread 0x7ffff17f8910 (LWP 10618)]
0x000000000060422f in Map::SetUnloadReferenceLock(CoordPair<64u> const&, bool)
()
(gdb) bt full
#0 0x000000000060422f in Map::SetUnloadReferenceLock(CoordPair<64u> const&, bool) ()
No symbol table info available.
#1 0x00000000005eefaf in MapInstanced::RemoveGridMapReference (
this=0x4b153e0, x=@0x7ffff17f7eec, y=@0x7ffff17f7ee8,
pForce=<value optimized out>) at ../../../src/game/MapInstanced.h:58
No locals.
#2 Map::UnloadGrid (this=0x4b153e0, x=@0x7ffff17f7eec, y=@0x7ffff17f7ee8,
pForce=<value optimized out>) at ../../../src/game/Map.cpp:1187
grid = <value optimized out>
gx = 26
__PRETTY_FUNCTION__ = "bool Map::UnloadGrid(const uint32&, const uint32&, bool)"
#3 0x00000000005ef10b in Map::UnloadAll (this=0x4b153e0,
pForce=<value optimized out>) at ../../../src/game/Map.cpp:1204
grid = <value optimized out>
#4 0x00000000005efc76 in ~Map (this=0x4b153e0,
__in_chrg=<value optimized out>) at ../../../src/game/Map.cpp:65
No locals.
#5 0x00000000005f00bd in ~InstanceMap (this=0x4b153e0,
__in_chrg=<value optimized out>) at ../../../src/game/Map.cpp:2417
No locals.
#6 0x00000000007c517e in MapInstanced::DestroyInstance (this=0x4969250,
looks like a null pointer bug. probabily a check would do, but really dont know what this piece of code does
edit: this seems to solve it:
diff --git a/src/game/Map.h b/src/game/Map.h
index 6e68529..46dcc7d 100644
--- a/src/game/Map.h
+++ b/src/game/Map.h
@@ -477,7 +477,7 @@ class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>, public MaNGOS::Obj
void SendObjectUpdates();
std::set<Object *> i_objectsToClientUpdate;
protected:
- void SetUnloadReferenceLock(const GridPair &p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadReferenceLock(on); }
+ void SetUnloadReferenceLock(const GridPair &p, bool on) { if (getNGrid(p.x_coord, p.y_coord)) getNGrid(p.x_coord, p.y_coord)->setUnloadReferenceLock(on); }
typedef MaNGOS::ObjectLevelLockable<Map, ACE_Thread_Mutex>::Lock Guard;