Re: Windows service crash



Hi Ramendra

Have you tried to build a debug version of your service and try to attach to it?

The reason of crashing could be anything (OutOfMemory, stackoverflow, etcc) and anywhere (Managed and/or nonmanaged - null pointer exception, gp faul etc..). Even if you can attach it to the process and the crash happens randomly, it is still difficult to find out why it is crashing.

I guess you will need to isolate where your program crashes, at managed code or unmanaged code level. Then perhap it will be easier to go from there. A good start would be to wrap try and catch in all places that you susspect the crash might happen.



<ramendra.kotharkar@xxxxxxxxx> wrote in message news:7fc1bf69-dd90-4e8c-86e2-f39274df2f3b@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello,

I have a windows service developed using .Net VS2005 which makes call
to some unmanaged dll (for image processing related tasks). The
service often crashes after running continuously for 1 hour or so. We
tried to attached a debugger but couldn:t debug since we get Access
Violation the moment we try to attach a debugger. Whenever it crashes
sometimes there are entries in EventLog (Fatal Engine Error or
Faulting module trying to access invalid memory location, etc.). But
sometimes there are no logs in event viewer.

Help is greatly appreciated...

Thanks in advance,
Ramendra

.



Relevant Pages

  • Re: Program crashes when running it outside dev environment
    ... If I try to launch the debug on the ... crashing program, it'll close before the debugger opens. ... If it just fails strangely and sometimes inside system functions it might be overwritten memory or some such problem. ... Put one of those lines immediately before the line that crashes the program. ...
    (comp.lang.c)
  • Strange debugger behavior
    ... A second window opens up as it crashes, and it's a second debug window with ... How can I tell where my program is crashing? ...
    (comp.sys.mac.programmer.codewarrior)
  • Re: Program crashes when running it outside dev environment
    ... by the fact it only crashes when run -outside- the dev - as an exe, ... If I try to launch the debug on the ... crashing program, it'll close before the debugger opens. ...
    (comp.lang.c)
  • RE: Debugging Classic ASP with VS2008+SP1 = crash!
    ... I attach to the w3wp.exe process and when stopping debugging VS2008 crashes. ... To debug, I follow these steps: ...
    (microsoft.public.vsnet.debugging)
  • RE: Debugging Classic ASP with VS2008+SP1 = crash!
    ... I attach to the w3wp.exe process and when stopping debugging VS2008 crashes. ... To debug, I follow these steps: ...
    (microsoft.public.vsnet.debugging)

Quantcast