0

I am working on a program which I suspect to have one or more memory leaks. Some other answer on Stack Overflow told me to try DevPartner BoundsChecker (one of many others I tried).

Now when I run my program with BoundsChecker running, it will break. At some point, a Windows file open dialog will get initiated and right before that actually happens, a non-continuable breakpoint gets triggered. This only happens with BoundsChecker running.

According to the Console Output, the last thing that the program is trying to do is to load C:\Windows\SysWOW64\slc.dll which DevPartner recognizes as the "Microsoft Software Licensing Client Dll". Since we do not use any software licensing in that particular program, this must somehow be related to the dialog window that is supposed to be opened.

Anyway, I really want to find those memory leaks and for that, I need to open that file. Is there a possibility to tell BoundsChecker not to break my program because of this issue (whatever that issue might be)?

bastibe
  • 16,551
  • 28
  • 95
  • 126
  • 1
    Not really an answer to your question, but an alternative method: The SysInternals VMMap tool is relatively unknown but, since it got the ability to show stack-traces, actually very useful for tracking down many types of memory leaks. I wrote a short guide about using it here, in case it's useful (aimed at a different audience but most of the details apply to any memory leak hunt): http://resource.dopus.com/viewtopic.php?f=11&t=13046 -- Hope it's useful, and sorry if not! (Edit: Direct link to VMMap: http://technet.microsoft.com/en-us/sysinternals/dd535533.aspx ) – Leo Davidson Dec 20 '10 at 17:27
  • I should add, it can be fiddly to get VMMap to see your debug symbols but once it does it can tell you the line of code which triggered the allocation. (Well, not the line of code but the lines of code in the code-stack.) – Leo Davidson Dec 20 '10 at 17:29
  • 1
    you can enable visual studio memory leak tracking. It's not as powerful as boundschecker, but you can leave it on in the debug build at all times: http://msdn.microsoft.com/en-us/library/e5ewb1h3(v=vs.80).aspx –  Jan 29 '11 at 14:43
  • User629199. I am one of the developers working on BoundsChecker. If you wouldn't mind sharing your test case, I can take a look at your problem. We can sign an NDA if necessary, though frankly, all I care about at this point is weeding out every last bit of instability I can find in BoundsChecker. – Rick Papo Apr 08 '11 at 11:46

1 Answers1

1

Basti, there was known bug in the 9.x versions of BoundsChecker with the MFC file open prompt. If you post your DPS and Visual Studio versions I might be able to tell you which patch or update you need to get around this. On the other hand if you really are tripping up in a licensing guard DLL, BoundsChecker may be exciting some anti-tamper logic in it. I have seen DPS raise the anti-tamper logic in other Micro Focus products. If it is the latter you would need to raise a case with Micro Focus customer care and provide a repro test sample. Shameless plug: I work on the DevPartner team. We are releasing DPS 10.5 with BoundsChecker for x64 application support on February 4, 2011. Please see if this version corrects your issue once the download eval is posted.

Matt Schuetze
  • 1,112
  • 8
  • 9
  • Hi Matt, I am having the same problem. It is infuriating having bought BoundsChecker to find leaks in our product. My app runs fine in VS debugger, but crashes when running under BoundsChecker error detection. It crashes when loading the dlls right at the start of the app. I have checked with version 10.5. I am on Windows 7 64bit, VS C++ 2010, 32 bit application. It loads 5 of our dlls, the crash occurs when ntdll.dll tries to load the 6th. Somehow the program gets into the start of normaliz.dll and crashes with an invalid pointer. Cheers –  Feb 23 '11 at 07:37