views:

65

answers:

1

Hi all, I have a Windows service that is written in C++ using VS2008. I now want to debug that service remotely on my Windows Server 2008R2. But when I start the service I get an application error saying:

Faulting application name: MyService.exe, version: 1.99.96.0, time stamp: 0x4c87cf49 Faulting module name: MSVCR90.dll, version: 9.0.30729.4926, time stamp: 0x4a1743c1 Exception code: 0xc0000417 Fault offset: 0x0006c955 Faulting process id: 0x1c08 Faulting application start time: 0x01cb4f7fd91b5804 Faulting application path: C:\Services\MyService.exe Faulting module path: C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4926_none_508ed732bcbc0e5a\MSVCR90.dll Report Id: 171b562c-bb73-11df-81e0-003048788541

When I start the same service in release build everything is fine. The service is build against Microsoft.VC90.CRT version 9.0.21022.8 and I have an embedded manifest.

What I figured out so far is that as I also have VS2010 installed on my development machine I do have 9.0.30729.4974 redist installed. And the W2k8 server does have the required x.x.x.4926 installed. But there is no debug version of x.x.x.4926 on the server so I think that might be the problem. Maybe something about missing symbols?

Does anyone have an idea? I'm kind of desperate as I really need to debug my service for checking an severe error.

Greets, Simon

+1  A: 
// MessageText:
//
// An invalid parameter was passed to a C runtime function.
//
#define STATUS_INVALID_CRUNTIME_PARAMETER ((NTSTATUS)0xC0000417L)

This has nothing to do with the CRT deployment, although it is mysterious that you got the debug build deployed. The code is simply crashing on a runtime error, raised by the _invalid_parameter() function. Which is called when a CRT function detects a critical problem with one of its arguments.

The fact that it doesn't happen in the Release build is no consolation, the Debug build is especially booby-trapped to cause errors like these so you don't have problems with a Release build that occasionally crashes.

You'll need a debugger, it automatically breaks just before it goes kaboom.

Hans Passant
Ok, I could figure it out, thanks a lot. My app crashed when accessing the log4cxx.dll and I forgot to deploy the debug version of it. unfortunately the app started without complaining about the missing debug dll...
Simon Linder