[DG Scripts] Problem

From: Andy Hubbard (hub@LEICESTER.AC.UK)
Date: 01/07/98


Hi,

 A problem I am having at the moment is within the
script_save_to_file function when called from
medit_save_to_disk.
 The specifics ...
A mob with no triggers added can be edited and saved fine, triggers
can be added and the mob saves OK, but if you edit a mob with
triggers already there the mud crashes when you save.
Objects are fine.

gdb output ..

Program received signal SIGSEGV, Segmentation fault.
script_save_to_disk (fp=0x30418c0, item=0x3161604, type=0) at
dg_olc.c:110
(gdb) bt
#0  script_save_to_disk (fp=0x30418c0, item=0x3161604, type=0)
 at dg_olc.c:110
#1  0x47d376 in medit_save_to_disk (zone_num=3) at medit.c:553
#2  0x48a7b6 in do_olc (ch=0x339a404, argument=0x304b809 " save 10",
 cmd=185, subcmd=3) at olc.c:260
#3  0x4700ff in command_interpreter (ch=0x339a404, argument=0x304b804
 "medit save 10") at interpreter.c:802
#4  0x40219a in game_loop (mother_desc=3) at comm.c:694
#5  0x401627 in init_game (port=4000) at comm.c:280
#6  0x401483 in main (argc=1, argv=0x25cfa2c) at comm.c:249
#7  0x100063ba in dll_crt0_1 ()
#8  0x100063cb in dll_crt0 ()
#9  0x4b1001 in cygwin_crt0 ()

 All I can see is happening with some spurious debugging techniques
is that wierd numbers are passed to
 fprintf(fp,"T %d\n", t->vnum);
for the case of t->vnum.  Sometimes it is just the zone number, others
it is 128, 248 etc :(

Any input would be great to get this system fully sorted!
My fix for now will be to try to remove any T <vnum> entries from the
mob file before writing them in ...

Andy

http://winnt.cmht.le.ac.uk/ds/main.html
telnet://winnt.cmht.le.ac.uk:4000


     +------------------------------------------------------------+
     | 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