Ayyıldız2 | 2008 TR Yapısı • 1-99 Orta Emek Destan • Oto Avsız • 10 Temmuz 21:00 HEMEN TIKLA!
Hello,
Recently I found a bug, that happens every time I'm either breaking a metin and then get poison from some monster that came from the metin or even a stand alone monster... (we found this bug on metin 8009 (monsters from desert, v2), the monsters give poison and the server crash)
Sometimes when I teleport to other maps (if the map is on another core) the server crashs (this if poison is given by a player and not a monster)
This is the debug:
Lines from char_battle.cpp:
Lines from char_resist.cpp:
Is anyone able to help me?
Thank you all
Recently I found a bug, that happens every time I'm either breaking a metin and then get poison from some monster that came from the metin or even a stand alone monster... (we found this bug on metin 8009 (monsters from desert, v2), the monsters give poison and the server crash)
Sometimes when I teleport to other maps (if the map is on another core) the server crashs (this if poison is given by a player and not a monster)
This is the debug:
Kod:
root@sv1:/usr/home/game/share/bin # lldb game -c game.core
(lldb) target create "game" --core "game.core"
Core file '/usr/home/game/share/bin/game.core' (i386) was loaded.
(lldb) bt all
* thread #1, name = 'game', stop reason = signal SIGSEGV
* frame #0: game`CHARACTER::Damage(this=0x469f7640, pAttacker=0x00000000, dam=1010, type=DAMAGE_TYPE_POISON) at char_battle.cpp:2121
frame #1: game`long poison_event(event=LPEVENT @ 0x00000008, processing_time=0) at char_resist.cpp:68
frame #2: 0x08490850 game`nBATTLE_ARENA_MAP + 16
thread #2, name = 'game', stop reason = signal SIGSEGV
frame #0: 0x2889c8e9 libc.so.7`__umtx_op + 5
frame #1: 0x28888bac libc.so.7`sem_clockwait_np + 236
frame #2: 0x28888c70 libc.so.7`sem_wait + 32
frame #3: 0x0848e4e8 game`CSemaphore::Wait(void) + 24
thread #3, name = 'game', stop reason = signal SIGSEGV
frame #0: 0x2889c8e9 libc.so.7`__umtx_op + 5
frame #1: 0x28888bac libc.so.7`sem_clockwait_np + 236
frame #2: 0x28888c70 libc.so.7`sem_wait + 32
frame #3: 0x0848e4e8 game`CSemaphore::Wait(void) + 24
thread #4, name = 'game', stop reason = signal SIGSEGV
frame #0: 0x2889c8e9 libc.so.7`__umtx_op + 5
frame #1: 0x28888bac libc.so.7`sem_clockwait_np + 236
frame #2: 0x28888c70 libc.so.7`sem_wait + 32
frame #3: 0x0848e4e8 game`CSemaphore::Wait(void) + 24
(lldb)
Lines from char_battle.cpp:
C++:
if (type != DAMAGE_TYPE_NORMAL && type != DAMAGE_TYPE_NORMAL_RANGE)
{
if (IsAffectFlag(AFF_TERROR)) //THIS IS LINE 2121
{
int pct = GetSkillPower(SKILL_TERROR) / 400;
if (number(1, 100) <= pct)
return false;
}
}
Lines from char_resist.cpp:
C++:
EVENTFUNC(poison_event)
{
TPoisonEventInfo * info = dynamic_cast<TPoisonEventInfo *>( event->info );
if ( info == NULL )
{
sys_err( "poison_event> <Factor> Null pointer" );
return 0;
}
LPCHARACTER ch = info->ch;
if (ch == NULL) { // <Factor>
return 0;
}
LPCHARACTER pkAttacker = CHARACTER_MANAGER::instance().FindByPID(info->attacker_pid);
int dam = ch->GetMaxHP() * GetPoisonDamageRate(ch) / 1000;
if (test_server) ch->ChatPacket(CHAT_TYPE_NOTICE, "Poison Damage %d", dam);
if (ch->Damage(pkAttacker, dam, DAMAGE_TYPE_POISON)) //THIS IS LINE 68
{
ch->m_pkPoisonEvent = NULL;
return 0;
}
--info->count;
if (info->count)
return PASSES_PER_SEC(3);
else
{
ch->m_pkPoisonEvent = NULL;
return 0;
}
}
Is anyone able to help me?
Thank you all