faulting module ntdll.dll RRS feed

  • Question

  • Hi

    I developed a windows forms .net application using VS2005 and framework 2.0. in a XP machine.

    I realize on customer machine, running Windows 2003 Server R2, that after a few days or hours, my application crashs. It's closed by the OS and I can read on event viewer a message like:

    Source: .NET Runtime 2.0 Error

    Faulting application My_application.exe, version stamp 4d5eb766,  faulting module ntdll.dll version 5.2.3790.3959, stamp 45d70ad8, debug? fault address 0x0004afb2.

    I'm using try/catch in order to log all the errors, but I cannot detect any problem.

    Once I couldn't solve this issue, I move to VS2010 and convert my application to run with framework 3.5.

    After I install the application in customer machine, I got the first crash after a few minutes running without problems. I got this message from event viewer:

    Source: .Net Runtime 2.0 Error

    Faulting application My_application.exe, version stamp 4dabd71f,  faulting module ntdll.dll version 5.2.3790.4455, stamp 49900d60, debug? fault address 0x0004cde2.


    How can I check why my application is being shutdown/crash?





    Tuesday, April 19, 2011 5:34 PM

All replies

  • You can follow this KB to capture the dump file of the crashing application, and do investigation on the dump file to find out the root cause.


    If you need debugging support, you may contact support via you may also visit the below link to see the various paid support options that are available to better meet your needs.;en-us;offerprophone

    Eric Yang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by eryang Monday, May 2, 2011 3:45 AM
    • Unmarked as answer by eryang Wednesday, June 1, 2011 12:53 AM
    Wednesday, April 20, 2011 6:28 AM
  • Hi


    I used debug tools from Microsoft and when analyzing dump files I detect a 3th party dll that I'm using and that was causing the problem.

    I change my code in order to use that dll in a different way and till now I have no more crashes.

    However, I still have a problem that I cannot handle so far. Some times my application gets busy, is not crashed because I can see application CPU changing from 40% to 70%. I'm logging to file when start and end every procedure and I don't detect no procedure that as a start without an end, so I believe there is no infinite loop in my code. When this CPU consumption starts, I have no more log activity in my application and the only way to solve it is to quit and restart the application.

    I was using several timers and I change the code in order to use only two timers so that all my procedures related to the same class (this class works with a big hashtable) are called from a single timer so that they will run in the same thread.

    How can I know what is causing this problem?




    Sunday, May 29, 2011 9:21 PM
  • One way which i see is, time profile your application using an appropriate tool and let your application run over a period of time.

    Now pick up the profiled information and analyze as which method (s) takes up the maximum time. If there is one or two of them, then you need to do a thorough code analysis of those methods and figure out as why they are consuming that amount of time.

    Normally this happend when you have a while(1), But since you have already pointed out that there are none, you may look for recursive loops, or possible dead locks that get resolved due to certain triggers beyond some time.

    Tuesday, May 31, 2011 4:34 AM
  • Hi


    Can you point me any particular software to time profile my application? I'm using VS2010.



    Tuesday, May 31, 2011 9:25 AM
  • By any chance, could this problem being caused by Remote Desktop Access?

    My application is running in a customer machine and the only way to access there is through Remote Desktop.

    When accessing remotely i'm not creating a new session.

    I notice so far that if I don't access the machine my application is working ok (I check application behavior from a different machine). This could be coincidence but so far is a fact. I have a timer application that will delay my application start and I garantee that when the application starts I'm not remotely connected.




    Wednesday, June 1, 2011 1:14 PM
  • Any help about this?



    Thursday, June 2, 2011 4:20 PM
  • Thank you for your question, we're doing research on this case, it might take some time before we get back to you.

    Eric Yang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, June 3, 2011 7:02 AM
  • I would capture a dump at the time of the high CPU, and use DebugDiag to see what is happening on the threads that are taking the CPU:

    919791 How to use the Debug Diagnostics Tool to troubleshoot high CPU usage by a process in IIS;EN-US;919791

    With DebugDiag, you would need to monitor the CPU and generate a manual dump when the CPU is high.  If you want, you can also use ProcDump  to capture the dump, and use the switches so that it dumps automatically when the CPU stays high for a certain period of time.  You would still use DebugDiag to get an analysis and follow the threads that are using the CPU.  HTH

    Monday, June 6, 2011 10:31 AM
  • Thanks everyone, I will try what Michael suggested.



    Wednesday, June 8, 2011 7:30 PM
  • Any luck?
    Michael Graham, MSFT
    Monday, June 13, 2011 9:05 PM