rendered paste bodyIndex: src/game/MapInstanced.cpp
===================================================================
--- src/game/MapInstanced.cpp (revision 5406)
+++ src/game/MapInstanced.cpp (working copy)
@@ -296,14 +296,13 @@
void MapInstanced::CreateInstance(uint32 InstanceId, Map* &map)
{
+ Guard guard(*this);
if (!IsValidInstance(InstanceId))
{
// instance is invalid, need to verify map presence
if (map)
{
// map for the instance is present, but the instance itself is no more valid, destroy map
- Guard guard(*this);
-
map->Reset();
m_InstancedMaps.erase(InstanceId);
delete map;
@@ -315,8 +314,6 @@
if (!map)
{
// map does not exist, create it
- Guard guard(*this);
-
map = new Map(GetId(), GetGridExpiry(), InstanceId);
m_InstancedMaps[InstanceId] = map;
}
=====================
Fixe for
#8 0x887a1428 in __cxa_throw () from /usr/lib/libstdc++.so.5
No symbol table info available.
#9 0x886e579e in ZThread::MutexImpl<ZThread::fifo_list, ZThread::NullBehavior>::acquire (this=0x1a8fd0c0) at new_alloca
i = {_M_cur = 0x888e3dd3, _M_first = 0x1ed0d060,
_M_last = 0xbf4f93f8, _M_node = 0x887e3b3d}
self = (class ZThread::ThreadImpl *) 0x92faa00
m = (ZThread::Monitor &) @0x92faa10: {<ZThread::Status> = {
_pending = 0,
_mask = 65527}, <ZThread::NonCopyable> = {<No data fields>},
_lock = {<ZThread::NonCopyable> = {<No data fields>}, _mtx = 0x92fac00},
_waitCond = 0x9208c80, _waitLock = 0x92fad80, _owner = 0xc802800,
_waiting = false}
state = 209725512
g1 = {<ZThread::LockHolder<ZThread::FastLock>> = {
_lock = @0x1a8fd0e8,
_enabled = true}, <ZThread::NonCopyable> = {<No data fields>}, <No data fields>}
__func__ = "acquire"
#10 0x886e4c12 in ZThread::Mutex::acquire (this=0x17e) at Mutex.cxx:46
No locals.
#11 0x0836ce33 in MapInstanced::CreateInstance (this=0x1ecfd000,
InstanceId=4683, map=@0xbf4f9534) at ThreadingModel.h:43
guard = {i_lock = {i_mutex = @0x1ecfd018}}
#12 0x0836d5e0 in MapInstanced::GetInstance (this=0x1ecfd000, obj=0x206ef000)
at Object.h:138
InstanceId = 4683
instantiator = (class Player *) 0x0
map = (class Map *) 0x0
instantiator_id = 152853376
instantiator_online = 136
instantiator_bound = 115
#13 0x0818432e in MapManager::GetMap (this=0x92f2c00, id=230, obj=0x206ef000)
at Map.h:210
m = (class Map *) 0x0
#14 0x081a18e6 in WorldObject::GetMap (this=0x17e) at Object.h:305