none
Custom app crashes with 0x800736b1

    Question

  • I'm developing a custom application (GUI.exe), primarily in C#. My business objects (BOLData.dll) are in a managed C++ dll that's part of the overall project. The other dlls are all C#. The program runs just fine on the developers machines. We're all using VS2K5 w/SP1. It works under XP Pro, Win2K3 and Vista -- if VS installed.

    When I tried running the program on a clean XP Pro computer, it immediately crashes with a cryptic reasons:

    EventType clr20r3, P1 gui.exe, P2 1.0.0.23358, P3 45d76c7d, P4 bol, P5 1.0.0.23357, P6 45d76c7b, P7 a4, P8 13, P9 system.typeinitialization, P10 NIL.

    In the Program.cs file, I threw in a try/catch around the main form loading and then ran it again. This time I got a lot more info about why it's failing:

    System.TypeInitializationException: The type initializer for 'SingletonInternal' threw an exception. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileLoadException: Could not load file or assembly 'BOLData, Version=1.0.2604.26790, Culture=neutral, PublicKeyToken=0cf33f182f0f74e2' or one of its dependencies. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)
    File name: 'BOLData, Version=1.0.2604.26790, Culture=neutral, PublicKeyToken=0cf33f182f0f74e2' ---> System.Runtime.InteropServices.COMException (0x800736B1): This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)
    at RTO.BOL.Settings..ctor()


    --- End of inner exception stack trace ---
    at System.RuntimeTypeHandle.CreateIns

    After some googling, it seems that a lot of the causes for the HRESULT: 0x800736B1 is the lack of the Visual C++ 2005 Redistributable Package. I installed and rebooted the client machine, but the exact same error message is there. I also made sure to make the entire project in Release mode, instead of debug.

    I also ran my custom app under FileMon to see if it was even attempting to load BOLData.dll. Turns out it is, as one can see here: http://bsod2600.home.comcast.net/RTO-Filemon.zip

    When I fire up Dependency Walker with GUI.exe, it gives me two warnings:
    Warning: At least one delay-load dependency module was not found.
    Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

    edit:
    Did some more digging around and I found some more errors in the Application Event Log:
    Event Type:    Error
    Event Source:    SideBySide
    Event Category:    None
    Event ID:    32
    Date:        2/17/2007
    Time:        2:54:00 PM
    User:        N/A
    Computer:    TEST2
    Description:
    Dependent Assembly Microsoft.VC80.CRT could not be found and Last Error was The referenced assembly is not installed on your system.

    Event Type:    Error
    Event Source:    SideBySide
    Event Category:    None
    Event ID:    59
    Date:        2/17/2007
    Time:        2:54:00 PM
    User:        N/A
    Computer:    TEST2
    Description:
    Resolve Partial Assembly failed for Microsoft.VC80.CRT. Reference error message: The referenced assembly is not installed on your system.
    .
    Event Type:    Error
    Event Source:    SideBySide
    Event Category:    None
    Event ID:    59
    Date:        2/17/2007
    Time:        2:54:00 PM
    User:        N/A
    Computer:    TEST2
    Description:
    Generate Activation Context failed for C:\Documents and Settings\BSOD\Desktop\app\BOLData.dll. Reference error message: The operation completed successfully.

    I got to looking at the manifest file for BOLData and it has:
    <assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />

    I looked on the client computer in the WinSxS and it only has a manifest for x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42.

    I'm guessing this is because I've got VS SP1 installed and the VC++ redis package doesn't have the newer CRT manifest/files. 

    1) What is the proper way to resolve this for clients?
    2) Any idea why the my program won't run on client computers?
    3) Why is the error about COMException when I'm not (knowingly) using any COM stuff?
    Saturday, February 17, 2007 11:06 PM

Answers

  • Well I ended up answering my own question -- Yes the Microsoft.VC80.CRT version mattered and was the root of the cause.   Once I installed the vcredist_x86.exe from C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86  which is the Visual studio 2005 SP1 updated one, then the application happily opened up on the client machine!

    It sure would be a good idea for Microsoft to update the publically downloadable VC++ redistributable package to the SP1 version!
    Saturday, February 17, 2007 11:37 PM

All replies

  • Well I ended up answering my own question -- Yes the Microsoft.VC80.CRT version mattered and was the root of the cause.   Once I installed the vcredist_x86.exe from C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86  which is the Visual studio 2005 SP1 updated one, then the application happily opened up on the client machine!

    It sure would be a good idea for Microsoft to update the publically downloadable VC++ redistributable package to the SP1 version!
    Saturday, February 17, 2007 11:37 PM
  •  BSOD2600 wrote:
    Well I ended up answering my own question -- Yes the Microsoft.VC80.CRT version mattered and was the root of the cause.   Once I installed the vcredist_x86.exe from C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86  which is the Visual studio 2005 SP1 updated one, then the application happily opened up on the client machine!

    It sure would be a good idea for Microsoft to update the publically downloadable VC++ redistributable package to the SP1 version!
    Wednesday, November 28, 2007 4:09 AM
  • Thursday, January 24, 2008 2:02 PM