Why is ntdll.dll crashing my c++ executable?

后端 未结 1 793
遇见更好的自我
遇见更好的自我 2021-02-05 12:21

I am having trouble to get a Visual C++ executable to work, the app crashes , here is what I have seen in the event viewer.

Faulting application name: submit.exe         


        
1条回答
  •  忘了有多久
    2021-02-05 12:47

    Troubleshooting this type of problem can be a real challenge... particularly when you are not familiar with the code base.

    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 2012, you can do this by: Debug => Options and Settings => Debugging => Symbols => Load all symbols.

    Good luck!

    REFERENCES

    • MSDN: "Application Verifier" article
    • Download: Application Verifier
      • I believe it is also included with the various Windows SDKs (previously known as Platfrom SDK)
      • Be mindful that you may have two versions installed:
        • C:\Windows\SysWOW64\appverif.exe [32 bit version]
        • C:\Windows\System32\appverif.exe [64 bit version]
    • TechNet: Two Minute Drill: Application Verifier

    UPDATE: July 2015

    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.

    0 讨论(0)
提交回复
热议问题