Beta 2 compiled executable throwing "The application failed to initialize properly (0xc0150002). Cli

G

Gustavo L. Fabro

Greetings!

I'm testing VS 2005 Beta 2, and I've compiled a program that
runs just fine on my computer (where VS is installed).

I've tried to run this same program on another computer
(after having installed MS .NET Framework 2.0 Beta 2 on it,
from
http://www.microsoft.com/downloads/...8F-287E-4C7E-9A4A-A4ECFF40FC8E&displaylang=en),
but got the following message:

"The application failed to initialize properly (0xc0150002). Click on Ok to
terminate the application".

Any clues as to what may be going on? Does this beta allows a program to be
tested on another computer or must I install VS 2005 Beta2 on it in order to
run my .EXE ?

Thanks

Fabro
 
C

Carl Daniel [VC++ MVP]

Gustavo said:
Greetings!

I'm testing VS 2005 Beta 2, and I've compiled a program that
runs just fine on my computer (where VS is installed).

I've tried to run this same program on another computer
(after having installed MS .NET Framework 2.0 Beta 2 on it,
from
http://www.microsoft.com/downloads/...8F-287E-4C7E-9A4A-A4ECFF40FC8E&displaylang=en),
but got the following message:

"The application failed to initialize properly (0xc0150002). Click on
Ok to terminate the application".

Any clues as to what may be going on? Does this beta allows a program
to be tested on another computer or must I install VS 2005 Beta2 on it in
order to run my .EXE ?

You should be able to run your app on another computer with .NET 2.0 beta 2
installed but without VS2005 beta 2 installed. If your application is a C++
application, make sure that you're deploying a release build as the other
machine won't have the debug versions of the C++ runtime library if it
doesn't have VS2005 installed.

-cd
 
G

Gustavo L. Fabro

Hi Carl,
You should be able to run your app on another computer with .NET 2.0 beta
2 installed but without VS2005 beta 2 installed. If your application is a
C++ application, make sure that you're deploying a release build as the
other machine won't have the debug versions of the C++ runtime library if
it doesn't have VS2005 installed.

It is a C++ application. And I'm deploying a release build.

I've even checked the executable with DEPENDS.EXE to check
for any msvcr80d.dll, msvcp80d.ll or msvcm80d.dll inadvertently
being linked but no, I only found release libraries.

Fabro
 
G

Gustavo L. Fabro

Hello everybody,
It is a C++ application. And I'm deploying a release build.

I've even checked the executable with DEPENDS.EXE to check
for any msvcr80d.dll, msvcp80d.ll or msvcm80d.dll inadvertently
being linked but no, I only found release libraries.

The email got kind of long but the question is simple. If you don't care to
read it in detail just skip to the final part.

I did further researching on my problem and I believe I'm starting to get to
the point.

I've run ntsd.exe under my app and got the following when the app was
loading:

Microsoft (R) Windows User-Mode Debugger Version 5.1.2600.0
Copyright (c) Microsoft Corporation. All rights reserved.

CommandLine: qicad.net.exe
Loaded dbghelp extension DLL
The call to LoadLibrary(ext) failed with error 2.
Please check your debugger configuration and/or network access
Loaded exts extension DLL
The call to LoadLibrary(uext) failed with error 2.
Please check your debugger configuration and/or network access
Loaded ntsdexts extension DLL
Symbol search path is: *** Invalid *** : Verify _NT_SYMBOL_PATH setting
Executable search path is:
ModLoad: 00400000 0054d000 image00400000
ModLoad: 7c900000 7c9b4000 ntdll.dll
ModLoad: 78800000 78840000 C:\WINDOWS\system32\mscoree.dll
ModLoad: 77f50000 77ffb000 C:\WINDOWS\system32\ADVAPI32.dll
ModLoad: 7c800000 7c8fe000 C:\WINDOWS\system32\KERNEL32.dll
ModLoad: 77db0000 77e41000 C:\WINDOWS\system32\RPCRT4.dll
ModLoad: 77d20000 77db0000 C:\WINDOWS\system32\USER32.dll
ModLoad: 77e50000 77e96000 C:\WINDOWS\system32\GDI32.dll
ModLoad: 10000000 1005e000 C:\Fontes\QiCAD.NETR\QIVLibrary.dll
ModLoad: 7c9c0000 7d1db000 C:\WINDOWS\system32\SHELL32.dll
ModLoad: 77bf0000 77c48000 C:\WINDOWS\system32\msvcrt.dll
ModLoad: 77ea0000 77f16000 C:\WINDOWS\system32\SHLWAPI.dll
ModLoad: 72fb0000 72fd6000 C:\WINDOWS\system32\WINSPOOL.DRV
ModLoad: 76380000 763c8000 C:\WINDOWS\system32\comdlg32.dll
ModLoad: 5d510000 5d5a7000 C:\WINDOWS\system32\COMCTL32.dll
ModLoad: 7c370000 7c409000
C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1
e18e3b_8.0.50215.4652_x-ww_b7aeacd4\MSVCR80.dll
ModLoad: 7c420000 7c4a5000
C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1
e18e3b_8.0.50215.4652_x-ww_b7aeacd4\MSVCP80.dll
ModLoad: 00370000 003be000 C:\Fontes\QiCAD.NETR\QIVPersistence.dll
ModLoad: 00550000 0079e000 C:\Fontes\QiCAD.NETR\QIVRebar.dll
LDR: LdrpWalkImportDescriptor() failed to probe
C:\Fontes\QiCAD.NETR\QIVRebar.dl
l for its manifest, ntstatus 0xc0150002

Here the mencioned error message pops up. After that,

Unknown exception - code c0150002 (first chance)
Unknown exception - code c0150002 (!!! second chance !!!)
eax=0012fc54 ebx=00000000 ecx=0012fc80 edx=7c90eb94 esi=7ffdf000
edi=c0150002
eip=7c964ed1 esp=0012fc54 ebp=0012fca4 iopl=0 nv up ei pl zr na po
nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000
efl=00000246
*** ERROR: Symbol file could not be found. Defaulted to export symbols for
ntdl
l.dll -
ntdll!RtlRaiseStatus+26:
7c964ed1 c9 leave
0:000>

Hmmmm it appears QIVRebar.dll doesn't have a manifest. But the "embed
manifest" option is set to true!!

I decided to take a look at Windows Event Log too, and voila, some more
informative messages were there. The messages were localized so I translated
them here, it may not be exactly the same:

Source: SideByside
Id: 32

"Couldn't find dependent Assembly Microsoft.VC80.DebugCRT. The last error
was 'The assembly referenced here is not installed on the system'"

Before it :

Source: SideBySide
Id: 59

Fail in "Resolve Partial Assembly" for Microsoft.VC80.DebugCRT. Reference
error message: The assembly referenced here is not installed on the system.

and before that

Source: SideBySide
Id: 59
Fail on Generate Activation Context to
C:\Fontes\QiCAD.NETR\QIVRebar.dll. Reference error message: Operation
finished succesfully.

Hmmm... "Microsoft.VC80.DebugCRT"? This is a release mode application, it
shouldn't be requesting the debug CRT. I decided to check the offending
DLL's .manifest.intermediate file (the one that gets embedded into the DLL)
under the OBJs Intermediate Directory and got this!:

<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC80.DebugCRT'
version='8.0.50215.4652' processorArchitecture='x86'
publicKeyToken='1fc8b3b9a1e18e3b' />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC80.CRT'
version='8.0.50215.4652' processorArchitecture='x86'
publicKeyToken='1fc8b3b9a1e18e3b' />
</dependentAssembly>
</dependency>
</assembly>

Now here is the problem, I guess. The DLL is requesting both DebugCRT and
the CRT. Since the installed framework in the target computer doesn't
include the debug CRT, things fail. Am I right?

Now, how do I tell this DLL not to use the debug CRT?? I'm linking with /MD,
not /MDd. Why would it be putting the Debug CRT dependency there?

Fabro
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top