dbaccess.pas assertion on 6685

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
tswedrowski
Posts: 9
Joined: Mon 16 Mar 2015 12:58

dbaccess.pas assertion on 6685

Post by tswedrowski » Mon 16 Mar 2015 15:06

Hello,
I have problem with assertion in DBAccess.pas, line 6685.

After migration of code from Delphi2009 (with ODAC 6.70) to Delphi XE7 (ODAC 9.4.14), I have encountered above assertion while invoking query in a DLL.
In fact, EXE file loads first dll where connection is established - it works correctly. Next, "first dll" loads "second DLL" and passes TOraSession object (not directly, it is part of "bigger" object). While opening query in this "second DLL" above assertion is raised.
In DBMonitor invoked query is visible (state "Pending") but is "orphaned" - query object is not a child of main session object.

In original code (Delphi2009) function "AssignConnect" was not used, as it is shown in "Demos\Miscellaneous\Dll".

Please provide me more information about assertion made in DBAccess.pas, line 6685.

Environment: Windows 7 64-bit, Delphi XE7 Upd1, ODAC 9.4.14, Oracle 11.2.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: dbaccess.pas assertion on 6685

Post by AlexP » Tue 17 Mar 2015 09:44

Hello,

Most likely, you are passing not only the OraSession object to the library, but the OraQuery as well, and this Assert occurs due to type mismatch. We need a small sample (an application and libraries) for more detailed investigation. You can send a sample to support*devart*com and we will continue investigation of the issue.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: dbaccess.pas assertion on 6685

Post by AlexP » Wed 18 Mar 2015 09:24

Please contact us again if the problem persists.

tswedrowski
Posts: 9
Joined: Mon 16 Mar 2015 12:58

Re: dbaccess.pas assertion on 6685

Post by tswedrowski » Fri 27 Mar 2015 07:44

Hello again.
I try to prepare small piece of code to analyse problem with assertion. But in this simple case it was enough to use "AssignConnect" as method of passing connection from one DLL to another (instead of simple variable assigning).
In this case no runtime BPL were used.

In more complicated situation it was not easy to change the way connection was passed, because connection was part of "bigger" object passed from one DLL module to another - which in fact is bad idea because of memory management.
In this case the easiest solution was to use runtime libraries - core functions to connect and pass connection are stored in BPL, which are as runtime libraries (BPL) linked to both DLL modules.

Using BPLs solved the problem with assertion. Actually, no "AssignConnect" is used and it seems to work properly.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: dbaccess.pas assertion on 6685

Post by AlexP » Fri 27 Mar 2015 10:48

Glad to see that the issue was resolved. If you have any further questions, feel free to contact us.

Post Reply