473,503 Members | 5,284 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

capturing crash

cs
How can I capture the events leading to my windows application crashing?
would a big try catch around the Application.Run() do the job? in my head
that launches a thread and if that thread crashes somehow my try catch wont
do crap, maybe im wrong.
So what do you guys do to capture a possible application crash?
Nov 15 '05 #1
4 1965
It won't catch your unhandled exceptions. But you can do something like
this:
MyExceptionHandler handler = new MyExceptionHandler();

Application.ThreadException += new ThreadExceptionEventHandler(handler
..Application_UnhandledException);

Application.Run( new Form1());

And in MyExceptionHandler just create a method with this signature:
public void Application_UnhandledException(object sender,
ThreadExceptionEventArgs e)
HTH,
/m

"cs" <[rem]casolorz[rem]@hot[rem]mail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
How can I capture the events leading to my windows application crashing?
would a big try catch around the Application.Run() do the job? in my head
that launches a thread and if that thread crashes somehow my try catch wont do crap, maybe im wrong.
So what do you guys do to capture a possible application crash?

Nov 15 '05 #2
thank you very much, that is exactly what I was looking for.

"Muscha" <mu****@no.spam.net> wrote in message
news:et**************@TK2MSFTNGP09.phx.gbl...
It won't catch your unhandled exceptions. But you can do something like
this:
MyExceptionHandler handler = new MyExceptionHandler();

Application.ThreadException += new ThreadExceptionEventHandler(handler
.Application_UnhandledException);

Application.Run( new Form1());

And in MyExceptionHandler just create a method with this signature:
public void Application_UnhandledException(object sender,
ThreadExceptionEventArgs e)
HTH,
/m

"cs" <[rem]casolorz[rem]@hot[rem]mail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
How can I capture the events leading to my windows application crashing?
would a big try catch around the Application.Run() do the job? in my head that launches a thread and if that thread crashes somehow my try catch

wont
do crap, maybe im wrong.
So what do you guys do to capture a possible application crash?


Nov 15 '05 #3
If you have a VisualStudio IDE then a simple way is

Attach the VisualStudio debugger to your application. And after that select
Debug->Exceptions (Ctrl+Alt+E). Then you can
select from a range of exceptions that you would want the debugger to
track. And every time an exception is thrown and if it is the type you are
interested then the debbuger will break at the point where the exception is
being thrown. If you are not sure about what exception to capture you can
"check" the top level "Common Language Runtime Exceptions" and your
debugger will break for all the exceptions that are encountered.

--------------------
From: "cs" <[rem]casolorz[rem]@hot[rem]mail.com>
Subject: capturing crash
Date: Tue, 4 Nov 2003 16:33:25 -0600
Lines: 7
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#V**************@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.csharp
NNTP-Posting-Host: ppp-67-64-23-92.dsl.wchtks.swbell.net 67.64.23.92
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:196751
X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

How can I capture the events leading to my windows application crashing?
would a big try catch around the Application.Run() do the job? in my head
that launches a thread and if that thread crashes somehow my try catch wont
do crap, maybe im wrong.
So what do you guys do to capture a possible application crash?

Rakesh, EFT.

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Nov 15 '05 #4
thanks but I actually wanted to capture these exceptions on product rather
than on development.

"Rakesh Namineni[MSFT]" <ra******@online.microsoft.com> wrote in message
news:wg**************@cpmsftngxa06.phx.gbl...
If you have a VisualStudio IDE then a simple way is

Attach the VisualStudio debugger to your application. And after that select Debug->Exceptions (Ctrl+Alt+E). Then you can
select from a range of exceptions that you would want the debugger to
track. And every time an exception is thrown and if it is the type you are
interested then the debbuger will break at the point where the exception is being thrown. If you are not sure about what exception to capture you can
"check" the top level "Common Language Runtime Exceptions" and your
debugger will break for all the exceptions that are encountered.

--------------------
From: "cs" <[rem]casolorz[rem]@hot[rem]mail.com>
Subject: capturing crash
Date: Tue, 4 Nov 2003 16:33:25 -0600
Lines: 7
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#V**************@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.csharp
NNTP-Posting-Host: ppp-67-64-23-92.dsl.wchtks.swbell.net 67.64.23.92
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:196751X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

How can I capture the events leading to my windows application crashing?
would a big try catch around the Application.Run() do the job? in my head
that launches a thread and if that thread crashes somehow my try catch wontdo crap, maybe im wrong.
So what do you guys do to capture a possible application crash?


Rakesh, EFT.

This posting is provided "AS IS" with no warranties, and confers no

rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
7027
by: Tony Gahlinger | last post by:
I'm using my browser (Mozilla/5.0 Linux i686 Gecko/20031007 Firebird/0.7) to do some client-side image processing. I want to capture the sequence of coordinates a user clicks on in xxx.jpg in the...
4
11972
by: Jay Xx | last post by:
I have an IFrame in design mode. I've tried a bunch of things to capture key presses in that IFrame, but I can't seem to get it. I can capture key presses outside the IFrame fine. I have this...
33
5554
by: Joerg Schuster | last post by:
Hello, Python regular expressions must not have more than 100 capturing groups. The source code responsible for this reads as follows: # XXX: <fl> get rid of this limitation! if...
14
2513
by: Brent Burkart | last post by:
I am trying to capture the Windows Authenticated username, but I want to be able to capture the login name that exists in IIS, not Windows. In order to enter my company's intranet through the...
17
4299
by: Lauren Wilson | last post by:
Does anyone know if it is possible to capture FTP responses to various FTP commands when managing an FTP session from a VBA procedure? For example, if we try to login to an FTP server and the...
2
2677
by: Stampede | last post by:
Hi guys & girls, I would like to write some kind of "Head-Tracking-Software", which uses a WebCam to react to the movement of the head of the person sitting in front of the monitor. I searched...
6
2251
by: Ed Leafe | last post by:
I've been approached by a local business that has been advised that they need to start capturing and archiving their instant messaging in order to comply with Sarbanes-Oxley. The company is largely...
2
2807
by: GS | last post by:
How can one avoid capturing leading empty or blank lines? the data I deal with look like this "will be paid on the dates you specified. xyz supplier amount: $100.52 when: September 07,...
0
7194
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7070
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7267
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5566
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4993
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
372
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.