Icon View Incident Report

Serious Serious
Reported By: Tony Pomfrett
Reported On: 11/9/2010
For: Version 4.30 Build 1
# 3336 Using Cached Updates Against Live Result Sets with Expression Fields Can Cause AV During Destruction

I have found a problem with DBISAM from about v4.28b6 onwards (problem exists in b6 but not b4 – I don’t have b5).

An access violation occurs when freeing DBISAM query components if the following is true:

1. RequestLive is True
2. The query had been cached
3. The query contains an assignment which adds a constant to a string field

The access violation occurs in unit dbisamlb at procedure DeAllocMem when the form containing the query component is closed.

Use the code below to reproduce the problem:

Run the application then close the form – an AV is thrown;

Remove any of the required conditions above (RequestLive, Cached or adding constant to string field) and there is no AV thrown.

procedure TForm1.FormCreate(Sender: TObject);
begin
   Q1.RequestLive := True;
   Q1.SQL.Clear;
   Q1.SQL.Add( ‘SELECT *,  LastName + 'xxx'  as CFullName  FROM Client’);
   Q1.Open;
   Q1.BeginCachedUpdates;
End;



Comments Comments
The problem was with the record buffer size for the cached updates cursor.


Resolution Resolution
Fixed Problem on 11/10/2010 in version 4.30 build 2


Products Affected Products Affected
DBISAM Additional Software and Utilities
DBISAM CLX Client-Server
DBISAM CLX Client-Server with Source
DBISAM CLX Standard
DBISAM CLX Standard with Source
DBISAM VCL Client-Server
DBISAM VCL Client-Server with Source
DBISAM VCL Standard
DBISAM VCL Standard with Source
DBISAM VCL Trial

Image