Welcome to the Builder Academy

Question Wierd crash - Need help to locate the problem from this GDB info

More
06 Apr 2018 18:57 - 06 Apr 2018 23:16 #7878 by JTP
Code:
(gdb) up #1 0x002e1b10 in raise () from /lib/libc.so.6 (gdb) up #2 0x002e3421 in abort () from /lib/libc.so.6 (gdb) up #3 0x080f30dd in char_from_room (ch=0xa82bc30) at handler.c:395 395 abort(); (gdb) up #4 0x080ca48d in do_mteleport (ch=0xa6c66d8, argument=0xbf89b7ad " }722 2311", cmd=0, subcmd=0) at dg_mobcmd.c:615 615 char_from_room(vict); (gdb) up #5 0x08105246 in script_command_interpreter (ch=0xa6c66d8, arg=0xbf89b7a4 "mteleport }722 2311") at interpreter.c:510 510 ((*mob_script_commands[i].command_pointer) (ch, line, 0, (gdb) up #6 0x080d604c in script_driver (go_adress=0xbf89ba68, trig=0xa6c68b0, type=0, mode=1) at dg_scripts.c:2670 2670 if (!script_command_interpreter((char_data *) go, cmd)) (gdb) up #7 0x080d6152 in trig_wait_event (event_obj=0xad84b70) at dg_scripts.c:757 757 script_driver(&go, trig, type, TRIG_RESTART); (gdb) up #8 0x080c827a in event_process () at dg_event.c:126 126 if ((new_time = (the_event->func)(the_event->event_obj)) > 0) (gdb) up #9 0x080b6531 in heartbeat (heart_pulse=393536) at comm.c:974 974 event_process(); (gdb) up #10 0x080b98c8 in game_loop (local_mother_desc=3) at comm.c:941 941 heartbeat(++pulse); (gdb) up #11 0x080bb487 in init_game (argc=Cannot access memory at address 0x46a ) at comm.c:536 536 game_loop(mother_desc); (gdb) up #12 main (argc=Cannot access memory at address 0x46a ) at comm.c:356 356 init_game(port);


What is happening ?

After reboot this was in file error from the time of the crash:
Apr 6 12:55:06 :: SYSERR: NULL character or NOWHERE in handler.c, char_from_room
Last edit: 06 Apr 2018 23:16 by JTP.

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

More
07 Apr 2018 13:47 #7879 by thomas
You can see it was "%teleport% %actor% 2311" that triggered it. (or vict instead of actor, or something)

And indeed - there is a check to make sure the game is in a consistent state when calling char_from_room():
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); } ...
We can see that ch wasn't null (it was ch=0xa82bc30).

So, whoever is being teleported was in NOWHERE when they were moved from the room.

This might happen if they just died, I think.

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

More
07 Apr 2018 13:53 #7880 by JTP
Usually that trigger has worked just fine...Any Way to prevent this from happening, so people can't be nowhere ?

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

More
07 Apr 2018 13:55 #7881 by JTP
Have had alot of teleport crashes 1+ years ago. Even went away from them for awhile.

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

More
07 Apr 2018 13:57 #7882 by thomas
Would you be willing to show us the trigger in question? There's really not a lot we can do to help you without it.

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

More
07 Apr 2018 14:02 #7883 by JTP
sure
Code:
Trigger Intended Assignment: Mobiles Trigger Type: Greet-All , Numeric Arg: 100, Arg list: None Commands: if %actor.class% != Thief wait 1 sec %send% %actor% %self.name% ... %echoaround% %actor% %self.name% ... %actor.name% ... wait 1 sec %asound% %actor.name% ... %teleport% %actor% 2311 %force% %actor% look else wait 1 sec emote ... say bla bla end

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

Time to create page: 0.193 seconds