TboDbxFb memory leak.

5 views
Skip to first unread message

De Armas, Adrián

unread,
Oct 3, 2009, 5:17:29 PM10/3/09
to TboDbxFb Firebird DBX4 Driver
Hi,
I've been using this driver for a while and everything was perfect
until I decided to include it in a new version of a service which used
DBX3.
For every SQL operation that the service does, the amount of memory
used increses... after a while the service took 1GB of memory (It is
SQL intensive).
I've tested my code with FastMM and it has no memory leaks.
If I change the driver to another DBX4 driver (one commercial and the
other free FB driver) I dont get this increse of memory use but I
can't use them because they have problem with the blob fields which I
use a lot for this particular project.

Tell me if I can help with something.

Regards,

Thiago Borges

unread,
Oct 3, 2009, 8:24:10 PM10/3/09
to tbod...@googlegroups.com
Hi Adrian,

Can you send me a sample application?
I will inspect the problem for you.

--
Thiago Borges

2009/10/3 De Armas, Adrián <adea...@gmail.com>:

Adrian De Armas

unread,
Oct 4, 2009, 6:06:16 AM10/4/09
to tbod...@googlegroups.com, thbo...@gmail.com
Thiago,
I'm sending you the sample project. 

Everytime I run:
  SQLConnection1.Execute('select first 10 * from "TOBDbxTest" where ID > :Param1 and ID < :Param2',Params, @unDataSet);

There's a memoryleak. The code reflects what I am doing in my code.
Hope it helps. Tell me if I can do something else.

Rename the file to .zip. There's a FB script.

I am running FB2.0.5 with D2007

Regards,


2009/10/4 Thiago Borges <thbo...@gmail.com>
ForThiago.zi_

Adrian De Armas

unread,
Oct 4, 2009, 2:45:45 PM10/4/09
to tbod...@googlegroups.com
Thiago,
I found that the test case that I sent you is not the best to track the problem...
It happens very clearly in my application but the deplotment might be difficult.
When I am debugging, everytime I query data from the database the eveng log shows:

Debug Output: HEAP[VCLServiceTest.exe]:  Process VCLServiceTest.exe (2592)
Debug Output: Heap block at 00F523D8 modified at 00F523E1 past requested size of 1  Process VCLServiceTest.exe (2592)
Debug Output: HEAP[VCLServiceTest.exe]:  Process VCLServiceTest.exe (2592)
Debug Output: Invalid Address specified to RtlFreeHeap( 00F50000, 00F523E0 )  Process VCLServiceTest.exe (2592)
Debug Output: HEAP[VCLServiceTest.exe]:  Process VCLServiceTest.exe (2592)
Debug Output: Heap block at 00F52450 modified at 00F52459 past requested size of 1  Process VCLServiceTest.exe (2592)
Debug Output: HEAP[VCLServiceTest.exe]:  Process VCLServiceTest.exe (2592)
Debug Output: Invalid Address specified to RtlFreeHeap( 00F50000, 00F52458 )  Process VCLServiceTest.exe (2592)
Debug Output: HEAP[VCLServiceTest.exe]:  Process VCLServiceTest.exe (2592)
Debug Output: Heap block at 00F52250 modified at 00F52259 past requested size of 1  Process VCLServiceTest.exe (2592)
Debug Output: HEAP[VCLServiceTest.exe]:  Process VCLServiceTest.exe (2592)
Debug Output: Invalid Address specified to RtlFreeHeap( 00F50000, 00F52258 )  Process VCLServiceTest.exe (2592)
Debug Output: HEAP[VCLServiceTest.exe]:  Process VCLServiceTest.exe (2592)
Debug Output: Heap block at 00F52898 modified at 00F528A1 past requested size of 1  Process VCLServiceTest.exe (2592)
Debug Output: HEAP[VCLServiceTest.exe]:  Process VCLServiceTest.exe (2592)
Debug Output: Invalid Address specified to RtlFreeHeap( 00F50000, 00F528A0 )  Process VCLServiceTest.exe (2592)
Thread Start: Thread ID: 1604. Process VCLServiceTest.exe (2592)
Debug Output: HEAP[VCLServiceTest.exe]:  Process VCLServiceTest.exe (2592)
Debug Output: Heap block at 00F528D8 modified at 00F528E1 past requested size of 1  Process VCLServiceTest.exe (2592)
Debug Output: HEAP[VCLServiceTest.exe]:  Process VCLServiceTest.exe (2592)
Debug Output: Invalid Address specified to RtlFreeHeap( 00F50000, 00F528E0 )  Process VCLServiceTest.exe (2592)
Debug Output: HEAP[VCLServiceTest.exe]:  Process VCLServiceTest.exe (2592)
Debug Output: Heap block at 00F527F8 modified at 00F52801 past requested size of 1  Process VCLServiceTest.exe (2592)
Debug Output: HEAP[VCLServiceTest.exe]:  Process VCLServiceTest.exe (2592)
Debug Output: Invalid Address specified to RtlFreeHeap( 00F50000, 00F52800 )  Process VCLServiceTest.exe (2592)
Thread Start: Thread ID: 3348. Process VCLServiceTest.exe (2592)
Debug Output: HEAP[VCLServiceTest.exe]:  Process VCLServiceTest.exe (2592)
Debug Output: Heap block at 00F523F8 modified at 00F52401 past requested size of 1  Process VCLServiceTest.exe (2592)
Debug Output: HEAP[VCLServiceTest.exe]:  Process VCLServiceTest.exe (2592)
Debug Output: Invalid Address specified to RtlFreeHeap( 00F50000, 00F52400 )  Process VCLServiceTest.exe (2592)

I can send u my app but I have to send the database as well...

Sorry for any inconvenience.

Thanks.


2009/10/4 Thiago Borges <thbo...@gmail.com>

Adrian De Armas

unread,
Oct 4, 2009, 3:34:25 PM10/4/09
to tbod...@googlegroups.com, thbo...@gmail.com
Thiago,
The error :
Debug Output: Heap block at 00F52610 modified at 00F52619 past requested size of 1  Process VCLServiceTest.exe (2592)
Debug Output: HEAP[VCLServiceTest.exe]:  Process VCLServiceTest.exe (2592)

which seems to be the one that makes my app consume more memory is produced when I clone a sqlconnection.
The test that I send, goes well with my first mail.
The app doesnt have any memory leak but if you use the process explorer you'll see that the memory use incresses.

I'm sorry for sending a wrong error before.

Hope this one helps.

Regards,


ForThiago.zi_
Reply all
Reply to author
Forward
0 new messages