Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 02-06-2004, 03:24 AM
smogo
Discordant
 
Join Date: Jan 2004
Location: 47
Posts: 339
Default Any C++ guru for help, or .. is it the wrong board ?

Duno if it is the place to post this, but playing around with the code, i get stuck by a crash in zone :

in NPC::Process() line 521 there is a call to AI_Process(). This refers to the parent's class Mob::AI_Process(). During the call, "this" changes to a wrong value.

Below is a gbd output, where frame 1 refers to AI_Process, and frame 2 to the caller's Process(). i read that "this" turns from 0x86885e0 (correct) to 0xbffff870 (incorrect, and obviously somewhere on the stack, where it does not belong IMHO)

am i just dumb at C++ ? is it a thread related ?
Code:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 27800)]
0x08715848 in ?? ()
Current language:  auto; currently c
(gdb) bt
#0  0x08715848 in ?? ()
#1  0x080e9833 in Mob::AI_Process() (this=0xbffff870) at MobAI.cpp:942
#2  0x080c496d in NPC::Process() (this=0x86885e0) at npc.cpp:521
#3  0x08092710 in EntityList::MobProcess() (this=0x82730a0)
    at linked_list.h:174
#4  0x080c6f9a in main (argc=5, argv=0x5f) at net.cpp:343
#5  0x4018dd06 in __libc_start_main () from /lib/libc.so.6
(gdb) frame 1
#1  0x080e9833 in Mob::AI_Process() (this=0xbffff870) at MobAI.cpp:942
942                             Mob* tmptar = entity_list.AICheckCloseArrgo(this, argo, assist);
Current language:  auto; currently c++
(gdb) print this->name
$1 = "\0\0\0\0\0\0i586\0/repository/vol313/bld/eqemu/bin/zone\0qeynos\0192.168."
(gdb) up
#2  0x080c496d in NPC::Process() (this=0x86885e0) at npc.cpp:521
521             AI_Process();
(gdb) print this->name
$2 = "Kinloc_Flamepaw's_pet00", '\0' <repeats 40 times>
(gdb) l
516                             safe_delete(hp_app);
517                     }
518             }
519
520             adverrorinfo = 3;
521             AI_Process();
522             adverrorinfo = 0;
523         return true;
524
Thanks for any help. Sry if this is not the correct forum.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 01:19 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3