Debug Visual C++ memory allocation problems

柔情痞子 提交于 2019-12-02 10:12:07

You can run your application in release mode by attaching to Windbg.

  • Enable the gflags ( As you mentioned)
  • Start the application in release mode.
  • Attach it to Windbg using Attach to process option in Windbg.
  • Configure the correct path for release PDBs.
  • Reload the PDB manually using .reload /f in case of automatic loading fails.
  • Perform the use case.

WinDbg would stop the execution whenever an exception occurs. For every first chance exception, analyze the reasons. It could be one of the error for crash.

Before using gFlags/PageHeap I suggest you to check for Access Violation exception. First attach the process by using Build->Start Debug->Attach to process option. Once it is attached enable the access violation exception by going to Debug->Exceptions select Access Violation and select the check box Stop Always. Then check whether your debugger catches any access violation exceptions.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!