Re: newbee: trouble w/ try{} catch{}

From: Vladimir_petter (vladp72_at_hotmail.com)
Date: 09/28/04


Date: Tue, 28 Sep 2004 11:17:37 -0700


"SteveK" <asasd@asdfasdfsd.com> wrote in message
> OK, so I have a crash that happens randomly and I have asked the people
> here
> to send me their logs when they crash, I have narrowed it down to one
> operation and I don't understand why it's happening. I just thought I
> could
> wrap it in a try/catch and handle it from there.

Using any kind of catch in that case is the last thing you should do because
in that way you will just masquerade problem for a while, but it will bite
you badly later on. There was a plenty of discussions on why catching SEH
exceptions in is a bad thing (unless you really know what you are doing).
What you should do is to let you process crash and collect minidump (make
sure you generate PDB files during build).
And a bit of advise: do not use catch(...) either it is broken on WIN32
platform and it is hard to fix it.
See
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=eD%24n1NTgDHA.632%40tk2msftngp13.phx.gbl&rnum=4&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF-8%26q%3Dcatch(...)%2BVladimir

A good source of information on how to work with dump files is WinDbg help
files:
http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx

Vladimir.



Relevant Pages

  • Re: MM2 crashing
    ... No error is the system logs, for the app events, security, or system. ... Let me take a min to explain the crash. ... When MM2 or Media Player or Notepad ... MM2 and Media player both lock up ...
    (microsoft.public.windowsxp.moviemaker)
  • Can anyone shed some insight on a system crash?
    ... We have crash 3 more times. ... There are messages in logs complaining about ... bad reads writes from some of the disks in CF7. ... Removing one of the FCAL controllers on the ATABeast apeared to fix the ...
    (comp.unix.solaris)
  • Re: PC locks up when on internet
    ... Application Event logs using Event Viewer (see help and support). ... the logs around the time of the crash. ... while processing the file 'Temporary Internet Files' on the volume ...
    (microsoft.public.windowsxp.general)
  • Re: Trans Log wächst und wächst bis platte voll ist!
    ... Transactions Logs nur um Logs zu haben. ... VOR dem Crash waren sich hier alle einig, dass es einen Datenverlust von max. 1 Tag geben kann. ... Und dann gibts noch die Datenbanken, die sowieso nur Nachts nach der ...
    (microsoft.public.de.sqlserver)
  • Re: IIS6 crash when ntbackup service starts (and other times too)
    ... Well...IISState caught the crash all right. ... Basically the cause of the crash was thread stack ... I had IISState running and was able to catch some logs. ...
    (microsoft.public.inetserver.iis)