Re: Latest DG script patch

From: Thomas Arp (t_arp@stofanet.dk)
Date: 07/15/02


From: "Artovil" <artovil@ARCANEREALMS.ORG>
> I tried this, and it works fine, but, now, if you try this:
> redit; s; x; q; n
> And then type redit, it crashes. At least in my mud.

I couldn't reproduce this one, but... (read on)

> A check for proto in redit_setup_existing() fixed that, as well as for
> adding a script, and then quitting. The script will be there, still, even
> though you selected not to save changes.  If you try the same thing but
> this time you remove the trigger, and choose not to save changes, it will
> crash the next time you open redit.
>
This one was a tough one... When exiting the script editor, the
old values for the script list was free()'d. This would be proper
behaviour if you wished to _keep_ the new list, because
redit_save_internally() updated the room to point to the right struct.
However, when you chose not to save your changes, the pointers pointed
straight at garbled memory.

It is fixed in pl8, which is progressing steadily after this bug was
squashed (I must've stared at this for _days_! - or so my calendar says).
The fix mainly consists of moving the freeing of memory to the
Xedit_save_internally() funcs, where we _know_ we want to lose the old
pointers.

> Or have I missed some lines in a patch somewhere?

Not yet :P  There'll be plenty to look at in the new patch, though.
ATM I have a 'changes' file of over 6k.

Welcor

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT