[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Get a crash dump for a windows service

Posted on 2007-11-30
4
Medium Priority
?
2,004 Views
Last Modified: 2012-06-22
Hello,

I have tried to get a crush dump file from a windows service made by me. The problem is that drwtsn32 cannot catch ethese crashes or it cannot make dump files for services. Could anyone tell me how should I do it?

Thank you
0
Comment
Question by:aureliuh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 40

Expert Comment

by:evilrix
ID: 20381228
Try using DebugDiag

http://www.microsoft.com/downloads/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&displaylang=en

The Debug Diagnostic Tool (DebugDiag) is designed to assist in troubleshooting issues such as hangs, slow performance, memory leaks or fragmentation, and crashes in any Win32 user-mode process. The tool includes additional debugging scripts focused on Internet Information Services (IIS) applications, web data access components, COM+ and related Microsoft technologies.
0
 
LVL 39

Expert Comment

by:itsmeandnobodyelse
ID: 20382226
You should add a interface to your service so that you can start it as a console prog from the command line.

At least you should add trace statements which let you narrow where the crash happens.

Regards, Alex
0
 
LVL 86

Accepted Solution

by:
jkr earned 2000 total points
ID: 20384419
You can use 'MiniDumpWriteDump()' (http://msdn2.microsoft.com/en-us/library/ms680360.aspx) to create your own crash dump. For an example on how to do that, see http://www.codeproject.com/tools/minidump.asp ("Own Crash Minidump with Call Stack"). Also check out http://support.microsoft.com/default.aspx?scid=kb%3ben-us%3b170738 ("Debugging a Windows NT Service")
0
 

Author Comment

by:aureliuh
ID: 20391759
Thank you very much JKR. I used you suggested minidump project. I had to make some modification regarding the implementention of the __try __except block, because I did not work with my service. I had to use a _set_se_translator in order to catch SEH exceptions

Thank you again.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your system is showing symptoms of browser hijacks or 'google search redirects' check out my other article (http://rdsrc.us/u3GP7A) first and run the tool TDSSKiller (http://rdsrc.us/GDBBs4) to get rid of the infection. Once done, and if the …
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question