Application just vanishes without any warning....

  • Thread starter Thread starter cj
  • Start date Start date
C

cj

Normally, a dotNET application will throw an exception when something
goes wrong, and the exception can be caught easily and reported to the
user. However, users have been reporting that our application just
simply vanishes without any warning. No exception seems to be thrown,
otherwise it would have been caught.

It is also seemingly undeterministic, making it really hard for us to
find out the cause of the problem. If the application has used up its
memory allocation, then we would at least get an OutOfMemoryException
or something of the sort.

Suggestions anyone?
 
Normally, a dotNET application will throw an exception when something
goes wrong, and the exception can be caught easily and reported to the
user. However, users have been reporting that our application just
simply vanishes without any warning. No exception seems to be thrown,
otherwise it would have been caught.
Suggestions anyone?

I can see two things that could cause this behaviour:
- You are swalowing exceptions somewhere with something like:
try
{
// some code
}
catch {}

- You are handling the Application.ThreadException and
AppDomain.UnhandeldException events and swallowing the exceptions

Try to find out where you are swallowing exception and where this could
cause your application to die silently. This would be a beginning.
 
Thanks, I will have a look at that, however, from what our users have
described, there are no signs of the application exiting (i.e.
flickering from forms closing) from an Application.Exit() call. The
way it was described sounded more like Environment.Exit() was called,
immediate killing of the process. We don't have any Environment.Exit
calls preceding Application.Exit calls (although it could probably be
argued that Environment.Exit should'nt even be used?).

Even if exceptions were swallowed, it seems like code execution would
at some point in time reach an Application.Exit call.
 
I've been looking at using WinDbg to log all exceptions that my
application generates and spit out the stacktrace, so that we might
have a chance of pinpointing the cause of the vanishing problem.

Does anyone know a way of setting WinDbg to do this everytime an
exception occurs? Right now you have to have to type in "!sxe clr" to
get it to break on exceptions, and when it actually does, type
!clrStack -all, to get the stack trace information.

It would be great if it just did this automatically then we could just
examine the most recent stacktrace once the application vanishes.
 
We have been dealing with that exact scenario in an application that we've
developed: With no discernable pattern, the program just “disappearsâ€. I
have a case opened with Microsoft Support and they have been examining debug
dump files for a few weeks now, but have not determined the cause. They DO
know that it is a memory heap corruption that is occurring (apparently in the
GC), but don’t know what is causing it.

I can’t believe that I have found someone else experiencing this problem!
 
I'm experiencing this same problem.

I suspect that it has something to do with the fact that my code is
multithreaded and I am making calls updating the UI but ONLY through Invoke.
It was my understanding that updating things like progress bars or even
displaying images is OK with forked threads as long as it's done through the
Invoke method. I await enlightenment.

Thanks,

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top