My application, usually running on 10-20 threads, and these threads sending events to the GUI for updates are monitored almost every second.
When the user closes the application in the middle, all updates related to these events cause several random crashes. Mostly ObjectDisposedExceptionand NullReferenceException.
Since events that have already been processed by the .NET Framework but have not yet been processed, they are not in a state where I can cancel them.
I'm not quite sure of a better way to handle this. Currently, I just swallow exceptions, exceptions.
source
share