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
ttc - 09 Dec 2007 13:11 GMT
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.
> Hello,
>
[quoted text clipped - 11 lines]
> Thanks in advance,
> Ramendra
Ben Voigt [C++ MVP] - 16 Jan 2008 16:06 GMT
> Hello,
>
[quoted text clipped - 3 lines]
> 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
Do a non-invasive attach, maybe even kernel debug.
> sometimes there are entries in EventLog (Fatal Engine Error or
> Faulting module trying to access invalid memory location, etc.). But
[quoted text clipped - 4 lines]
> Thanks in advance,
> Ramendra