Print Thread
OracleSessionPool, AV while destroying datamodule
#5768 12/03/03 10:04 PM
Joined: Jul 2003
Posts: 112
Fino Mornasco, Como, Italy
L
Member
OP Offline
Member
L
Joined: Jul 2003
Posts: 112
Fino Mornasco, Como, Italy
I am getting AVs while destroying a datamodule with a session pool component on it - it started giving me AVs when I added the pool. Is there any issue to be aware of while destroying a pool - i.e. or session must be logged out - ?


LDS
Re: OracleSessionPool, AV while destroying datamodule
#5769 12/03/03 10:30 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
I'm not aware of any problem. When a session pool is destroyed, it will disconnect all sessions that are connected through the pool.

If you have a little project that reproduces this, please send it to me.


Marco Kalter
Allround Automations
Re: OracleSessionPool, AV while destroying datamodule
#5770 12/04/03 07:16 PM
Joined: Jul 2003
Posts: 112
Fino Mornasco, Como, Italy
L
Member
OP Offline
Member
L
Joined: Jul 2003
Posts: 112
Fino Mornasco, Como, Italy
I will try to reproduce it in a small test case, by now I found - looking at the CPU window - that the AV occurs in TOracleSessionPool.Release, I think when it calls TOracleSessionPool.GetEntry, but looking at machine code is a bit difficult to undertand why.


LDS
Re: OracleSessionPool, AV while destroying datamodule
#5771 03/08/04 03:53 PM
Joined: Jul 2003
Posts: 112
Fino Mornasco, Como, Italy
L
Member
OP Offline
Member
L
Joined: Jul 2003
Posts: 112
Fino Mornasco, Como, Italy
I have additional infos, it looks to be a strange bug.

I was trying to parse an XML file (which holds a "master" and "detail" records") and write it to a database. First I tried using Datasmap and XMLTransforms, then did it manually because the XML transformations have problems with more than one nested dataset.

I wrote something like this to process XML subnodes (mapping them to detail tables):

Code
SubNode := MailNode.ChildNodes.FindNode('ATTACHMENTS');
if (SubNode <> nil) and SubNode.HasChildNodes then
begin
  for j := 0 to SubNode.ChildNodes.Count -1 do
  begin
    dsAttachments.Insert;
    dsAttachmentsCONTENT_TYPE.AsVariant := SubNode.ChildNodes[j]['CONTENT_TYPE'];
    dsAttachmentsFILENAME.AsVariant := SubNode.ChildNodes[j]['FILE'];
    dsAttachmentsELEMENT_ID.AsVariant := SubNode.ChildNodes[j]['ELEMENT_ID'];
    dsAttachments.Post;
  end;
end;
I was using TOracleDataset because I used them before with Datasnap, they were set for a M/D relationship therefore I relied on them to generate PKs (using sequences) and FKs (using the M/D relationship).

I discovered that sometimes - not always - when calling Post an "Index list out of bound (-2)" exception was raised, and from now on attempting to close the TOracleSession used by that dataset would result in an AV.

When I got rid of all the dataset and rewrote it to use plain TOracleQuery components, the error disappeared. Yet I wonder why it appeared, because the logic it's the same, the difference is now I don't rely on components to generate and set PKs and FKs but do it myself in code.


LDS
Re: OracleSessionPool, AV while destroying datamodule
#5772 03/08/04 11:07 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
Do you know where the "list index out of bounds" occurred? Was it is your own code or in a Direct Oracle Access unit?


Marco Kalter
Allround Automations
Re: OracleSessionPool, AV while destroying datamodule
#5773 03/22/04 08:55 PM
Joined: Jul 2003
Posts: 112
Fino Mornasco, Como, Italy
L
Member
OP Offline
Member
L
Joined: Jul 2003
Posts: 112
Fino Mornasco, Como, Italy
The exception is raised when I call TOracleDataset.Post, and it looks to happen in DOA code, but I do not have the sources thus I can't check where it really happens. NOw I rewrote everything to avoid this error, but I could get the old code from CVS and send to you.


LDS
Re: OracleSessionPool, AV while destroying datamodule
#5774 03/23/04 10:19 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
If you still have the source code, it would be nice to have it.


Marco Kalter
Allround Automations
Re: OracleSessionPool, AV while destroying datamodule
#5775 03/24/04 07:28 PM
Joined: Jul 2003
Posts: 112
Fino Mornasco, Como, Italy
L
Member
OP Offline
Member
L
Joined: Jul 2003
Posts: 112
Fino Mornasco, Como, Italy
I got the code from CVS, hope all files are the same rev because I didn't tag them. How can I send them to you?


LDS
Re: OracleSessionPool, AV while destroying datamodule
#5776 03/24/04 10:55 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
You can send them by e-mail to support@allroundautomations.com.


Marco Kalter
Allround Automations

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.029s Queries: 14 (0.008s) Memory: 2.5348 MB (Peak: 3.0393 MB) Data Comp: Off Server Time: 2024-05-03 20:05:04 UTC
Valid HTML 5 and Valid CSS