We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More
This site is now read-only. You can still browse and search as usual. Learn More
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.
Hi,
> fake memory leak in a DLL of my exe [...]
Have you added this dll to the list of project modules to be profiled?
Can you attach here your AQtime project (and .exe and .dll) ?
Hi Alex,
thanks for your feed back.
>Have you added this dll to the list of project modules to be profiled?
of course !
I did it manually on my standalone AQtime project and it was done automatically by the intergrated version.
So, I think it's done !
>Can you attach here your AQtime project (and .exe and .dll) ?
I zip it... I suppose that an AQTime project is only made of the *.aqt file !
For information the fake memory leak is in the TSFC.dll module, TSString.cpp file, CTSString class default ctor which is called many times (I check with a breakpoint in debug mode)
Here is the code:
CTSString::CTSString ()
{
m_Size = 0;
m_BufferSize = STARTING_BUFFER_SIZE;
m_pBuffer = NULL;
SetNeededBufferSize (false);
m_pBuffer[0] = 0;
char * p = (char *)malloc(10); // p is never free to check for ML
}
You will see, with Windbg, that the MSVCRT embeded memory check, see my fake memory leak (but without reporting line information)
Detected memory leaks!
Dumping objects ->
{650} normal block at 0x006FE5D8, 10 bytes long.
Data: < > CD CD CD CD CD CD CD CD CD CD
You'll find attached a 7Z file containing my AQTime (standalone version) projet and minimal subset version of my exe with it's DLL as requested.
(I cannot use ZIP since the ZIP file is more than your limit of 20,000,000 bytes !)
Running Diatem.exe stops at checking licence time but it's not an issue since the CTSString default ctor is called a lot of time before this. So it's enought for test prupose.
Thanks for your help.
Hi,
Thank you for the project.
This is what I did after I unpacked the archive and opened it in AQTime:
a) As AQTime stores full path to the profiled modules in the project and provide no means to batch 'rebase' them, I had to remove all modules from the project and add them a-new and marked DiaTem.exe as the Active module;
b) Initial launch of DiaTem.exe failed for me because of absence of the required mfc120d.dll, msvcp120d.dll and msvcr120d.dll DLLs. DiaTem.exe started successfully after I downloaded the mentioned DLLs (mine box does not have VC2013 debug redistributables);
c) I noted, that none of the binaries in the archive contains debug information;
d) In the Setup | Classes To Profile panel I created a new area of including type, added TSFC.dll to it and made this area the only selected one;
e) Started profiling.
I tried both: to press Get Results button in AQTime while the License window is on screen and to wait for the final results after the window was closed and the DiaTem.exe exited.
Initially, indeed, I got an empty results on the Report panel. But after I deactivated the View Project Classes Only filter (a button in the middle of the toolbar just above the results I saw a line with the leak of C++ Native Memory type.
After I double-clicked this line to select it (and pressed the View Allocation Paths In Call Tree button) I was able to see a couple of reported leaks of 10 bytes each in the Call Graph and Call Tree panels. No module name / line number info was provided because (I think) no debug information was provided.
I was able to see every separate leaked allocation after I selected Objects node in the results tree.
I was not able to check if you has got the same results because you did not include the folder with report data (named diatem3.6_Results) in the archive.
Attached is my project file with the results and a screenshot of profiling results.
Does the above help?
Thanks for your reply.
What you say is realy confusing me !
First you say that you need to download the DEBUG redistributable of VS2013 (sorry for not shipped it; I thought you had them installed since Memory profiling DO needs debug builds) So this mean that my binaries do need debug version of MFC and CRT libraries. Right ?
and after you say that ALL my binaries has NO DEBUG INFO !
I can say that VS2013 is able to debug all my binaries ! so I think all my binaries is build with debug info.
I just verify that the size of TSFC.DLL is really different between debug and release build : 283K for debug version and 57K for release version. (and I double check that this is the 283K version that I sent you !)
Do you know a way to guess if a DLL is a debug or release build ?
Anyway, there are many compiler option to build a debug version. And unfortunatly I did not find the settings to put on my vcxproh VS2013 project to suit the AQtime needs. I only find delphy ones... that do not help me.
I think the issue is there : What are the debug compiler flag/option to use in Visual Studio 2013, to be compliant with AQTime ?
I did not know about the diatem3.6_Results directory ! but I can't send it because it is too large :
"
Thanks a lot for your feedback.