Linux Gdb

Cassius Clay

Member
Joined
Jan 16, 2011
Messages
34
Reaction score
0
for an error log using gdb, I have to compile tfs differently?In a post I found:

Code:
On console/terminal:

~: sudo aptitude install gdb
~: gdb
~: cd path/to/your/server
~: file theforgottenserver
~: run

When it crash type "bt" to get the backtrace....

If you are having issues getting the backtrace just type:
~: ulimit -c unlimited
But in order to use it, how should I compile tfs?
 

sn3ejk

This account is inactive.
Joined
Nov 16, 2011
Messages
2,122
Reaction score
139
Code:
gdb theforgottenserver
run
When the application shuts down the cause of a fault then the:
Code:
bt
 
OP
C

Cassius Clay

Member
Joined
Jan 16, 2011
Messages
34
Reaction score
0
The log is saved somewhere? because sometimes takes 6 hours to crash.. can use the standard tfs compiled with the parameters ./configure --enable-mysql --enable-root-permission ? thanks for your help
 
OP
C

Cassius Clay

Member
Joined
Jan 16, 2011
Messages
34
Reaction score
0
bump

- - - Updated - - -

I saved the log. can anyone help?

#0 0x080b4160 in Game::addMagicEffect (this=0x82af280, list=..., pos=...,
effect=3 '\003', ghostMode=false) at game.cpp:4508
#1 0x080b4327 in Game::combatBlockHit (this=0x82af280,
combatType=COMBAT_PHYSICALDAMAGE, attacker=0xaa520a80, target=0xa9b45458,
[email protected]: 0, checkDefense=true, checkArmor=true)
at game.cpp:4136
#2 0x0806eedc in Combat::CombatHealthFunc (caster=0xaa520a80,
target=0xa9b45458, params=..., data=0xb5fc5090) at combat.cpp:536
#3 0x08071a05 in Combat::doCombatHealth (caster=0xaa520a80,
target=0xa9b45458, minChange=-5, maxChange=-15, params=...)
at combat.cpp:828
#4 0x08071aa8 in Combat::doCombat (this=0xae0dac98, caster=0xaa520a80,
target=0xa9b45458) at combat.cpp:795
#5 0x081efd68 in CombatSpell::castSpell (this=0xae0db848,
creature=0xaa520a80, target=0xa9b45458) at spells.cpp:395
#6 0x08157409 in Monster::doAttacking (this=0xaa520a80, interval=0)
at monster.cpp:652
#7 0x080940a3 in Creature::eek:nAttacking (this=0xaa520a80, interval=540161312)
at creature.cpp:227
#8 0x080b9b89 in Game::checkCreatureAttack (this=0x82af280,
creatureId=1073842791) at game.cpp:3969
#9 0x0809883a in operator() (a1=1073842791, p=<optimized out>,
this=<optimized out>) at /usr/include/boost/bind/mem_fn_template.hpp:165
#10 operator()<boost::_mfi::mf1<void, Game, unsigned int>, boost::_bi::list0> (
a=<synthetic pointer>, f=..., this=<optimized out>)
at /usr/include/boost/bind/bind.hpp:313
#11 operator() (this=<optimized out>)
at /usr/include/boost/bind/bind_template.hpp:20
#12 boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void,
boost::_mfi::mf1<void, Game, unsigned int>, boost::_bi::list2<boost::_bi::value<Game*>, boost::_bi::value<unsigned int> > >, void>::invoke (
function_obj_ptr=...)
at /usr/include/boost/function/function_template.hpp:153
#13 0x08201862 in operator() (this=<optimized out>)
at /usr/include/boost/function/function_template.hpp:1013
#14 operator() (this=<optimized out>) at tasks.h:34
#15 Dispatcher::dispatcherThread (p=0x82a17a0) at tasks.cpp:73
#16 0x081ddfb4 in operator()<void (*)(void*), boost::_bi::list0> (
a=<synthetic pointer>,
[email protected]: 0x820159e <Dispatcher::dispatcherThread(void*)>,
this=0x82c2658) at /usr/include/boost/bind/bind.hpp:253
#17 operator() (this=0x82c2654) at /usr/include/boost/bind/bind_template.hpp:20
#18 boost::detail::thread_data<boost::_bi::bind_t<void, void (*)(void*), boost::_bi::list1<boost::_bi::value<void*> > > >::run (this=0x82c2550)
at /usr/include/boost/thread/detail/thread.hpp:61
#19 0xb7b6a48c in thread_proxy () from /usr/lib/libboost_thread.so.1.46.1
#20 0xb76a4d4c in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#21 0xb77a8d3e in clone () from /lib/i386-linux-gnu/libc.so.6
all these errors have to crash, or one in particular?
 
Last edited:
OP
C

Cassius Clay

Member
Joined
Jan 16, 2011
Messages
34
Reaction score
0
new log :

#0 0x080b4160 in Game::addMagicEffect (this=0x82af280, list=..., pos=...,
effect=3 '\003', ghostMode=false) at game.cpp:4508
#1 0x080b4327 in Game::combatBlockHit (this=0x82af280,
combatType=COMBAT_PHYSICALDAMAGE, attacker=0xaa6d5bf0, target=0xab7cb168,
[email protected]: 0, checkDefense=true, checkArmor=true)
at game.cpp:4136
#2 0x0806eedc in Combat::CombatHealthFunc (caster=0xaa6d5bf0,
target=0xab7cb168, params=..., data=0xb5fc5090) at combat.cpp:536
#3 0x08071a05 in Combat::doCombatHealth (caster=0xaa6d5bf0,
target=0xab7cb168, minChange=-40, maxChange=-100, params=...)
at combat.cpp:828
#4 0x08071aa8 in Combat::doCombat (this=0xadfe74c8, caster=0xaa6d5bf0,
target=0xab7cb168) at combat.cpp:795
#5 0x081efe18 in CombatSpell::castSpell (this=0xadfe96b8,
creature=0xaa6d5bf0, target=0xab7cb168) at spells.cpp:395
#6 0x0815741e in Monster::doAttacking (this=0xaa6d5bf0, interval=0)
at monster.cpp:655
#7 0x080940a3 in Creature::eek:nAttacking (this=0xaa6d5bf0, interval=32)
at creature.cpp:227
#8 0x080b9b89 in Game::checkCreatureAttack (this=0x82af280,
creatureId=1073777485) at game.cpp:3969
#9 0x0809883a in operator() (a1=1073777485, p=<optimized out>,
this=<optimized out>) at /usr/include/boost/bind/mem_fn_template.hpp:165
 
OP
C

Cassius Clay

Member
Joined
Jan 16, 2011
Messages
34
Reaction score
0
I made some modifications, but the crashes continue, log follows:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb5fc5b40 (LWP 1873)]
0x080b4160 in Game::addMagicEffect (this=0x82af280, list=..., pos=...,
effect=3 '\003', ghostMode=false) at game.cpp:4508
4508 game.cpp: Arquivo ou diretório não encontrado.
(gdb) bt
#0 0x080b4160 in Game::addMagicEffect (this=0x82af280, list=..., pos=...,
effect=3 '\003', ghostMode=false) at game.cpp:4508
#1 0x080b4327 in Game::combatBlockHit (this=0x82af280,
combatType=COMBAT_PHYSICALDAMAGE, attacker=0xaa6d5bf0, target=0xab7cb168,
[email protected]: 0, checkDefense=true, checkArmor=true)
at game.cpp:4136
#2 0x0806eedc in Combat::CombatHealthFunc (caster=0xaa6d5bf0,
target=0xab7cb168, params=..., data=0xb5fc5090) at combat.cpp:536
#3 0x08071a05 in Combat::doCombatHealth (caster=0xaa6d5bf0,
target=0xab7cb168, minChange=-40, maxChange=-100, params=...)
at combat.cpp:828
#4 0x08071aa8 in Combat::doCombat (this=0xadfe74c8, caster=0xaa6d5bf0,
target=0xab7cb168) at combat.cpp:795
#5 0x081efe18 in CombatSpell::castSpell (this=0xadfe96b8,
creature=0xaa6d5bf0, target=0xab7cb168) at spells.cpp:395
#6 0x0815741e in Monster::doAttacking (this=0xaa6d5bf0, interval=0)
at monster.cpp:655
#7 0x080940a3 in Creature::eek:nAttacking (this=0xaa6d5bf0, interval=32)
at creature.cpp:227
#8 0x080b9b89 in Game::checkCreatureAttack (this=0x82af280,
creatureId=1073777485) at game.cpp:3969
#9 0x0809883a in operator() (a1=1073777485, p=<optimized out>,
this=<optimized out>) at /usr/include/boost/bind/mem_fn_template.hpp:165
There is some support for the tfs? where programmers can analyze?



which of these errors is the main? which of these errors is the main? ie, one that does give the crash.
 
Top