Re: Latest DG script patch

From: Thomas Arp (
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

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


   | FAQ: |
   | Archives: |
   | Newbie List:   |

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