d->character being Null?!

From: Templar Viper (templarviper@hotmail.com)
Date: 03/19/02


Hello,

A while ago I noticed the problem of a variable being empty, while it shouldn't have.
I was running the mud and doing some things, and it chrashed. Here's the coredump:

Program received signal SIGSEGV, Segmentation fault.
reset_char (ch=0x0) at db.c:3212
3212        GET_EQ(ch, i) = NULL;

Well that's weird. ch being Null. Now look at the place where this function is being used: (since hey, that's where the Null came from)

case CON_MENU:  /* get selection from main menu  */
    switch (*arg) {
    case '0':
      SEND_TO_Q("Goodbye.\r\n", d);
      STATE(d) = CON_CLOSE;
      break;

    case '1':
      reset_char(d->character); <---- This is the line.
      read_aliases(d->character);

      if (PLR_FLAGGED(d->character, PLR_INVSTART))
 GET_INVIS_LEV(d->character) = GET_LEVEL(d->character);

That's weird, how can that variable can be empty? It's in the function nanny(), the non-player handler. What's even more weird, is that you can perfectly use the menu logging in at first, but when you begin playing, quit, and reenter the game (Or any other procedure where character is being called), the mud chrashes.
 I've looked through the archives and found a message similar to this, but there was no answer given (http://www.circlemud.org/maillist/2001-03/0376.html). If anyone could help me would be really great, got no clue left..

Here's some info on my system:

Circlemud bpl20.
Os: Cygwin on windows '98

I might post my server on the ftp if anyone is interested. It has 128bit patch, ascii player and objectfiles, olc, dg_scripts, all latest version, and (as far as I know) it is working perfectly.

--
   +---------------------------------------------------------------+
   | 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/25/03 PDT