I have been trying to debug an old code that I used to work on with
a few other people, I am not sure what all they did before this
problem started but I never did fix it because I moved on to a new
project. Anyway this is just for fun but if anyone is able to help
me out I would be very greatful. I'll put the gdb and code below.
Program received signal SIGSEGV, Segmentation fault.
wiznet (string=0xbfffe060 "New Ofcol has just been reset.", ch=0x0, obj=0x0,
flag=64, flag_skip=0, min_level=0) at act_wiz.c:164
164 act_wiz.c: No such file or directory.
in act_wiz.c
(gdb) bt
#0 wiznet (string=0xbfffe060 "New Ofcol has just been reset.", ch=0x0,
obj=0x0, flag=64, flag_skip=0, min_level=0) at act_wiz.c:164
#1 0x0807712d in area_update () at db.c:1641
#2 0x08075981 in boot_db () at db.c:447
#3 0x080709f3 in main (argc=2, argv=0xbffff304) at comm.c:428
#4 0x4003b647 in __libc_start_main (main=0x80708c0 <main>, argc=2,
ubp_av=0xbffff304, init=0x8048d70 <_init>, fini=0x80b63d0 <_fini>,
rtld_fini=0x4000dcd4 <_dl_fini>, stack_end=0xbffff2fc)
at ../sysdeps/generic/libc-start.c:129
/*
* Repopulate areas periodically.
*/
void area_update (void)
{
AREA_DATA *pArea;
char buf[MAX_STRING_LENGTH];
for (pArea = area_first; pArea != NULL; pArea = pArea->next)
{
if (++pArea->age < 3)
continue;
/*
* Check age and reset.
* Note: Mud School resets every 3 minutes (not 15).
*/
if ((!pArea->empty && (pArea->nplayer == 0 || pArea->age >= 15))
|| pArea->age >= 31)
{
ROOM_INDEX_DATA *pRoomIndex;
reset_area (pArea);
sprintf (buf, "%s has just been reset.", pArea->name);
wiznet (buf, NULL, NULL, WIZ_RESETS, 0, 0);
pArea->age = number_range (0, 3);
pRoomIndex = get_room_index (ROOM_VNUM_SCHOOL);
if (pRoomIndex != NULL && pArea == pRoomIndex->area)
pArea->age = 15 - 2;
else if (pArea->nplayer == 0)
pArea->empty = TRUE;
}
}
return;
}
It looks like there is no problem here, I can't figure out why wiznet is
crashing it. I am going to compare wiznet itself to stock and if
its different I will replace it and go from there. I really don't
think thats the problem but I dont know where else to start.
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=features/junkmail