Welcome to the Builder Academy

Question Puzzled by Crash with Teleporter Object

More
14 Nov 2012 05:27 #1045 by zusuk
I posted the core dump in case anyone off the top of their heads has a clue why the teleporter object that newbies start with sometimes crashes the MUD.

Code:
luminari@luminarimud.com [~/luminari]# gdb bin/circle lib/core.tmp.32362 GNU gdb (GDB) CentOS (7.0.1-42.el5.centos.1) Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /home/luminari/luminari/bin/circle...done. [New Thread 32362] Reading symbols from /lib/libcrypt.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libcrypt.so.1 Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/ld-linux.so.2 Core was generated by `bin/circle -q 4100'. Program terminated with signal 11, Segmentation fault. #0 0x080d9343 in sub_write (arg=0xbf8f1985 "Dyanangam recalls.", ch=0xa5b8e60, find_invis=1 '\001', targets=<value optimized out>) at dg_comm.c:184 184 for (to = world[IN_ROOM(ch)].people; to; to = to->next_in_room) (gdb) list 179 180 if (IS_SET(targets, TO_CHAR) && SENDOK(ch)) 181 sub_write_to_char(ch, tokens, otokens, type); 182 183 if (IS_SET(targets, TO_ROOM)) 184 for (to = world[IN_ROOM(ch)].people; to; to = to->next_in_room) 185 if (to != ch && SENDOK(to)) 186 sub_write_to_char(to, tokens, otokens, type); 187 } 188 (gdb) up #1 0x080dec91 in do_osend (obj=0xa54b488, argument=0xbf8f197f " }91 Dyanangam recalls.", cmd=6, subcmd=1) at dg_objcmd.c:249 249 sub_write(msg, ch, TRUE, TO_ROOM); (gdb) list 244 if ((ch = get_char_by_obj(obj, buf))) 245 { 246 if (subcmd == SCMD_OSEND) 247 sub_write(msg, ch, TRUE, TO_CHAR); 248 else if (subcmd == SCMD_OECHOAROUND) 249 sub_write(msg, ch, TRUE, TO_ROOM); 250 } 251 252 else 253 obj_log(obj, "no target found for osend"); (gdb) up #2 0x080dee58 in obj_command_interpreter (obj=0xa54b488, argument=0xbf8f1974 "oechoaround }91 Dyanangam recalls.") at dg_objcmd.c:835 835 ((*obj_cmd_info[cmd].command_pointer) (gdb) list 830 break; 831 832 if (*obj_cmd_info[cmd].command == '\n') 833 obj_log(obj, "Unknown object cmd: '%s'", argument); 834 else 835 ((*obj_cmd_info[cmd].command_pointer) 836 (obj, line, cmd, obj_cmd_info[cmd].subcmd)); 837 } (gdb) up #3 0x080e7e94 in script_driver (go_adress=0xbf8f1e40, trig=0xa532750, type=1, mode=0) at dg_scripts.c:2677 2677 obj_command_interpreter((obj_data *) go, cmd); (gdb) list 2672 case MOB_TRIGGER: 2673 if (!script_command_interpreter((char_data *) go, cmd)) 2674 command_interpreter((char_data *) go, cmd); 2675 break; 2676 case OBJ_TRIGGER: 2677 obj_command_interpreter((obj_data *) go, cmd); 2678 break; 2679 case WLD_TRIGGER: 2680 wld_command_interpreter((struct room_data *) go, cmd); 2681 break; (gdb) up #4 0x080ebaeb in cmd_otrig (obj=0xa54b488, actor=0xa3a28b8, cmd=0xbf8f1e9c "recall", argument=0xbf8f875a "", type=2) at dg_triggers.c:718 718 if (script_driver(&obj, t, OBJ_TRIGGER, TRIG_NEW)) (gdb) list 713 skip_spaces(&argument); 714 add_var(&GET_TRIG_VARS(t), "arg", argument, 0); 715 skip_spaces(&cmd); 716 add_var(&GET_TRIG_VARS(t), "cmd", cmd, 0); 717 718 if (script_driver(&obj, t, OBJ_TRIGGER, TRIG_NEW)) 719 return 1; 720 } 721 } 722 (gdb) up #5 0x080ebbf0 in command_otrigger (actor=0xa3a28b8, cmd=0xbf8f1e9c "recall", argument=0xbf8f875a "") at dg_triggers.c:741 741 if (cmd_otrig(obj, actor, cmd, argument, OCMD_INVEN)) (gdb) list 736 if (GET_EQ(actor, i)) 737 if (cmd_otrig(GET_EQ(actor, i), actor, cmd, argument, OCMD_EQUIP)) 738 return 1; 739 740 for (obj = actor->carrying; obj; obj = obj->next_content) 741 if (cmd_otrig(obj, actor, cmd, argument, OCMD_INVEN)) 742 return 1; 743 744 for (obj = world[IN_ROOM(actor)].contents; obj; obj = obj->next_content) 745 if (cmd_otrig(obj, actor, cmd, argument, OCMD_ROOM)) (gdb) up #6 0x0811e688 in command_interpreter (ch=0xa3a28b8, argument=0xbf8f8754 "recall") at interpreter.c:561 561 if (!cont) cont = command_otrigger(ch, arg, line); /* any object triggers ? */ (gdb) list 556 * here has been removed. Otherwise, find the command. */ 557 { 558 int cont; /* continue the command checks */ 559 cont = command_wtrigger(ch, arg, line); /* any world triggers ? */ 560 if (!cont) cont = command_mtrigger(ch, arg, line); /* any mobile triggers ? */ 561 if (!cont) cont = command_otrigger(ch, arg, line); /* any object triggers ? */ 562 if (cont) return; /* yes, command trigger took over */ 563 } 564 565 /* Allow IMPLs to switch into mobs to test the commands. */ (gdb) up #7 0x080c7987 in game_loop (local_mother_desc=3) at comm.c:891 891 command_interpreter(d->character, comm); /* Send it to interpreter */ (gdb) list 886 else { /* else: we're playing normally. */ 887 if (aliased) /* To prevent recursive aliases. */ 888 d->has_prompt = TRUE; /* To get newline before next cmd output. */ 889 else if (perform_alias(d, comm, sizeof(comm))) /* Run it through aliasing system */ 890 get_from_q(&d->input, comm, &aliased); 891 command_interpreter(d->character, comm); /* Send it to interpreter */ 892 } 893 } 894 895 /* Send queued output out to the operating system (ultimately to user). */ (gdb) up #8 0x080c8df7 in init_game (argc=Cannot access memory at address 0x5b ) at comm.c:535 535 game_loop(mother_desc); (gdb) list 530 if (fCopyOver) /* reload players */ 531 copyover_recover(); 532 533 log("Entering game loop."); 534 535 game_loop(mother_desc); 536 537 Crash_save_all(); 538 539 log("Closing all sockets."); (gdb) up #9 main (argc=Cannot access memory at address 0x5b ) at comm.c:354 354 init_game(port); (gdb) list 349 350 if (scheck) 351 boot_world(); 352 else { 353 log("Running game on port %d.", port); 354 init_game(port); 355 } 356 357 log("Clearing game world."); 358 destroy_db(); (gdb) up Initial frame selected; you cannot go up. (gdb)

Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100

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

More
15 Nov 2012 01:17 - 15 Nov 2012 01:17 #1059 by Rumble
Odd, looks like it crashed on the recall trigger 3015. Does room 3001 exist?

Rumble
The Builder Academy
tbamud.com 9091
rumble@tbamud.com
Last edit: 15 Nov 2012 01:17 by Rumble.

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

More
15 Nov 2012 06:20 #1061 by zusuk
Yeah... really strange huh?

It happened 3 times total (in like players using teleporters all day long) and hasn't happened since :P So I'm pretty clueless what is going on

Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100

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

More
15 Nov 2012 22:13 #1064 by thomas
It's crashing at this line:

for (to = world[IN_ROOM(ch)].people; to; to = to->next_in_room)

Several things can be going bad here:
IN_ROOM(ch) > max_room (ie. NOWHERE)
world[x].people is corrupted
world[x].people contains a free()'d char structure


I'd guess it's because of the first reason if it only happened a couple of times.
The other reasons would give other errors as well.

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

Time to create page: 0.181 seconds