Question

Using C++ and discovered today during a demo that I'm suffering from a corrupted heap (but only on important occasions!!). I found a few posts here on SO and decided to download Application Verifier and Debugging tool. I am current running Visual Studio 2010.

So, now I'm left with an installtion of the the debugging tool where I get a folder called Windows Kits. In the folder I have an app called WinDbg where I tried to open my app and run it. It worked fined but I was not able to get any info about my heap corruption. Then I installed the verifier which only left me with a header file and a .dll file which I dont know what to do with.

So, could anyone please tell me how to use this tool so that I dont have to suffer anymore embarrassing moments like these? Been searching in forums and since I dont even know how to open the verifier, I'm truly lost when I read the instructions how to use it (from 2009)

Était-ce utile?

La solution

App Verifier will install a AppVerif.EXE executable. Run it, and tell it to verify your application. Then run your application in a debugger (either WinDBG or your IDE).

Autres conseils

Consider using the Application Verifier in conjunction with the Visual Studio debugger.

  1. Start Visual Studio and compile your application
  2. Start the application Verifier utility.
  3. File => Add Application
  4. Select the appropriate Tests (e.g. heaps, exceptions,...)
  5. Use Visual Studio Debug to start your application.

When something bad happens... your debugger will stop. This should give you a pretty good idea of the source of the problem.

Also, it might help to load the missing symbols before starting your test. In Visual Studio 2017, you can do this by:

  1. Debug
  2. Options and Settings
  3. Debugging
  4. Symbols
  5. Load all symbols

Good luck!

NOTE: When you are done, be sure to disable the AppVerfier checks that you enabled... otherwise you may experience some unexpected side-effects 6 months down the road when you have forgotten about AppVerifier.

REFERENCES

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top