Re: circle-3.1-w-goodies: email crash

From: Mark Garringer (zizazat@hotmail.com)
Date: 01/20/03


>         Your bundle was pretty good, im sure I downloaded it and played
>with it, I believe their is a bug though when players try and >send
>mudmail, crashes the mud, I could be confusing your bundle with >another
>one though.

One of the patches somewhere introducted several incorrect save_char calls
(like save_char(vict, GET_LOADROOM(ch))). I believe most of those have been
worked out in what will be the second release. However, I was able to find
the problem you described, I'm just not sure what to do about it. :(

When you attempt to send mudmail, mail_recip_ok called
extract_char_final(victim)

int mail_recip_ok(const char *name)
{
  struct char_data *victim;
  int ret = FALSE;

  CREATE(victim, struct char_data, 1);
  clear_char(victim);
  if (get_id_by_name(name) >= 0) {
    save_char(victim, NOWHERE);
    char_to_room(victim, 0);
    if (!PLR_FLAGGED(victim, PLR_DELETED))
      ret = TRUE;
    extract_char_final(victim);
  } else
    free(victim);
  return ret;
}

And in extract_char_final, it crahes at a save_char call:

  if (IS_NPC(ch)) {
    if (GET_MOB_RNUM(ch) != NOTHING)    /* prototyped */
      mob_index[GET_MOB_RNUM(ch)].number--;
    clearMemory(ch);
    if (SCRIPT(ch))
      extract_script(SCRIPT(ch));
    if (SCRIPT_MEM(ch))
      extract_script_mem(SCRIPT_MEM(ch));
  } else {
    save_char(ch, GET_LOADROOM(ch));
    Crash_delete_crashfile(ch);
  }

Core dump. So I changed to to save_char(ch, NOWHERE); and it doesn't crash,
I just get a SYSERR: NULL pointer or empty string passed to get_filename(),
(nil) or 0xbffff2d0. Tasty.

So according to gdb the first time around, victim passed out of the mail
code really is null, and null doesn't have a LOADROOM. So now, it just
doesn't know what to do when it tries to save a null filename?

Help?

--Ziz



_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/26/03 PDT