Memory leak in direct mode (for COM object)?

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
AlexVz
Posts: 3
Joined: Thu 06 Feb 2014 09:28

Memory leak in direct mode (for COM object)?

Post by AlexVz » Thu 06 Feb 2014 13:02

I have a problem inserting records to a table (using TOraQuery) from a COM object in direct mode. FastMM reports memory leaks:

Code: Select all

A memory block has been leaked. The size is: 36

This block was allocated by thread 0x940, and the stack trace (return addresses) at the time was:
1AF6836 [System.pas][System][System.@GetMem][4203]
1AF786F [System.pas][System][System.TObject.NewInstance][14969]
1AF7F72 [System.pas][System][System.@ClassCreate][16231]
1D40199 [OraNet][OraNet][OraNet.N_312.Create]
1B02DC2 [FastMM4.pas][FastMM4][FastMM4.CalculateHeaderCheckSum][8215]
1D43D73 [OraNet][OraNet][OraNet.OCIDescriptorAlloc_]
1D8DF68 [OraClasses][OraClasses][OraClasses.TOCICommand.GetRowId]
1D877DB [OraClasses][OraClasses][OraClasses.TOCICommand.Exec]
7C90E2F1 [ZwReleaseMutant]
7C8024B7 [ReleaseMutex]
1D7DBB2 [OraClasses][OraClasses][OraClasses.TOCIConnection.Release]

The block is currently used for an object of class: N_312
The allocation number is: 19337

Current memory dump of 256 bytes starting at pointer address 7FE789A0:
44 C4 D2 01 00 00 00 00 A0 89 E7 7F 00 00 01 30 5F 00 05 00 00 05 24 00 19 00 00 00 00 00 00 00
6C BE 99 F1 80 80 80 80 00 00 00 00 81 8A E7 7F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
96 4B 00 00 14 96 AF 01 2B A0 AF 01 59 61 C4 01 4A E0 D8 01 DB 77 D8 01 F1 E2 90 7C B7 24 80 7C
B2 DB D7 01 AA D6 D8 01 7E CF D8 01 BE D0 D8 01 40 09 00 00 40 09 00 00 52 68 AF 01 B1 96 AF 01
32 E1 D8 01 DB 77 D8 01 F1 E2 90 7C B7 24 80 7C B2 DB D7 01 AA D6 D8 01 7E CF D8 01 BE D0 D8 01
9B 2B CE 01 20 00 00 00 E3 04 01 00 D1 14 83 92 90 22 DF 01 80 80 80 80 80 80 80 80 80 80 80 80
80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 2E EB 7C 6D 80 80 80 80 00 00 00 00 01 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 94 4B 00 00 14 96 AF 01 2B A0 AF 01 18 9A AF 01
One leak for each row inserted (and one more if I use KeySequence).
And everything is OK without direct mode.
Is there a workaround?
I am using ODAC 9.2.5., Delphi XE3 and Oracle 11g.

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

Re: Memory leak in direct mode (for COM object)?

Post by AlexP » Thu 06 Feb 2014 14:02

Hello,

Please send a small sample of a COM object demonstrating memory Leak to alexp*devart*com

AlexVz
Posts: 3
Joined: Thu 06 Feb 2014 09:28

Re: Memory leak in direct mode (for COM object)?

Post by AlexVz » Thu 13 Feb 2014 07:19

Any new info?
Do I have to send something else?
Thank you.

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

Re: Memory leak in direct mode (for COM object)?

Post by AlexP » Thu 13 Feb 2014 09:35

When launching your application, after calling the LIrsTestLib.Execute method, an AV is raised (the COM-object is registered with regsvr32). We tried to run the application on win XP and win 7 (both 32-bit and 64-bit) - and AV is raised on all the platforms. Please send a working COM-object or reproduce memory leak not using COM in a simple application

AlexVz
Posts: 3
Joined: Thu 06 Feb 2014 09:28

Re: Memory leak in direct mode (for COM object)?

Post by AlexVz » Fri 14 Feb 2014 14:09

I've sent you the COM object. See mail for details.
If you have any questions, feel free to contact me via e-mail.
Thanks.

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

Re: Memory leak in direct mode (for COM object)?

Post by AlexP » Tue 18 Feb 2014 09:24

I have received your example, however, either on launching the exe or on running in the IDE, FastMM doesn't display information about MemoryLeak after closing the application.

Post Reply