Ok, I start up the MUD, remove my char's light (his deities sigil), and the MUD crashes. The core size is unlimited, and I don't know why it wouldn't create the file, but when the core dumps, the file is no where to be seen. I'm running Win XP with Cygwin with g3 setup for the MUD debug level. I searched earlier and didn't see anything mentioning this kind of problem.
Crash issues caused by rem_obj
Posted by Dralnu on Thu 16 Jun 2005 01:26 AM — 5 posts, 22,617 views.
I'm pretty sure Cygwin doesn't generate cores. At least from what I've heard on these forums.
Best way to debug on cygwin is to run your startup script
as a background process (./startup <portnumber> &, then hit enter.)
Then, type ps -f to see get your id # for your smaug process, then attach gdb to it (gdb smaug <WINPID>)
Then, either crash your mud deliberately, or run it till it crashes, then use bt to trace the stack.
>.>
as a background process (./startup <portnumber> &, then hit enter.)
Then, type ps -f to see get your id # for your smaug process, then attach gdb to it (gdb smaug <WINPID>)
Then, either crash your mud deliberately, or run it till it crashes, then use bt to trace the stack.
>.>
Or you can run gdb then type file <path>/exefile
then run and you will be running smaug inside gdb, i do this all the time at home, so i dont have to worry about cleaning out all the core files that end up littering the area directory.
then run and you will be running smaug inside gdb, i do this all the time at home, so i dont have to worry about cleaning out all the core files that end up littering the area directory.
One part of the crash I found was it only is caused by deity objects. I looked in the playerfile, and instead of the usual
#OBJECT
Vnum 106
WearLoc 1
Level 1
Values 5 5 0 0 0 0
End
it was more of an actual object file from the .are directory. Anyone know what may be causing this odd behavior?
EDIT #1:
Found out it wasn't just deity objects, but objects in general. I had a config added and had to change the get_eq_char to:
/*
* Find a piece of eq on a character.
* Will pick the top layer if clothing is layered. -Thoric
*/
OBJ_DATA *
get_eq_char (CHAR_DATA * ch, int iWear)
{
OBJ_DATA *obj, *maxobj = NULL;
OBJ_DATA *cloak = NULL;
for (obj = ch->first_carrying; obj; obj = obj->next_content)
{
if (obj->wear_loc == WEAR_ABOUT) /*checks for cloak in wear_loc WEAR_ABOUT*/
cloak = obj;
}
for (obj = ch->first_carrying; obj; obj = obj->next_content)
{
if (ch->pcdata && IS_SET (ch->pcdata->flags, PLR_CLOAK) && cloak)
{
if (obj->wear_loc != WEAR_FEET && obj->wear_loc != WEAR_HEAD && obj->wear_loc != WEAR_HANDS &&obj->wear_loc != WEAR_ABOUT && obj->wear_loc != WEAR_FACE && obj->wear_loc != WEAR_FLOAT && obj->wear_loc != WEAR_SHOULDER)
continue;
}
else if (obj->wear_loc == iWear)
{
if (!obj->pIndexData->layers)
return obj;
else if (!maxobj || obj->pIndexData->layers > maxobj->pIndexData->layers)
maxobj = obj;
}
}
return maxobj;
}
This bit of code was given to me to replace the old code that was giving me some hefty trouble. The config, PLR_CLOAK, has seemed to work well, but I've run into issues lately when testing it.
#OBJECT
Vnum 106
WearLoc 1
Level 1
Values 5 5 0 0 0 0
End
it was more of an actual object file from the .are directory. Anyone know what may be causing this odd behavior?
EDIT #1:
Found out it wasn't just deity objects, but objects in general. I had a config added and had to change the get_eq_char to:
/*
* Find a piece of eq on a character.
* Will pick the top layer if clothing is layered. -Thoric
*/
OBJ_DATA *
get_eq_char (CHAR_DATA * ch, int iWear)
{
OBJ_DATA *obj, *maxobj = NULL;
OBJ_DATA *cloak = NULL;
for (obj = ch->first_carrying; obj; obj = obj->next_content)
{
if (obj->wear_loc == WEAR_ABOUT) /*checks for cloak in wear_loc WEAR_ABOUT*/
cloak = obj;
}
for (obj = ch->first_carrying; obj; obj = obj->next_content)
{
if (ch->pcdata && IS_SET (ch->pcdata->flags, PLR_CLOAK) && cloak)
{
if (obj->wear_loc != WEAR_FEET && obj->wear_loc != WEAR_HEAD && obj->wear_loc != WEAR_HANDS &&obj->wear_loc != WEAR_ABOUT && obj->wear_loc != WEAR_FACE && obj->wear_loc != WEAR_FLOAT && obj->wear_loc != WEAR_SHOULDER)
continue;
}
else if (obj->wear_loc == iWear)
{
if (!obj->pIndexData->layers)
return obj;
else if (!maxobj || obj->pIndexData->layers > maxobj->pIndexData->layers)
maxobj = obj;
}
}
return maxobj;
}
This bit of code was given to me to replace the old code that was giving me some hefty trouble. The config, PLR_CLOAK, has seemed to work well, but I've run into issues lately when testing it.