Icon View Incident Report

Serious Serious
Reported By: Jim Gallagher
Reported On: 5/11/1999
For: Version 1.13 Build 1
# 425 Problem with AV When Randomly Inserting Many Records Into In-Memory Table Opened Exclusively

Adding 20,000 records randomly causes an AV with in-memory tables that are opened exclusively.

   DBISAMTable1.Active := False;
   DBISAMTable1.Exclusive := True;
   DBISAMTable1.DatabaseName := '';
   DBISAMTable1.InMemory := True;
   DBISAMTable1.TableName := 'UDBISAM.DAT';
   DBISAMTable1.FieldDefs.Clear;
   DBISAMTable1.FieldDefs.Add('UNDUPVALUE', ftString, 25, True);
   DBISAMTable1.IndexDefs.Clear;
   DBISAMTable1.IndexDefs.Add('', 'UNDUPVALUE', [ixPrimary]);
   DBISAMTable1.CreateTable;
   DBISAMTable1.Active := True;

   Label4.Caption := TimeToStr(Time);
   try
   for i := 0 to 15 do
   begin
      DBISAMTable1.EmptyTable;
      RecordsWritten := 0;
      DupCount := 0;
      while (RecordsWritten < 10000) do
      begin
         Application.ProcessMessages;
         Label3.Caption := IntToStr(RecordsWritten);
         FieldString := IntToStr(Random(20000));
         try
         if (DBISAMTable1.Locate('UNDUPVALUE',FieldString,[])) then
         begin
            Inc(DupCount);
         end
         else
         begin
            Inc(RecordsWritten);
            DBISAMTable1.Insert;
            DBISAMTable1.FieldByName('UNDUPVALUE').AsString := FieldString;
            DBISAMTable1.Post;
         end;
         except
            ShowMessage('Except value = ' + FieldString);
            RecordsWritten := 10000;
         end;
      end;
   end;
   finally
   DBISAMTable1.Close;
   DBISAMTable1.DeleteTable;
   end;
   Label5.Caption := TimeToStr(Time);
   ShowMessage('Done dupcount = ' + IntToStr(DupCount));



Comments Comments
Problem was with the in-memory tables not handling seeks past the end of file properly.


Resolution Resolution
Fixed Problem on 5/25/1999 in version 1.14 build 1
Image