none
application failed to initialize

    Question

  • I recently applied a VS service pack ( vs80sp1_kb95491-x86-intl.exe ) for VS 2005.
    Since then my applications run fine on the same machine they are built on, a Windows Vista platform, but no longer run on a Windows Server 2008 64bit Standard.
    Application that do not use a DLL built with CLR enabled still work.
    Applications that make a reference to the clr based DLL do not initialize. 

    I get the following error message dialog box:

          Application failed to initialize properly (oxo150002) Click OK to terminate the application.

    As best I can tell, both machines have .NET v3.5 installed.

    Help!

     

    I quick application of DependancyWalker shows that modules:

    MFC80U.DLL, MSVCM80.DLL, MSVCR80.DLL, LINKINFO.DLL are not found!

     

    Did some build/link switch get changed to now require these modules?  Can I de-select this requirement?  Otherwise, how do I go about finding/installing the correct versions of these files?

     

     

    • Edited by Boyd1 Tuesday, August 11, 2009 3:14 PM update
    Tuesday, August 11, 2009 3:03 PM

Answers

  • You've compiled the DLL after last month's security update was installed on your dev machine.  Now the DLL want to use revision 4053 of the CRT libraries.  The target machine however doesn't have that version installed, that's why it failed.
    Hans Passant.
    Tuesday, August 11, 2009 6:48 PM

All replies

  • The correct versions you can install by deploying this package  changing the way the dll's are linked depends on the project type of the dll if you could and how you would change those settings, if its a c++ project change the runtime library from dll to regular in the project options, managed projects don't have those settings.

    Tuesday, August 11, 2009 3:47 PM
  • Ok, I downlaoded the redistributable, ran it, rebooted and the files are in :

    • C:\Windows\winsxs\amd64_microsoft.vc80.mfc_1fc8b3b9a1e18e3b_8.0.50727.1833_none_8442d417329336b1
    • C:\Windows\winsxs\x86_microsoft.vc80.mfc_1fc8b3b9a1e18e3b_8.0.50727.1833_none_cbf00aee470f5fb7
    • C:\Windows\winsxs\x86_microsoft.vc80.mfc_1fc8b3b9a1e18e3b_8.0.50727.762_none_0c178a139ee2a7ed

    Odd because I thought at least one would be in something called "\winsxs\x64..."

    Anyway, DependancyWalker seems to still list the MF files as missing.

     

    I enabled the "desktop experience" option on ws2008 and the linkinfo.dll is now resolved.

     

    What next?

     

     

     

    Tuesday, August 11, 2009 5:11 PM
  • You cannot use Dependency walker to troubleshoot side-by-side problems.  It hasn't kept up with the times.  Neither your KB number nor your error code are correct, that makes it difficult to help you.  Look in the Windows event log for the errors.  Post them here if you can't interpret them.

    Hans Passant.
    Tuesday, August 11, 2009 5:16 PM
  • event viewer:

    ---

    Activation context generation failed for "C:\Envision\Apps\VEC2SqlDLL.dll".
    Dependent Assembly Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",
    type="win32",version="8.0.50727.4053" could not be found.
    Please use sxstrace.exe for detailed diagnosis.

    ---
    Faulting application EnvServices.exe, version 0.0.0.0, time stamp 0x4a807f77,
     faulting module ntdll.dll, version 6.0.6002.18005, time stamp 0x49e03824, exception code 0xc0150002,
    fault offset 0x0006f04e, process id 0x4fc, application start time 0x01ca1aa987fb324e.

    ---

     


    sxstrace Trace -logfile:SxSTrace.etl
    StartTrace failed.  Error Message is:
    Unknown error.
    ------

    I don't know how to interpret them.

    /Boyd

     

    • Edited by Boyd1 Tuesday, August 11, 2009 5:39 PM updATE
    Tuesday, August 11, 2009 5:36 PM
  • no clue whats wrong, have you tried staticly linking those dll's yet? (its in the runtime option in the code generation options for a c++ project)
    Tuesday, August 11, 2009 5:50 PM
  • yep.

    Not allowed with a clr application.
    Tuesday, August 11, 2009 6:02 PM
  • As per above note of km number, It all started when I installed SQL Server 2008 on my machine, which resulted in problems, and lead me to the following chain of references.

    ( oxo150002 should read 0x0150002 )

    http://support.microsoft.com/default.aspx/kb/961894

    leads to:

    http://support.microsoft.com/kb/958036/

    which leads to:

    http://support.microsoft.com/ph/3041


    To that end, I guess I am still missing the "hotfix"

    Where do I get it?

    Tuesday, August 11, 2009 6:47 PM
  • You've compiled the DLL after last month's security update was installed on your dev machine.  Now the DLL want to use revision 4053 of the CRT libraries.  The target machine however doesn't have that version installed, that's why it failed.
    Hans Passant.
    Tuesday, August 11, 2009 6:48 PM
  • I suppose I'll have to reboot now.
    sigh.
    Tuesday, August 11, 2009 7:07 PM
  • I ran control_panel/windows_updates

    Indeed there was a crt library security update downloaded and installed.
    But still no joy.

    Now what?


    But what's this?

    DEPENDS has found a new DLL on the 'not found' list:
    IESHIMS.DLL called by BROWSEUI.DLL
    • Edited by Boyd1 Tuesday, August 11, 2009 7:58 PM
    Tuesday, August 11, 2009 7:51 PM
  • Now you need to post to the C++ General forum.

    Hans Passant.
    Tuesday, August 11, 2009 8:01 PM
  • Ok so for yucks I copied the desired mfc80u.dll from the winsxs directory to the same directory as the application.

    Now DEPENDS does not complain about that one.

    I suppose it is possible that DEPENDS is flagging winsxs dlls as missing errantly as suggest above.

    Anyway,DEPENDS generates the following error block:
    ---
    Error: The Side-by-Side configuration information for "c:\envision\apps\VEC2SQLDLL.DLL" contains errors. The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail (14001).
    Error: At least one required implicit or forwarded dependency was not found.
    Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
    Error: Modules with different CPU types were found.
    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.
    ----
    Event viewer:
    ---
    Activation context generation failed for "c:\envision\apps\VEC2SQLDLL.DLL".
    Dependent Assembly Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",
    type="win32",version="8.0.50727.4053" could not be found.
    Please use sxstrace.exe for detailed diagnosis.
    ----


    Much the same error as before.


    But what is this "The Side-by-Side configuration information for: "?
    Tuesday, August 11, 2009 8:19 PM
  • When dealing with managed code, the Fusion Log Viewer is the new Depends. Run fuslogvw.exe. :)

            -Steve
    Programming blog: http://nitoprograms.blogspot.com/
      Including my TCP/IP .NET Sockets FAQ
    MSBuild user? Try out the DynamicExecute task in the MSBuild Extension Pack source; it's currently in Beta so get your comments in!
    I will be at the Grand Rapids BarCamp 4 unconference - come on by, fellow Michiganders!
    Tuesday, August 11, 2009 8:28 PM
  • The OP has a problem with unmanaged DLLs that are installed in the Windows side-by-side (SxS) cache.  Fuslogvw.exe doesn't track this.  The OP also really needs to stop using Depends, it is giving him bad info.  The diagnostic is that the security update, revision 4053, is not installed on his target machine.

    Hans Passant.
    Tuesday, August 11, 2009 8:36 PM
  • Having just installed all updates and rebooted, I now have:

    Security Update for Windows Server 2008 x64 Edition (KB971657)
    SQL Server 2008 Books Online (August 2008)
    Security Update for Windows Server 2008 x64 Edition (KB971557)
    Security Update for Microsoft Office 2003 Web Components for the 2007 Microsoft Office System (KB947318)
    Update for Windows Server 2008 x64 Edition (KB968389)
    Internet Explorer 8 for Windows Server 2008 x64 Edition
    Windows Malicious Software Removal Tool x64 - August 2009 (KB890830)
    Security Update for Windows Server 2008 x64 Edition (KB956744)
    Security Update for Windows Server 2008 x64 Edition (KB973540)

    Security Update for Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package (KB973923)
    Security Update for Windows Server 2008 x64 Edition (KB973507)
    Security Update for Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package (KB973923)
    Definition Update for Windows Defender - KB915597 (Definition 1.63.1207.0)
    Definition Update for Microsoft Forefront Client Security (Antimalware 1.63.1288.0)
    Definition Update for Microsoft Forefront Client Security (Antimalware 1.63.1239.0)


    Now what?

     

    Tuesday, August 11, 2009 8:49 PM
  • If it is of any halp, this is the vs2005 vc++ link command:

    /OUT:"..\Library\VEC2SqlDLL.dll" /INCREMENTAL:NO /NOLOGO /DLL /MANIFEST /MANIFESTFILE:"Release\VEC2SqlDLL.dll.intermediate.manifest" /DEF:".\VEC2SqlDLL.def" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /OPT:NOWIN98 /LTCG /MACHINE:X86 /FIXED:No /ERRORREPORT:PROMPT ..\library\envdbldll.lib
    Tuesday, August 11, 2009 8:52 PM
  • As another experiment, I removed all calls to the MANAGED dll, and the applications now run.

    Of course they no longer write to the SQL database, so it is indeed the MANAGED CRT dll that is failing.

    This should not be considered a resolution, just a proof of the dll in question.

    /Boyd
    Tuesday, August 11, 2009 9:05 PM
  • So I have many applications written in C.

    They all work now.
    ?????

    I have only one app written in c++.

    Of course it is the cornerstone of the suite of applications.



    The c++ application now does not work but gives a different error message:

    This application failed to start because MSVCR80.dll was not found. Re-installing the application may fix the problem.

    THis dll does appear in a number of winsxs directories.

    Help
    Tuesday, August 11, 2009 9:42 PM
  •  MSVCR80.dll  is no longer an issue because I changed the build on the application to use MT instead of MD.

    Of cource there is also a "legacy DLL" written in c++ that in turn makes a call to  the MANAGED /clr DLL.
    All applications make use of the "legacy dll"

    So I have returned the code to reference from the "lagacy DLL" to the MANAGED DLL.

    And the error returns:
       Application failed to initialize properly (0x0150002) Click OK to terminate the application.

    This occurs for every application because all use the legacy dll and now the legacy dll has a reference to the managed dll

    So now I am back where I started.

    Windows Update declares both the Windows Vista development machine and the Windows Server 2008 x64 Standard target machine to be up to date.

    The code runs on the development machine.

    All applications are win32 executables in a WinServer x64 environment.

    This all used to work for months until not too long ago ( days, weeks?) .


    The only clue I see is that relatively simple app will not run with /MD ( fail to find  MSVCR80.dll ) and the clr DLL MUST use /MD !!!!!!


    Now what?
     
    Wednesday, August 12, 2009 1:29 PM
  • Where can I download v 4053 of the msvcr80.dll for windows server 2008 64k using side-by-side winsxs?
    Wednesday, August 12, 2009 3:01 PM
  • You can download the security patch from here.   I don't see a separate one for x64, it might be included.

    Hans Passant.
    Wednesday, August 12, 2009 3:34 PM
  • Well that's special!

    I get a dialog box running the installation:
    Title: "Windows Installer"
    Text: "The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program.  Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch."



    I'm guessing the Windows Update auto-installer encountered the same fate !?
    Wednesday, August 12, 2009 4:09 PM

  • sxstrace Trace -logfile:SxSTrace.etl
    StartTrace failed.  Error Message is:
    Unknown error.


    Just for anyone searching for the solution to this sxstrace error, you need to run it in an administrative command prompt.  No the error isn't helpful, and this is the only place I found when I searched for it, so others might find this useful.
    Wednesday, December 09, 2009 12:43 PM
  • Spot on Darren - I too found this thread for the sxstrace error - your solution worked, thankyou!

     

    And as regards the OP, I too had a problem with missing MFC libraries coming up with errors, the appropriate vcredist helped that too, so I am happy on both counts!

    Thursday, April 08, 2010 8:24 PM
  • Hi for the trace the command is

    sxstrace.exe Trace -Logfile:myfile.etl

    sxstrace.exe Parse -logfile:myfile.txt

     

    Mike

    Thursday, November 11, 2010 3:20 PM