views:

56

answers:

1

I have a Win32 C++ Application using a handful of third-Party DLLs that is installed at some hundred costumer machines. I recently tested the x86 Version of the installation successfully on Windows XP, Windows Vista x64, Windows 7 x86 as well as Windows Server 2008 x86. No Problems. The Installer (nullsoft) installs the redistributable files for VC 2005 and VC 2008 as both are required by different DLLs we use.

But with Windows Server 2008 x64 both, the x86 and the x64 Versions refuse to start. When i start the x86 Version of the program a Dialog appears:

<myApp> has stopped Working.

The EventLog contains a message:

Faulting application myapp.exe, version 1.0.0.0, time stamp 0x4bcb37ca, 
faulting module MSVCR80.dll, version 8.0.50727.4053, time stamp 0x4a594c79, 
exception code 0xc000000d, fault offset 0x0001ce0b, process id 0x29c, 
application start time 0x01cb0329976cfc68.

\Windows\winsxs contains a directory

x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4053_none_d08d7da0442a985d

Using sxstrace (first trace, then parse) a log file of 3 Bytes length is created containing non readable characters. Behavior of the x64 Version is similar. Also all demo programms from the 3rd Party Dlls are working properly. Any hint ?

+1  A: 

It doesn't look like a side-by-side error. The exception code is STATUS_INVALID_PARAMETER, "An invalid parameter was passed to a service or function." That doesn't help. You'll need a debugger, probably with the Windows debugging symbols. Make it stop on the first-chance exception.

Hans Passant
You were right: I copied WinDbg.exe to the machine together with the sources and a pdb file. I then was able to see, that the environment variable NUMBER_OF_PROCESSORS is not defined on this machine. My Application did not check the return value of getenv() and crashed dereferencing this NULL pointer. All that happened during initialization of global Objects and therefore before WinMain was even entered and before a log file was created. Thanks for the tip, using a debugger! I would not have come up with that in this case.
RED SOFT ADAIR