I have a problem with Delphi 7 and Firebird zeos final version 2.5 dated 4 October, when it will connect and open a table using ZQuery1 an error like the following picture:
Previously, I have long been using Zeos and firebird version I use 2.5 RC3. seek clarification from you all. Thanks
Problem with delphi 7, zeos 6.6.6 stable & Firbird 2.5 f
Moderators: gto, cipto_kh, EgonHugeist
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
Try using the most recent zeoslib 7 snapshots. There protocol FB 2.5 should be available.
http://zeosdownloads.firmos.at/downloads/snapshots/
Mark
http://zeosdownloads.firmos.at/downloads/snapshots/
Mark
is it possible fix this in 6.6.6?
i found that this bug reproduced only when using fbclient.dll v2.5
when i replaced to fbclient.dll v2.1 - (but server still stays 2.5) - all work fine
some code to reproduce:
zconnection1.protocol := 'firebird-2.1';
zconnection1.databasename := 'server:c\db.gdb';
zconnection1.connect;
zquery.sql.text := 'select * from table';
zquery.open;
zquery.sql.text := 'select * from anothertable'; // <--- AV
bug actually is very strange - looks like isc_dsql_free_statement in fbclient.dll v2.5 corrupting memory in some cases, if i change code to:
zquery.sql.text := 'select * from table';
zquery.open;
zquery.close; //<- change
zquery.sql.text := 'select * from anothertable'; // <--- no AV!
than all work fine.
after some debugging i found that:
destructor TZGenericCachedResolver.Destroy;
begin
FMetadata := nil; //<-- here calling isc_dsql_free_statement
FDatabaseMetadata := nil; //<-- here AV
after calling isc_dsql_free_statement object TZGenericCachedResolver - corrupted: Self variable - Innaccesible value, reading any property - AV, but before first line all was fine.
i found that this bug reproduced only when using fbclient.dll v2.5
when i replaced to fbclient.dll v2.1 - (but server still stays 2.5) - all work fine
some code to reproduce:
zconnection1.protocol := 'firebird-2.1';
zconnection1.databasename := 'server:c\db.gdb';
zconnection1.connect;
zquery.sql.text := 'select * from table';
zquery.open;
zquery.sql.text := 'select * from anothertable'; // <--- AV
bug actually is very strange - looks like isc_dsql_free_statement in fbclient.dll v2.5 corrupting memory in some cases, if i change code to:
zquery.sql.text := 'select * from table';
zquery.open;
zquery.close; //<- change
zquery.sql.text := 'select * from anothertable'; // <--- no AV!
than all work fine.
after some debugging i found that:
destructor TZGenericCachedResolver.Destroy;
begin
FMetadata := nil; //<-- here calling isc_dsql_free_statement
FDatabaseMetadata := nil; //<-- here AV
after calling isc_dsql_free_statement object TZGenericCachedResolver - corrupted: Self variable - Innaccesible value, reading any property - AV, but before first line all was fine.