Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 226809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:32:46+00:00 2026-05-11T19:32:46+00:00

My application generally running on 10-20 threads and these threads sending events to the

  • 0

My application generally running on 10-20 threads and these threads sending events to the GUI to the update certain controls almost every seconds.

When the user close the application middle of these, all updates related with these events causes several random crashes. Mostly ObjectDisposedException and NullReferenceException.

Since the events already thrown but not handled yet by the .NET Framework, they are not in a state where I can cancel them.

I’m not quite sure about the best way to handle this. Currently I’m just swallowing exceptions the exceptions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T19:32:46+00:00Added an answer on May 11, 2026 at 7:32 pm

    A few options:

    • when the app starts closing (FormClosing?), you could start cleanly exiting the threads (via a flag somewhere)
    • presumably to talk to your UI, you are raising events that are handled by the UI (which handles synchronization etc) – keep a flag, and (if it is safe to do do) simply drop events if the flag has been set (again, because you are exiting)
    • when exiting, have the UI unsubscribe from events
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When a PHP application makes a database connection it of course generally needs to
My Question: Performance tests are generally done after an application is integrated with various
When writing application code, it's generally accepted that premature micro -optimization is evil, and
i'm building a ws with tomcat and jax-ws. when i stop my application, generally
I'm running an application (firefox) and I would like to know if it's possible
I am running a C# application, and during run-time I get the following error:
I have a website application running in it's own application pool on IIS 7.0.
I have a navigation controller based application and I'm running into a strange issue
What would be the best way to live stream audio from an application running
Helloes good people of Stack Overflow, I have a .NET client-server application running with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.