4
votes

I have a log and a try catch in this console app, but does not seem to get that far.

Works fine on my dev machine, does not on Win Server 2008. Event viewer has the same info as below.

I understand there's not much to go on here, but that's what I know. All prev deployments worked, so I'm at a loss.

Please don't close, and help me solve this problem. I will answer any questions I can.

Thanks.

Description:
  Stopped working

Problem signature:
  Problem Event Name:   APPCRASH
  Application Name: LoaderLive.exe
  Application Version:  2.0.1.0
  Application Timestamp:    4ef176d6
  Fault Module Name:    KERNELBASE.dll
  Fault Module Version: 6.1.7601.17651
  Fault Module Timestamp:   4e211319
  Exception Code:   e0434f4d
  Exception Offset: 0000b9bc
  OS Version:   6.1.7601.2.1.0.272.7
  Locale ID:    1033

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt
1
It bombed on an unhandled managed exception. Implement an event handler for the AppDomain.CurrentDomain.UnhandledException event and log or display the value of e.ExceptionObject.ToString()Hans Passant
Could be exceptions not passing thru thread boundaries. Add a handler to "program.cs" for AppDomain.CurrentDomain.UnhandledException, get it to log.Tony Hopkinson
Ah you've had that fella too @Hans Passant.Tony Hopkinson
Thanks Hans, that gave me an error. (I should know this - duh!). Looks like it's a COM error. Post your comment as an answer & i will give you the credit.Eric Schneider

1 Answers

3
votes

If you have a top-level try/catch and it's not catching the exception, it might be because the fault is occurring at a very low level (e.g. somewhere in a native code library), too early (before your Main even starts), or on another thread (where your try/catch can't "reach").

To find out what is going on, run the application under a debugger. If you have Visual Studio installed on the target machine, you can do it from there (open the EXE and "Start Debugging"). If not, you can use windbg.exe / cdb.exe (available as Debugging Tools for Windows in the Windows SDK). Within the debugger, you should be able to see where the fault occurs, as it will by default stop on any fatal exception.