Heres my problem I start the mud and boom. I traced the stackdump to the
line below with this -->
This is found in the update.c in the function char_update.
Please help.
Dantin
/*
* Autosave and autoquit.
* Check that these chars still exist.
*/
for ( ch = char_list; ch != NULL; ch = ch_next )
{
if (!IS_VALID(ch))
{
bug("update_char: Trying to work with an invalidated
character.\n",0);
break;
}
}
ch_next = ch->next;
GDB --> if (ch->desc != NULL && ch->desc->descriptor % 30 == save_number)
{
save_char_obj(ch);
}
if (ch == ch_quit)
{
do_function(ch, &do_quit, "" );
}
return;
}
This was after I patched in a bug fix. Heres the bug:
Autologoff
Problem
When a player gets auto-logged off other playerfiles can get
corrupted.
Cause
The for-loop in char_update doesn't keep track of the possibility of
pets. If a player is auto-logged off and his pet is the next ch_next,
player-characters in the freed-characterslist might be saved with
invalid strings in their playerfiles.
Patch
In update.c/update_char(), add the following
/*
* Autosave and autoquit.
* Check that these chars still exist.
*/
for ( ch = char_list; ch != NULL; ch = ch_next ) {
+ if (!IS_VALID(ch)) {
--> didn't fly when compiling+ bug('update_char: Trying to work with
an invalidated character.\n'); -->changed to bug("update_char: Trying to
work with an invalidated character.\n",0);
+ break;
+ }
ch_next = ch->next;
To be sure it never happens again, add this to save.c/save_char_obj():
if ( IS_NPC(ch) )
return;
+ //
+ // Don't save if the character is invalidated.
+ // This might happen during the auto-logoff of players.
+ // (or other places not yet found out)
+ //
+ if ( !IS_VALID(ch)) {
+ bug("save_char_obj: Trying to save an invalidated character.\n");
+ return;
+ }
if ( ch->desc != NULL && ch->desc->original != NULL )
ch = ch->desc->original;
Any help is appretiated and I apologize for this long e-mail.
Dantin