Print Thread
Page 1 of 3 1 2 3
Temporary TLOBLocator Free - Exception
#6476 06/28/04 05:44 PM
Joined: Feb 2001
Posts: 15
C
ChrisG Offline OP
Member
OP Offline
Member
C
Joined: Feb 2001
Posts: 15
Hi

I'm experiencing problems when freeing a temporary TLobLocator at certain times.

My TOracleQuery calls a stored proc which has a CLOB parameter for saving data. The stored proc then calls another stored proc and passes the CLOB parameter through.

It would appear that when the parameter in the second stored proc is declared as a CLOB, an exception is generated in Delphi when I come to free the temporary TLobLocator.

If the second stored proc uses a long parameter, there is no problem. However, we really need it to be a CLOB because of the amount of data we are sending.

Can you please help?

(Using DOA 4.0.3)

Many thanks
Chris

Re: Temporary TLOBLocator Free - Exception
#6477 06/28/04 09:31 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
What exactly is the exception message?


Marco Kalter
Allround Automations
Re: Temporary TLOBLocator Free - Exception
#6478 06/29/04 02:37 PM
Joined: Feb 2001
Posts: 15
C
ChrisG Offline OP
Member
OP Offline
Member
C
Joined: Feb 2001
Posts: 15
It's very strange. There is an exception, it is captured by the exception handler, however there is NO message. (i.e. E.message="")

Re: Temporary TLOBLocator Free - Exception
#6479 06/29/04 02:55 PM
Joined: Feb 2001
Posts: 15
C
ChrisG Offline OP
Member
OP Offline
Member
C
Joined: Feb 2001
Posts: 15
1. Have downloaded DOA 4.0.5 - Same problem occurs.

2. Although exception message is blank, if I use EOracleError the exception numbers raised are:-
32550540, 33070844, 32554684, 32553312
If I "unload" my delphi app from IIS and try again I get the same sequence of error numbers(!)

Re: Temporary TLOBLocator Free - Exception
#6480 06/29/04 09:42 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
These numbers don't seem right. What is the Exception class (EOracleError or something else)?


Marco Kalter
Allround Automations
Re: Temporary TLOBLocator Free - Exception
#6481 06/30/04 02:51 PM
Joined: Feb 2001
Posts: 15
C
ChrisG Offline OP
Member
OP Offline
Member
C
Joined: Feb 2001
Posts: 15
Here is my code:

try
myCLOB.Free;
except
on E: EOracleError do
begin
LogAction('Save Dealer Exception - Unable to free Temporary CLOB'+#13#10+
'mess='+e.Message+' num='+FloatToStr(E.ErrorCode));
end;
end;

and here is an extract from my log file:

29/06/2004 10:42:57 Save Dealer Exception - Unable to free Temporary CLOB
mess= num=32550540
29/06/2004 10:42:58 Save Dealer Exception - Unable to free Temporary CLOB
mess= num=33070844
29/06/2004 10:43:17 Save Dealer Exception - Unable to free Temporary CLOB
mess= num=32554684
29/06/2004 10:43:18 Save Dealer Exception - Unable to free Temporary CLOB
mess= num=32553312

If the exception was not an EOracleError surely this handler will not capture the exception(?)

Re: Temporary TLOBLocator Free - Exception
#6482 06/30/04 10:38 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
It is indeed an EOracleError. The bogus error code makes me wonder if the session is still connected at this time. Can you verify this?


Marco Kalter
Allround Automations
Re: Temporary TLOBLocator Free - Exception
#6483 07/01/04 05:50 PM
Joined: Feb 2001
Posts: 15
C
ChrisG Offline OP
Member
OP Offline
Member
C
Joined: Feb 2001
Posts: 15
Yes. The TOracleQuery.Session.Connected property is still true at this point.

Re: Temporary TLOBLocator Free - Exception
#6484 07/01/04 08:19 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
Okay. Can you send me a little demo project that reproduces the issue?


Marco Kalter
Allround Automations
Re: Temporary TLOBLocator Free - Exception
#6485 07/02/04 02:04 PM
Joined: Feb 2001
Posts: 15
C
ChrisG Offline OP
Member
OP Offline
Member
C
Joined: Feb 2001
Posts: 15
Demo project and stored procs sent as requested.

To summarise: Delphi would appear to be unable to free the temporary LOB, only when all the following are true:-
1) OracleQuery calls a stored proc which calls another
2) Both stored procs have a CLOB input parameter
3) Both stored procs evaluate the CLOB as XML

I eagerly await your comments.

Re: Temporary TLOBLocator Free - Exception
#6486 07/05/04 07:28 PM
Joined: Feb 2001
Posts: 15
C
ChrisG Offline OP
Member
OP Offline
Member
C
Joined: Feb 2001
Posts: 15
Hi Marco. Hope you received my demo project ok.

Any ideas?

Thanks
Christopher

Re: Temporary TLOBLocator Free - Exception
#6487 07/05/04 09:48 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
I did receive it, but have not yet been able to reproduce the problem. The program runs successfully. I will try it on some other configurations.

Can you let me know your client and server version?


Marco Kalter
Allround Automations
Re: Temporary TLOBLocator Free - Exception
#6488 07/06/04 03:14 AM
Joined: Feb 2001
Posts: 15
C
ChrisG Offline OP
Member
OP Offline
Member
C
Joined: Feb 2001
Posts: 15
Hello Marco, thanks for the feedback.

I'm using Delphi 5 with DOA 4.0.5
Oracle server version 9.2.0.4.0
Oracle client version 9.2.0.1.0
All on Windows NT 4 platform.

Re: Temporary TLOBLocator Free - Exception
#6489 07/06/04 10:25 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
Okay, I will try a similar configuration.


Marco Kalter
Allround Automations
Re: Temporary TLOBLocator Free - Exception
#6490 07/09/04 12:40 PM
Joined: Feb 2001
Posts: 15
C
ChrisG Offline OP
Member
OP Offline
Member
C
Joined: Feb 2001
Posts: 15
Hi Marco. Any update?

Re: Temporary TLOBLocator Free - Exception
#6491 07/09/04 07:48 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
No luck yet.


Marco Kalter
Allround Automations
Re: Temporary TLOBLocator Free - Exception
#6492 07/14/04 06:02 PM
Joined: Feb 2001
Posts: 15
C
ChrisG Offline OP
Member
OP Offline
Member
C
Joined: Feb 2001
Posts: 15
Marco
Can you let me know what configuration you used that works okay?
This may help us.
Regards
Christopher

Re: Temporary TLOBLocator Free - Exception
#6493 07/14/04 10:00 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
I have successfully tested it on a 9.0 and 10g server, but I have been able to reproduce it on a 9.2.0.4 server. I actually get an ORA-22922 error (nonexistent LOB value). This happens when the LOB Locator is freed. The only workaround I can think of at the moment is to ignore the error in TLOBLocator.Free.


Marco Kalter
Allround Automations
Re: Temporary TLOBLocator Free - Exception
#6494 07/15/04 01:08 PM
Joined: Feb 2001
Posts: 15
C
ChrisG Offline OP
Member
OP Offline
Member
C
Joined: Feb 2001
Posts: 15
Thanks Marco.

We hope to upgrade to 9.2.0.5 soon. Have you tried that version?

If it is specific to certain Oracle versions, maybe that will solve it.

However, if it is an Oracle bug, I am unsure how to raise this with Oracle, as I cannot see a way to reproduce the error without using DOA.

I am currently using that work around. However, our application is an IIS app, and it appears to be leaking memory. This problem seems to be prime candidate.

Any further suggestions welcome.

Regards
Christopher

Re: Temporary TLOBLocator Free - Exception
#6495 07/15/04 07:55 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
I have not tried 9.2.0.5, but I will give that a try too.

The error will most likely cause a memory leak, since the OCI handle for the LOB Locator is not freed.


Marco Kalter
Allround Automations
Re: Temporary TLOBLocator Free - Exception
#6496 08/05/04 05:46 PM
Joined: Feb 2001
Posts: 15
C
ChrisG Offline OP
Member
OP Offline
Member
C
Joined: Feb 2001
Posts: 15
Marco

I've now tried against a 9.2.0.5 server, and the problem is still present.
We are still having to unload our IIS application at regular intervals to combat the memory leak.

Any further suggestions welcome.

Regards
Christopher

Re: Temporary TLOBLocator Free - Exception
#6497 09/08/04 02:23 PM
Joined: Feb 2001
Posts: 15
C
ChrisG Offline OP
Member
OP Offline
Member
C
Joined: Feb 2001
Posts: 15
Marco

Has there been any update on this?

Regards
Christopher

Re: Temporary TLOBLocator Free - Exception
#6498 09/08/04 10:20 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
Unfortunately not. Freeing the handle on 9.2 causes an exception, not freeing it causes a memory leak. We have not been able to find a workaround (other than downgrading or upgrading Oracle).


Marco Kalter
Allround Automations
Re: Temporary TLOBLocator Free - Exception
#6499 09/21/04 04:16 PM
Joined: Feb 2001
Posts: 15
C
ChrisG Offline OP
Member
OP Offline
Member
C
Joined: Feb 2001
Posts: 15
Marco

If this is an Oracle Bug, can you provide details of the bug so we can chase this matter with Oracle please?

Many thanks
Christopher

Re: Temporary TLOBLocator Free - Exception
#6500 09/21/04 09:57 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
I cannot find a specific bug that matches this problem. There are more than 50 Oralce bugs logged against temporary LOB's though.


Marco Kalter
Allround Automations
Page 1 of 3 1 2 3

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.035s Queries: 14 (0.010s) Memory: 2.6265 MB (Peak: 3.0380 MB) Data Comp: Off Server Time: 2024-05-05 21:01:07 UTC
Valid HTML 5 and Valid CSS