Re: [msvc][heditv2] free_help bug

From: ;P (siv@CYBERENET.NET)
Date: 05/24/98

> I just installed heditv2 and ran into a small bug.  Whenever I try to save
> internally it calls an assert failure in DBGHEAP.C.  I traced the bug to
> the first free_help call in hedit_save_internally.  I then traced through
> free_help and heres what I found.

congrats..this is the first bug report i've had for hedit v2 (in fact,
you're the only person that i know of that is using it besides me)..

> void free_help(struct help_index_element *help)
> {
>   if (help->keywords)
>     free(help->keywords);  <--- this free works fine
>   if (help->entry)
>     free(help->entry);     <--- and so does this one
>   free(help);              <--- it asserts on this one
> }

ok..i think that the problem is that we are trying to free an element of
the help_table..change the 'free(help)' to:
memset(mess, 0, sizeof(struct help_index_element));

but this brings up another issue (i think) is my an
excerpt of my cleanup_olc:

void cleanup_olc(struct descriptor_data *d, byte cleanup_type)
    /*. Check for room . */
    if (OLC_ROOM(d)) {
      switch (cleanup_type) {
      case CLEANUP_ALL:
        break;                          <- get rid of this line
        /*. Caller has screwed up . */

ok..free_room frees all of the parts of the room, but not the actual room
pointer i don't think that the first break should be
there..that way when we abort editing a room, it'll free the OLC_ROOM as
well..i believe oasis v1.6b is like this..the same should be done for
hedit, qedit, and anything else that differentiates between a CLEANUP_ALL

i'm going to wait for confirmation (from george in particular since he is
probably most familiar with oasis), then i'll fix the patch, and upload
the new one..


     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/15/00 PST