none
Common Language Runtime Debugging Services Application has generated an exception that could not be handled

    Question

  • Our custom got an error when startup our .NET windows form application.

    XXXXX.exe - Common Language Runtime Debugging Services
    Application has generated an exception that could not be handled
    Process id=0x654(1620), Thread id = 0x5b0 (1456)
    Click OK to terminate the application
    Click CANCEL to debug the application

    If they click on "CANCEL" then following error message appears:

    Registered JIT debugger is not available. An attempt to launch a JIT
    debugger with the following command resulted in an error code of 0x2(2)
    Please check the computer settings
    cordbg.exe !a0x654
    Click on Retry to have the process wait while attaching a debugger
    manually.
    Click on Cancel to abort the JIT debug request

    We can not duplicate this problem in our development environment and test environment. So, we ask them to uninstall application, .NET Framework 1.1 and resinstall .NET Framework 1.1 and application. They still got same error. We further ask them to install .NET Framework SDK 1.1. They got some detail error message.

    [thread 0x840] Thread created.
    Unable to determine existence of prolog, if any
    [thread 0x188] Thread created.
    [thread 0xba8] Thread created.
    [thread 0x840] Unhandled exception generated: <0x00c0344c> <System.IO.FileNotFoundException>
     _fileName=<null>
     _fusionLog=<null>
     _className=<null>
     _exceptionMethod=<null>
     _exceptionMethodString=<null>
     _message=<0x00c04cc8> "The specified module could not be found."
     _innserException=<null>
     _helpURL=<null>
     _stackTrace=<0x00c04d2c> array with dims=[156]
     _stackTraceString=<null>
     _remoteStackTraceString=<null>
     _remoteStackIndex=0x00000000
     _HResult=0x8007007e
     _source=<null>
     _xptrs=0x00000000
     _xcode=0xe0434fd

    Thread 0x840 R 0x00000000: <unknown>
    <cordbg>

    Looks like the problem is casued by missing component. But we don't know which component missing and how to find it. Is there anybody can give us some clue what we need to check next and what tool we can use to detect missing component.

    Thanks!!!!

     

    Thursday, July 13, 2006 4:53 PM

Answers

  • Hit F7 to start profiling the app.  You'll see notifications in the bottom panel, pay attention to the LoadLibrary calls.

    Friday, July 14, 2006 6:40 PM
    Moderator

All replies

  • The error code hints that LoadLibrary failed.  That's probably because an assembly is missing or a P/Invoke call referenced a DLL that is not available.  The stack trace might be just a little useful; "array with dims", does that mean anything to you?

    Thursday, July 13, 2006 7:12 PM
    Moderator
  • Thank you for your response!!

    I don't know what "array with dims" means. You are proably right, there are something not available, but becasue it is happen on client's laptop, we are not able to try. So, is there a way can let client do something and give us more information or any tool available to gather more information.

    Friday, July 14, 2006 2:31 PM
  • Try profiling the app with Depency Walker.  If a DLL is missing, it should be quite obvious from the trace.

    Friday, July 14, 2006 5:21 PM
    Moderator
  • I tried Dependency Walker in our development environment, looks like it's useless for .NE T Window Form application, the result I got is like bellow,

    XXXXX.EXE
        MSCOREE.DLL
            KERNEL32.DLL
            USER32.DLL
            ADVAPI32.DLL
            SHLWAPI.DLL
            URLMON.DLL
            VERSION.DLL

    I know we used some other DLL like Mirosoft Office Object Library, but MSCOREE.DLL (.NET Runtime Engine) covered them. Any other idea? Thanks!!!!

    Friday, July 14, 2006 6:23 PM
  • Hit F7 to start profiling the app.  You'll see notifications in the bottom panel, pay attention to the LoadLibrary calls.

    Friday, July 14, 2006 6:40 PM
    Moderator
  • Cool, that's exactly what I am looking for. I know this tool for a while, but didn't speed any time to study how to use it. Thanks a lot!!!!!
    Friday, July 14, 2006 7:28 PM
  • Hi.  I have the same error...was this error ever resolved?
    Tuesday, August 29, 2006 1:45 PM
  • You can use Depency Walker to narrow down the problem.
    Wednesday, August 30, 2006 2:18 AM