Reputation: 411
I have a 32-bit windows .exe. Which will run as windows service. This .exe runs fine as servics for window 2000/xp 32-bit version.
However when try to run on 64-bit windows 2008 server it crash. I am observing two cases.
1) If I build the application on VC++ 6. From Event log entry it seems to Kernel.dll is crashing.
Faulting application name: , version: , time stamp: 0x4e6461c0 Faulting module name: KERNELBASE.dll, version: 6.1.7600.16385, time stamp: 0x4a5bdbdf Exception code: 0xe06d7363 Fault offset: 0x0000b727 Faulting process id: 0xe2c Faulting application start time: 0x01cc83cb1052e4b3 Faulting application path: C:\Program Files (x86)\\\Admin.exe Faulting module path: C:\Windows\syswow64\KERNELBASE.dll Report Id: 4e0693b4-efbe-11e0-a07f-001143e8bb9d
2) If I build the application with VS2005 32 bit, A run time error displayed and Event log says msvscrt.dll is crashed.
Faulting application name: , version: , Faulting module name: MSVCR80.dll, version: 8.0.50727.4927, time stamp: 0x4a2752ff Exception code: 0x40000015 Fault offset: 0x000046b4 Faulting process id: 0x34c Faulting application start time: 0x01cc8c4f2a223426 Faulting application path: C:\Program Files (x86)\\\Admin.exe Faulting module path: C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4927_none_d08a205e442db5b5\MSVCR80.dll Report Id: 69554d57-f842-11e0-a07f-001143e8bb9d
Please help me out resolve this issue.
Upvotes: 0
Views: 8025
Reputation: 52117
You need to diagnose the problem better before you can solve it, which probably means finding a way to reproduce it while program is executing under the debugger. Some suggestions:
Since your service is EXE (and not DLL that runs under svchost.exe, which is a generic host process name for services that run from DLLs), you should be able to use "Attach to Process" option in Visual Studio to attach the debugger to it. You might need to start the Visual Studio as administrator and/or change the user under which the service executes to be able to do that.
Also, if the service crashes soon after starting, you might need to call MessageBox
with MB_SERVICE_NOTIFICATION
to pause execution long enough so you can attach the debugger.
However, if the service crashes during startup before it even reaches the MessageBox
, you need to
build it as console application. Now you can actually start it under the debugger and see what is going on.
Upvotes: 1
Reputation: 7964
Can you please try installing redistributable package on client machine to run your application.
Upvotes: 0