Page 1 of 1
[fixed in 9.7.24] ORA-01578 / ORA-01110 causes memory leak
Posted: Thu 21 Apr 2016 11:50
by pcz
Hello
When TOraQuery meets
ORA-01578: ORACLE data block corrupted
+
ORA-01113
there is always memory leak when closing application (ReportMemoryLeaksOnShutdown turned on)
Happens both in Blocking / NonBlocking mode
Tested with:
Delphi: XE7 Professional 21.0.17707.5020
App architecture: 32-bit Windows
OCI: Release 9.2.0.1.0 - Production
ODAC: 9.6.22 Professional
Size of leak remains the same after calling <TOraUery>.Open several times
Regards
P.C.
Re: ORA-01578 / ORA-01110 causes memory leak
Posted: Fri 22 Apr 2016 13:03
by pcz
Exactly the same leak happens in direct mode
Re: ORA-01578 / ORA-01110 causes memory leak
Posted: Tue 26 Apr 2016 11:05
by MaximG
We have investigated behavior of ODAC 9.6.22 and the latest version 9.7.23 on attempt to call damaged Oracle data blocks. Unfortunately, we couldn't detect a memory leak in this case. In our test, the Emp table was damaged, and the following console application hasn't found any issues :
Code: Select all
program OraBlockCorrupted;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils, DB, Ora;
var
OraSession: TOraSession;
Query: TOraQuery;
begin
ReportMemoryLeaksOnShutdown := True;
OraSession := TOraSession.Create(nil);
try
OraSession.ConnectString := '<your username>/<your password>@<SID>';
OraSession.Connect;
Query := TOraQuery.Create(Nil);
try
Query.Session := OraSession;
Query.SQL.Clear;
Query.SQL.Add('Select * From Emp');
Query.Open;
finally
Query.Free
end;
finally
OraSession.Free;
end;
end.
Please try to reproduce the issue using this application and let us know the result.
Re: ORA-01578 / ORA-01110 causes memory leak
Posted: Tue 26 Apr 2016 11:54
by pcz
I have to add line
before
because my bad block happens in some farther records
I have built code with 9.6.22 Pro and then downloaded 9.7.23 Pro, installed and recompiled again
Result is the same:
I fetch a plenty of data so application memory usage is ~1,5 GB when problem happens (yup, I know about 32-bit memory limitations but I didn't reach it)

Re: ORA-01578 / ORA-01110 causes memory leak
Posted: Thu 28 Apr 2016 12:17
by pcz
There is a positive trend
Same code compiled with ODAC 9.7.24 Pro
Direct & OCI give equal result:

Re: ORA-01578 / ORA-01110 causes memory leak
Posted: Thu 28 Apr 2016 12:46
by pcz
Oooh.... my stupidity

It's because lack of global
try..except block in console apps
So.... I wrapped it around existing code and it looks that problem is fixed - no more leaks both in direct and OCI mode
Thanks! 
Re: ORA-01578 / ORA-01110 causes memory leak
Posted: Thu 28 Apr 2016 13:35
by MaximG
Thank you for the information. We are glad you have localized the problem. The new ODAC build 9.7.24 (28-Apr-2016) is released. You can download ODAC 9.7.24 from
https://secure.devart.com .
Please don't hesitate to contact us with questions concerning ODAC usage.