Inifinite loop on TOraSession.Destroy

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Traptak
Posts: 26
Joined: Fri 29 Jun 2007 07:15

Inifinite loop on TOraSession.Destroy

Post by Traptak » Tue 24 Mar 2009 13:42

I have an infinite loop while freeing TOraSession object. How to get this:

// Class declaration - FOraProc has some Session property
// which is set in design time
FOraProc: TOraStoredProc;

code:
var
tempSession: ToraSession;
begin
tempSession := FOraProc.Session;
FOraProc.Session := anotherSession;
FOraProc.PrepareSQL;
FOraProc.ExecProc;
FOraProc.Session := tempSession;
end;

after that in TCustomDAConnection.ClearRefs on
while FSQLs.Count > 0 do
TCustomDASQL(FSQLs[0]).Connection := nil;
application go into infinite loop.
It is because FOraProc.FCommand is still registered on FSQLs list and cannot be removed because UsedConnection retrieve another TOraSession object (tempSession). So FOraProc.FCommand is removed from that FSQLs list.

I'm using ODAC 6.50.0.39 and Delphi 2007 Pro

best regards
Adam Siwon

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 25 Mar 2009 09:14

We cannot reproduce the problem. Please send to odac*devart*com a complete small sample that demonstrates the problem, including the script for creating database objects.

You can try also the latest ODAC build (6.70.0.45).

Traptak
Posts: 26
Joined: Fri 29 Jun 2007 07:15

Post by Traptak » Wed 25 Mar 2009 12:19

You can try also the latest ODAC build (6.70.0.45).

My subscription is out of date. 8) I will try to prepare demoapp.

best regards
Adam Siwon

Post Reply