visual studio 2010 - builduing on windows 7 running on windows 2008: Unable to initialize application 0xc0000005. Using a reference to a Wrapper on C# library -


i building c++/mfc (i know it's old technology, need maintain it) under vs2010 , windows 7 (x86). running application under windows 2008 r2 (x64) fine, application start success.
but when trying run application under windows 2008 (x86) or windows server 2003 fails, i'm getting same error on both systems : "the application failed initialize (0xc0000005). click ok close application".

it looks stange me since app built under x86 system runs on built system (win7 x86) , on x64 system !
, secondly mean exception code 0xc0000005?
any tips find missing in x86 systems make application unstartable?

here log windbg:

microsoft (r) windows debugger version 6.11.0001.404 x86 copyright (c) microsoft corporation. rights reserved.  commandline: "c:\documents , settings\administrator\desktop\bintest\c****.exe" symbol search path is: *** invalid *** **************************************************************************** * symbol loading may unreliable without symbol search path.           * * use .symfix have debugger choose symbol path.                   * * after setting symbol path, use .reload refresh symbol locations. * **************************************************************************** executable search path is:  modload: 00400000 00581000   c*******.exe modload: 7c800000 7c8c2000   ntdll.dll modload: 77e40000 77f43000   c:\windows\system32\kernel32.dll modload: 77b90000 77b98000   c:\windows\system32\version.dll modload: 77ba0000 77bfa000   c:\windows\system32\msvcrt.dll modload: 10000000 1001a000   c:\documents , settings\administrator\desktop\bintest\s*****************.dll modload: 79000000 79046000   c:\windows\system32\mscoree.dll modload: 78aa0000 78b5d000   c:\documents , settings\administrator\desktop\bintest\msvcr100.dll modload: 78050000 780b9000   c:\documents , settings\administrator\desktop\bintest\msvcp100.dll modload: 003a0000 003c0000   c:\documents , settings\administrator\desktop\bintest\r*********.dll modload: 003d0000 003d8000   c:\documents , settings\administrator\desktop\bintest\ch*****.dll modload: 78520000 785c3000   c:\windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375\msvcr90.dll modload: 78b60000 78f8c000   c:\documents , settings\administrator\desktop\bintest\mfc100.dll modload: 77380000 77412000   c:\windows\system32\user32.dll modload: 77c00000 77c49000   c:\windows\system32\gdi32.dll modload: 77f50000 77fec000   c:\windows\system32\advapi32.dll modload: 77c50000 77cef000   c:\windows\system32\rpcrt4.dll modload: 77da0000 77df2000   c:\windows\system32\shlwapi.dll modload: 77530000 775c7000   c:\windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.3790.2778_x-ww_497c098c\comctl32.dll modload: 76280000 76285000   c:\windows\system32\msimg32.dll modload: 7c8d0000 7d0d4000   c:\windows\system32\shell32.dll modload: 77670000 777a4000   c:\windows\system32\ole32.dll modload: 77d00000 77d8c000   c:\windows\system32\oleaut32.dll modload: 71bb0000 71bb9000   c:\windows\system32\wsock32.dll modload: 71c00000 71c17000   c:\windows\system32\ws2_32.dll modload: 71bf0000 71bf8000   c:\windows\system32\ws2help.dll modload: 6d580000 6d628000   c:\windows\system32\dbghelp.dll modload: 76cf0000 76d0a000   c:\windows\system32\iphlpapi.dll modload: 76b70000 76b7b000   c:\windows\system32\psapi.dll (87c.135c): break instruction exception - code 80000003 (first chance) eax=76c00000 ebx=7ffda000 ecx=00000003 edx=00000008 esi=7c88be14 edi=00151f38 eip=7c822577 esp=0012fb70 ebp=0012fcb4 iopl=0         nv ei pl nz na po nc cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202 *** warning: symbols timestamp wrong 0x49901641 0x45d70ad8 ntdll.dll *** error: symbol file not found.  defaulted export symbols ntdll.dll -  ntdll!rtlmultibytetounicoden+0x6002: 7c822577 cc              int     3 0:000> g (87c.135c): access violation - code c0000005 (first chance) first chance exceptions reported before exception handling. exception may expected , handled. eax=00000000 ebx=77fc2324 ecx=fffffffc edx=00000000 esi=77fc2320 edi=00000004 eip=7c8396f0 esp=0012f030 ebp=0012f058 iopl=0         nv ei pl zr na pe nc cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010246 ntdll!strnicmp+0x22b: 7c8396f0 8b5014          mov     edx,dword ptr [eax+14h] ds:0023:00000014=???????? *** error: symbol file not found.  defaulted export symbols c:\windows\system32\advapi32.dll -  *** error: symbol file not found.  defaulted export symbols c:\windows\system32\mscoree.dll -  



*next step: removing dependencies in project.
project has dependency on c++ project (r
**.dll) wrapper c# library. when remove dependency program works (at least starts normally).
how can link dll's (wrapper , c#)?
is releated manifest?
any idea?
here manifest of app

<?xml version="1.0" encoding="utf-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestversion="1.0">  <assemblyidentity      version="1.0.0.0"      processorarchitecture="x86"      name="microsoft.windows.c****"     type="win32"  />  <description></description>  <dependency>      <dependentassembly>          <assemblyidentity              type="win32"              name="microsoft.windows.common-controls"              version="6.0.0.0"              processorarchitecture="x86"              publickeytoken="6595b64144ccf1df"              language="*"          />      </dependentassembly>  </dependency>  </assembly> 

it seems root cause of problem conflict between 2 versions of c++ runtime libraries.

your application compiled visual studio 2010, requires version 10 of c++ runtime, depends on c++ project loads version 2 of .net clr. version of clr, in turn, requires version 9 of c++ runtime. since 1 version of runtime can loaded given process, chaos ensues.

the easy way out either build application visual studio 2008, or modify dependent project targets version 4 of .net clr. way, both modules agree on version of c++ runtime load.

the hard way split application 2 processes: 1 loads dependent project , 1 contains application proper, , use form of ipc communicate between them. way, each process able load own version of c++ runtime.


Comments