PDA

View Full Version : EL does not log mem leak in a thread


PekunZip
17-Jul-2009, 07:18 AM
I'm facing with problem that EL does not log mem leaks from a thread.
I'm using D2009 pro with EL 6.0.20 pro.

My application does El logging into .elf log file because exe is running as hidden application (black box app).

Main application "uses" section has definition
ExceptionLog among other ones (windows,classes,sysutils ets...)

Just beginning of main code there is defined procedures
HandledExceptionNotify := EurekaLogHandledExceptionNotify;
ExceptionNotify := EurekaLogExceptionNotify;
to achieve writing leaks and errors into log file. These
procedures are written into separate code module which is
introduced for main application uses clause - of course. This separate
code module has uses section equipped with definitions "ExceptionLog, ECore, ETypes;" and procedures mentioned above.

Main app does start a thread (own TThread descendant code module) which does a lot of things with unwanted "leaking feature" :) which should be trapped with EL.

However it seems that EL does not detect leaks from that thread.

I tried to generate leaks by creating multiple instances of TClientDataset in a thread without freeing them but it seems EL does not detect leaking.

What am I doing wrong?

Should
HandledExceptionNotify := EurekaLogHandledExceptionNotify;
ExceptionNotify := EurekaLogExceptionNotify;

definitions to be done in a thread code also?

I added an code segment into thread code which causes and AV exception.
This exception does occur with D2009 IDE but El does not react for that.
It's obvious that there is somekinda problem with EL settings of config - but what?

Alex
17-Jul-2009, 07:41 AM
Hi,

Can you create a demo?
Please, try create an empty application and add TThread and any of your code, that you suspect. Enable EL and see if it reproduce the behavior.

PekunZip
17-Jul-2009, 02:04 PM
I removed
HandledExceptionNotify := EurekaLogHandledExceptionNotify;
ExceptionNotify := EurekaLogExceptionNotify;

things from project and just configured EL to log without message boxes.
Seems that it works now so that exceptions and leaks are reported from threads.

So I presume that it is not anymore needed to create wrapper functions to log leaks into file... Am I right?

Alex
17-Jul-2009, 03:01 PM
Hi,

I don't know, since I don't see your application - therefore I can not imagine, what happens at your side.
Please, take a look at this question: http://support.eurekalog.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=12&nav=0,6