Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Vladaar, Yandex, Bing, Google

Members: 1
Guests: 6
Stats
Files
Topics
Posts
Members
Newest Member
481
3,734
19,366
618
Micheal64X
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,643
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 >>