Do not see fake memory leak in a DLL
- 9 years ago
Hi Alex,
Thanks for all your comments.
I did follow the recommandation for building native c++ projects : I had to change my 52 projects of my application since an option was disabled and AQtime needs it (Function Level Linking). This was a great think since it generates a lot of link errors that were real errors (indeed I don't undestand how the code was working before !). I must say that my application was last converted from VC6 to VS2013 ! So the project file settings were automatically translated from VC6 to VS2013 (+ some manual action)... and those both compilers are REALLY different ! So switch FLL ON was a good thing !
I also set all my project to use /Zi (since all my project can not use /ZI because of /SEshc settings)
I verified and setup the directory to use PDB files (indeed it was good, only vc120.pdb was missing)
I studied your screen shot (that was helpfull regarding the small button !)
I verified the "Project Search Drectories" for source picking.
and I can see the same results as yours.
I don't understand why it is mandatory to create a "class level area" since, by definition, we don't know where are memory leaks ! but I created it and put the DLL into which I create a memory leak (malloc without free).
Finally I can see the same results as yours + source file and line number ! (see attached)
BUT still no source code can be viewed when double click on a Call tree CTSString line item....
(no more error message saying that there are no source code available or no debug info)
So, I must really thank you all the time you spent for me. I think there is something abnormal in my application solution that do not please AQTime.
I will know try with a dummy "hello world" like native C++ MFC application build from scratch using the VS2013 wizard and see if the results a re more accurate.
and finally open a support ticket !
Once again, many thanks to you !
oops : last minute ! I just saw that the line number of leak is really innacurate since it do not point on the malloc but on the ctor opening brace... at line 42 (see attached)
very last minute !
Finally after trying on another mushc smaller app, reading more help, clicking everywhere..; I finally found what I am looking for days :
The "Classes Data" view is not the better place to find leaking code but just if there are leak
The "Objects" view is better ! Associated with the Details view, Creation Call Stack pane, allow to double-click on a symbol and see the source code ...
BUT this must be used with the "View project class only" button DISABLED ! (so thanks for that !). So now I find my dummy leak (see attached).
My point of view is that having memory leak information is not a straight forward process !
To much information makes real information noisy. (I was thinking that purrify was too verbose... but AQTime is much more graphically noisy!).
Also the "Object Name" column that list "C++ native memory.xxxx" is not really helpful.
I think that a simplified unique view can be done in order to directly point on the memory leak.
Now I can refine my question:
- What is the aim of the magic button "View project class only" ??
It seems strange to disable it in order to see the leak of the class of my project! Is project meaning only the executable ??
why my DLL behing part of my project is not considered as included in my project ??
Anyway, I set this post as Answered.
Thanks again Alex.