Re: BPL14 with OLC2.0, Autoeq, and Copyover-5

From: Ryan Guthrie (circle@NS2.DKSERVER.DK)
Date: 08/25/98


Different try:
I found this in interpreter.c:

/* with the copyover patch, this next line goes in enter_player_game() */
    GET_ID(d->character) = GET_IDNUM(d->character);

So i put this in enter_player_game and still had the same problem.  It
continues to crash upon the first thing typed(or a simple enter) after a
copyover.  This is because history_pos in comm.c is NULL according to gdb.
I have compared the refrenced of history_pos to the code before i added
copyover, didn't see anything.

northeast corner you spot a small staircase leading upwards.
A large bulletin board is mounted on a wall here.  It glows with a faint
aura.

> copyover

 *** COPYOVER by Sim - please remain seated!

Restoring from copyover...

Copyover recovery complete.

Welcome to the land of CircleMUD!  May your visit here be... Interesting.

The Immortal Board Room
   The main hang out of the Gods, the Immortal Board Room is the place to
be.  Gods exchange messages here most every day.  The mortal board room is
to the east and the meeting room for the gods is to the south.  To the
north
is the Gods' Inn and to the west is a post office for Gods.  There is a
large
staircase leading down to the main temple in the city of Midgaard.  In the
northeast corner you spot a small staircase leading upwards.
A large bulletin board is mounted on a wall here.  It glows with a faint
aura.

> look
Connection closed by foreign host.
[4]    Done                          ./autorun

THe only solution i found was removing the refrences ro history_pos in
comm.c.  This obviously isn't a good solution and i imigian it has
problems...

history_pos is initialized here:

    if (*tmp == '!' && !(*(tmp + 1)))   /* Redo last command. */
      strcpy(tmp, t->last_input);
    else if (*tmp == '!' && *(tmp + 1)) {
      char *commandln = (tmp + 1);
-->   int starting_pos = t->history_pos,
          cnt = (t->history_pos == 0 ? HISTORY_SIZE - 1 : t->history_pos - 1);

and crashes here:

    } else {
      strcpy(t->last_input, tmp);
-->   if (t->history[t->history_pos])
        free(t->history[t->history_pos]);       /* Clear the old line. */
      t->history[t->history_pos] = str_dup(tmp);        /* Save the new. */
      if (++t->history_pos >= HISTORY_SIZE)     /* Wrap to top. */
        t->history_pos = 0;
    }

Has anyone else encountered similar problems?


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST