Icon View Incident Report

Serious Serious
Reported By: Frank Roloff [Next GmbH]
Reported On: 11/27/2011
For: Version 4.31 Build 2
# 3515 Delphi XE2 Versions of DBISAM Experiencing AV with Query Execution

After migrating an older project from Delphi XE to XE2 I am always getting the following exeption:

access violation at 0x00000004: read of address 0x00000004'. Prozess TimeTicket.exe (1148)

Using the same component versions and code I am NOT getting this exception in Delphi XE. I posted the error location and near code below.

var
  Q: TDBISAMQuery;
begin
  Q := TDBISAMQuery.Create(Database);
  try
    try
      Q.SessionName  := Database.SessionName;
      Q.DatabaseName := Database.DatabaseName;
      Q.SQL.Add('select count("' + Field + '") as FldCount from ' + Table);
      if Where <> '' then
        Q.SQL.Add(' where ' + Where + ';');

      Q.Open;   <<-- EXCEPTION OCCURS HERE!
      if Q.FieldByName('FldCount').IsNull then
        Result := 0
      else
        Result := Q.FieldByName('FldCount').Value;
      Q.Close;
    except
      Result := 0;
      end;
  finally
    Q.Free;
    end;



Comments Comments
The problem was with the way an internal structure was being copied in XE2. The code was ifdef'ed for XE or lower vs. XE2, which is why it didn't occur with older versions. This bug was present in both 32-bit and 64-bit builds.


Resolution Resolution
Fixed Problem on 11/28/2011 in version 4.31 build 3


Products Affected Products Affected
DBISAM VCL Client-Server
DBISAM VCL Client-Server with Source
DBISAM VCL Standard
DBISAM VCL Standard with Source
DBISAM VCL Trial

Image