views:

39

answers:

1

I've purchased a third party library that I am using from my application. My application references a small interop dll which in turn calls into another dll (non CLI) to do its thing. Since this library communicates with hardware, I'd image that this dll talks with various device drivers.

A typical method signature from the interop dll looks like this:

[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0xc9)]
public virtual extern void Send([MarshalAs(UnmanagedType.Struct)] ref object pVal);

I have all calls to this library wrapped in one large try catch(Exception). If anything goes wrong with sending I need to mark it as failed and move on. Unfortunately, my application will just randomly close with no exception. Is there anything I can do about that? These calls are already being made on a separate thread By using Task.Factory.StartNew(), but the whole application just quits. In addition to a local try catch, there is another one wrapped around the call to StartNew (I have a call to .Wait() just for debugging purposes). That catch doesn't fire either.

Right now I'm thinking the only solution is to create a separate program that simply waits for the other to close and then re-open it. Which sounds horrid...

A: 

Take a look at this blog you might be able to get a crash report and at leas see what call is failing and report it to your 3rd party developer.

rerun
Any post in particular? I'm not even getting a message from windows that my program has stopped responding/has crashed. It just goes away silently. Which makes me kind of think the dll is detecting an error condition and exiting the entire process instead of going the normal route.
colithium
She changed her blog around but there used to be a guide on how to get a crash dump and then analyze it using windbg
rerun