Welcome to the Builder Academy

Question Crash in Stock code

More
26 Apr 2017 22:04 #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 ?
Code:
/* 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__); exit(1); } if (FIGHTING(ch) != NULL) stop_fighting(ch); char_from_furniture(ch); if (GET_EQ(ch, WEAR_LIGHT) != NULL) if (GET_OBJ_TYPE(GET_EQ(ch, WEAR_LIGHT)) == ITEM_LIGHT) if (GET_OBJ_VAL(GET_EQ(ch, WEAR_LIGHT), 2)) /* Light is ON */ world[IN_ROOM(ch)].light--; REMOVE_FROM_LIST(ch, world[IN_ROOM(ch)].people, next_in_room); IN_ROOM(ch) = NOWHERE; ch->next_in_room = NULL; }
Attachments:

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

More
27 Apr 2017 01:26 - 27 Apr 2017 01:52 #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.
Code:
$ 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: 27 Apr 2017 01:52 by krell.

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

Time to create page: 0.225 seconds