?
Solved

Get a crash dump for a windows service

Posted on 2007-11-30
4
Medium Priority
?
2,002 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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

Migration of Exchange mailbox can be done with the ExProfre.exe tool. But at times, when the ExProfre.exe tool migrates the Exchange Server user profile, it results in numerous synchronization problems. Synchronization error messages appear in the e…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

800 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