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, Google, Bing

Members: 0
Guests: 16
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] Random crashes during c...
Forum Rules | Mark all | Recent Posts

[Bug] Random crashes during chargen and when RISA flags are changed
< Newer Topic :: Older Topic > AFKMud 1.75

Pages:<< prev 1 next >>
Post is unread #1 Sep 9, 2005, 9:22 pm   Last edited Nov 13, 2005, 11:03 am 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: Random crashes during chargen and when RISA flags are changed on players
Discovered in: AFKMud 1.75
Danger: Critical - Crash probability + Data corruption
Found by: Remcon
Fixed by: Samson

---

mud.h

In struct class_type, locate:
   int resist;
   int suscept;


Change to:
   EXT_BV resist;
   EXT_BV suscept;


In struct race_type, locate:
   int resist; /* Bugfix: Samson 5-7-99 */
   int suscept;   /* Bugfix: Samson 5-7-99 */


Change to:
   EXT_BV resist; /* Bugfix: Samson 5-7-99, and again on 9/9/05 */
   EXT_BV suscept;   /* Bugfix: Samson 5-7-99, and again on 9/9/05 */


tables.c, load_race_file

Locate:
         case 'R':
            KEY( "Race", ra, fread_number( fp ) );
            KEY( "Resist", race->resist, fread_number( fp ) );
            break;

         case 'S':
            KEY( "Str_Plus", race->str_plus, fread_number( fp ) );
            KEY( "Suscept", race->suscept, fread_number( fp ) );


Change to:
         case 'R':
            KEY( "Race", ra, fread_number( fp ) );
            KEY( "Resist", race->resist, fread_bitvector( fp ) );
            break;

         case 'S':
            KEY( "Str_Plus", race->str_plus, fread_number( fp ) );
            KEY( "Suscept", race->suscept, fread_bitvector( fp ) );


tables.c, write_race_file

Locate:
   fprintf( fpout, "Resist      %d\n", race->resist );
   fprintf( fpout, "Suscept     %d\n", race->suscept );


Change to:
   fprintf( fpout, "Resist      %s\n", print_bitvector( &race->resist ) );
   fprintf( fpout, "Suscept     %s\n", print_bitvector( &race->suscept ) );


tables.c, load_class_file

Locate:
         case 'R':
            KEY( "Resist", Class->resist, fread_number( fp ) );
            break;


Change to:
         case 'R':
            KEY( "Resist", Class->resist, fread_bitvector( fp ) );
            break;


Locate:
            KEY( "Suscept", Class->suscept, fread_number( fp ) );


Change to:
            KEY( "Suscept", Class->suscept, fread_bitvector( fp ) );


tables.c, write_class_file

Locate:
   fprintf( fpout, "Resist	 %d\n", Class->resist );
   fprintf( fpout, "Suscept	 %d\n", Class->suscept );


Change to:
   fprintf( fpout, "Resist	 %s\n", print_bitvector( &Class->resist ) );
   fprintf( fpout, "Suscept	 %s\n", print_bitvector( &Class->suscept ) );


The mismatch in code between the class, race, and pc/mob structs is very wide ranging and can conceivably be responsible for a whole bunch of strange crashes, corruptions, wrong flags on things, and other general disruptions that are ordinarily very hard to pin down even with a debugger's aid. These values are factored in to a number of other systems. Fixing this will probably fix a ton of other bugs you didn't even know you had yet.
       
Pages:<< prev 1 next >>