none
NTDLL.DLL Access violation 0xC0000005

    Question

  • Hi All,

    I have a WIN32 console app that functions OK when compiled, but under the debugger gives an unhandled exception error (access violation 0xC0000005) on termination (the return( 0 ) ) statement.  I've checked the heap (using heapwalk), periodically and see no errors, right up to immediately before the return (from the program) statement.

     

    How does one tease apart this sort of problem.  I'm running VC6.0.

     

    Thanks,

    Scott

     


    Scott
    Monday, December 5, 2011 5:29 PM

All replies

  • When the exception occurs under the debugger have a look at the stack window. It should show what function caused the problem and what its parameters were. It could be related to executing destructors when you return.  You can click lines in the stack display to go to the appropriate source code in most cases.

     

     

    Monday, December 5, 2011 6:32 PM
  • Hi Scott,

    Thanks for the reply.  The stack window is filled with NTDLL exceptions.  There are no references to any of my code.

     

    Scott

     


    Scott
    Monday, December 5, 2011 6:49 PM
  • Hi Scott,
     
    Thanks for your post in the MSDN Forum.
     
    After searching on the thread for a while, I found we are not able to reproduce the issue on our side. So it's not easy for us to find the root cause at present.
     
    There might be some memory leak in the codes. I think you should check the codes carefully. You can also try recreating a new project. Perhaps recreating it on another machine will be better. Or you can try patching your VS and the system.
     
    By the way, there is another post with the similar issue; you can refer to it for more information at this link: http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/a800a032-0494-4691-813c-5a814354eb37.
     
    I hope this reply is helpful to you. If you have any questions, please post more information about the error messages, sample codes, and the development environment here.
     
    Best regards,
    Helen

    Helen Zhao [MSFT]
    MSDN Community Support | Feedback to us
    Wednesday, December 7, 2011 6:46 AM
  • Hi Scott,
     
    Would you mind letting me know the result of the suggestions? If you need further assistance, feel free to let me know. I will be more than happy to be of assistance.
     
    Best regards,
    Helen


    Helen Zhao [MSFT]
    MSDN Community Support | Feedback to us

    • Edited by Helen Zhao Monday, December 12, 2011 1:56 AM
    Monday, December 12, 2011 1:56 AM