Page 1 of 1

Inifinite loop on TOraSession.Destroy

Posted: Tue 24 Mar 2009 13:42
by Traptak
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

Posted: Wed 25 Mar 2009 09:14
by Plash
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).

Posted: Wed 25 Mar 2009 12:19
by Traptak
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