Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, Yahoo!, Bing

Members: 0
Guests: 10
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
614
BenitoVirg
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » AFKMud Bugfix List » AFKMud Bug Archive » [Bug] wipe_resets only works ...
Forum Rules | Mark all | Recent Posts

[Bug] wipe_resets only works properly once on an area, then it crashes
< Newer Topic :: Older Topic > AFKMud 1.63

Pages:<< prev 1 next >>
Post is unread #1 Mar 28, 2004, 2:19 pm   Last edited Nov 13, 2005, 12:17 pm by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Bug: wipe_resets would only work properly once on an area, then it would crash.
Discovered in: AFKMud 1.63
Danger: High - Crash bug.
Found by: Cynshard
Fixed by: Samson

resets.c, wipe_resets, replace with:

void wipe_resets( AREA_DATA *pArea, ROOM_INDEX_DATA *pRoom, sh_int map, sh_int x, sh_int y )
{
   RESET_DATA *pReset;

   for( pReset = pArea->first_reset; pReset; )
   {
      if( pReset->command != 'R' && is_room_reset( pReset, pRoom, pArea ) )
      {
         /* Resets always go forward, so we can safely use the previous reset,
            providing it exists, or first_reset if it doesnt.  -- Altrag */
         RESET_DATA *prev = pReset->prev;

         if( pRoom == NULL || ( pReset->arg4 == map && pReset->arg5 == x && pReset->arg6 == y ) )
            delete_reset( pArea, pReset );

         pReset = ( prev ? prev->next : pArea->first_reset );
   }
   else
      pReset = pReset->next;
   }
   return;
}


Me and Valgrind spent some quality time with this and I think we figured out the problem was the wipe_resets function itself was dirty. Very dirty. So I popped open my copy of Smaug FUSS and put back the old version, with the mods for overland support. Valgrind no longer complains about it and the resets are redone the way they should be.

Thanks to Cynshard for providing enough information to help track this one down. Hopefully this ends any trouble the resets were causing.
       
Pages:<< prev 1 next >>