Crash in Stock code

  • JTP
  • Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
1 year 2 months ago #6662 by JTP
Crash in Stock code was created by JTP
A few hours ago i had a crash. See the attached pic.
It refers to Stock code in handler.c

Any idea on a fix ?
/* move a player out of a room */
void char_from_room(struct char_data *ch)
  struct char_data *temp;

  if (ch == NULL || IN_ROOM(ch) == NOWHERE) {
    log("SYSERR: NULL character or NOWHERE in %s, char_from_room", __FILE__);

  if (FIGHTING(ch) != NULL)


  if (GET_EQ(ch, WEAR_LIGHT) != NULL)
      if (GET_OBJ_VAL(GET_EQ(ch, WEAR_LIGHT), 2))	/* Light is ON */

  REMOVE_FROM_LIST(ch, world[IN_ROOM(ch)].people, next_in_room);
  ch->next_in_room = NULL;

Please Log in or Create an account to join the conversation.

1 year 2 months ago - 1 year 2 months ago #6663 by Krell
Replied by Krell on topic Crash in Stock code
What other functions pass *ch as an argument to the function char_from_room? Do you know which command was used just before the mud crashed? That might give you a clue.
$ grep -Rn char_from_room *.c | more
act.movement.c:283:  char_from_room(ch);
act.movement.c:296:    char_from_room(ch);
act.movement.c:324:    char_from_room(ch);
act.wizard.c:227:  char_from_room(ch);
act.wizard.c:233:    char_from_room(ch);
act.wizard.c:254:  char_from_room(ch);
act.wizard.c:284:      char_from_room(victim);
act.wizard.c:304:       char_from_room(victim);
act.wizard.c:336:    char_from_room(victim);
act.wizard.c:3174:        char_from_room(vict);
comm.c:884:         char_from_room(d->character);
dg_mobcmd.c:515:    char_from_room(ch);
dg_mobcmd.c:547:    char_from_room(ch);
dg_mobcmd.c:553:        char_from_room(ch);
dg_mobcmd.c:598:        char_from_room(vict);
dg_mobcmd.c:615:      char_from_room(vict);
dg_objcmd.c:419:            char_from_room(ch);
dg_objcmd.c:429:            char_from_room(ch);
dg_wldcmd.c:310:            char_from_room(ch);
dg_wldcmd.c:320:            char_from_room(ch);
fight.c:721:      char_from_room(victim);
genwld.c:162:    char_from_room(ppl);
handler.c:368:void char_from_room(struct char_data *ch)
handler.c:373:    log("SYSERR: NULL character or NOWHERE in %s, char_from_room", __FILE__);
handler.c:966:  char_from_room(ch);
interpreter.c:1115:      char_from_room(ch);
limits.c:351:      char_from_room(ch);
limits.c:355:   char_from_room(ch);
spells.c:68:  char_from_room(victim);
spells.c:97:  char_from_room(victim);
spells.c:152:  char_from_room(victim);
Last edit: 1 year 2 months ago by Krell.

Please Log in or Create an account to join the conversation.

Time to create page: 1.703 seconds