PDA

View Full Version : Congdar help !! segmentation fault !


provocating
06-07-2009, 05:15 PM
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".

Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /usr/lib/libmysqlclient.so.15...done.
Loaded symbols for /usr/lib/libmysqlclient.so.15
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/tls/i686/cmov/libcrypt.so.1...done.
Loaded symbols for /lib/tls/i686/cmov/libcrypt.so.1
Reading symbols from /lib/tls/i686/cmov/libnsl.so.1...done.
Loaded symbols for /lib/tls/i686/cmov/libnsl.so.1
Reading symbols from /lib/tls/i686/cmov/libm.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libm.so.6
Reading symbols from /lib/tls/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/tls/i686/cmov/libnss_files.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_files.so.2
Reading symbols from /lib/tls/i686/cmov/libnss_dns.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_dns.so.2
Reading symbols from /lib/tls/i686/cmov/libresolv.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libresolv.so.2
Reading symbols from /usr/lib/libperl.so.5.8...done.
Loaded symbols for /usr/lib/libperl.so.5.8
Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...done.
Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /home/jkg/eqemu/libEMuShareMem.so...done.
Loaded symbols for ./libEMuShareMem.so
Core was generated by `./zone dynamic_04 zones'.
Program terminated with signal 11, Segmentation fault.
#0 0x08300670 in Mob::PET_Process (this=0xb10c3140) at petAI.cpp:156
156 if (attack_dw_timer.Check() && GetOwnerID() && ( GetOwner()->GetClass() == MAGICIAN || GetOwner()->GetClass() == NECROMANCER || GetOwner()->GetClass() == SHADOWKNIGHT || GetOwner()->GetClass() == BEASTLORD ) )
(gdb) (gdb)
(gdb) (gdb) quit


http://www.eqemulator.net/forums/showthread.php?p=171553#post171553

provocating
06-07-2009, 05:38 PM
Just trying to help narrow it down, looks like it refers to this block of code right ?

// Ok now, let's check pet's offhand.
if (attack_dw_timer.Check() && GetOwnerID() && ( GetOwner()->GetClass() == MAGICIAN || GetOwner()->GetClass() == NECROMANCER || GetOwner()->GetClass() == SHADOWKNIGHT || GetOwner()->GetClass() == BEASTLORD ) )
{
if(GetOwner()->GetLevel() >= 24)
{
float DualWieldProbability = (GetSkill(DUAL_WIELD) + GetLevel()) / 400.0f;
DualWieldProbability -= MakeRandomFloat(0, 1);
if(DualWieldProbability < 0){
Attack(target, 14);
if (CanThisClassDoubleAttack())
{
sint32 RandRoll = rand()%100;
if (RandRoll < (GetLevel() + 20))
{
Attack(target, 14);
}
}
}
}
}


And something about the pets duel wield ? Well as far as pet classes that bit of code looks for he had MageX2, SKx2 and BLx1, Necx1

He does not give them weapons or gear.

Shendare
06-07-2009, 06:05 PM
Perhaps GetOwnerID() is returning a value but GetOwner() is returning NULL. That would cause the fault on the line being referenced in the error dump.

- Shendare

provocating
06-07-2009, 06:10 PM
NULLS always seem to cause problem in code. A world without NULLS, imagine.

I am sure Congdar will look at it and go, "Oh yeah, the problem is this....". I am no damn help, I can barely read C++.

provocating
06-07-2009, 07:45 PM
I went for my jog, stayed in ToV while I was gone. When I got back I was back to the log on screen, there was another dump and I ran it through. Looks like the same place.

GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".

Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /usr/lib/libmysqlclient.so.15...done.
Loaded symbols for /usr/lib/libmysqlclient.so.15
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/tls/i686/cmov/libcrypt.so.1...done.
Loaded symbols for /lib/tls/i686/cmov/libcrypt.so.1
Reading symbols from /lib/tls/i686/cmov/libnsl.so.1...done.
Loaded symbols for /lib/tls/i686/cmov/libnsl.so.1
Reading symbols from /lib/tls/i686/cmov/libm.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libm.so.6
Reading symbols from /lib/tls/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/tls/i686/cmov/libnss_files.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_files.so.2
Reading symbols from /lib/tls/i686/cmov/libnss_dns.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_dns.so.2
Reading symbols from /lib/tls/i686/cmov/libresolv.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libresolv.so.2
Reading symbols from /usr/lib/libperl.so.5.8...done.
Loaded symbols for /usr/lib/libperl.so.5.8
Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...done.
Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /home/jkg/eqemu/libEMuShareMem.so...done.
Loaded symbols for ./libEMuShareMem.so
Core was generated by `./zone dynamic_04 zones'.
Program terminated with signal 11, Segmentation fault.
#0 0x08300670 in Mob::PET_Process (this=0x8c625b8) at petAI.cpp:156
156 if (attack_dw_timer.Check() && GetOwnerID() && ( GetOwner()->GetClass() == MAGICIAN || GetOwner()->GetClass() == NECROMANCER || GetOwner()->GetClass() == SHADOWKNIGHT || GetOwner()->GetClass() == BEASTLORD ) )
(gdb)

Congdar
06-08-2009, 10:06 AM
so, is this resolved? did you get back to the main source trunk and all is well?

provocating
06-13-2009, 12:34 PM
All is solved, thanks very much !