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 4041438
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:52:50+00:00 2026-05-20T12:52:50+00:00

I have a really weird problem with background worker. Code is too complicated so

  • 0

I have a really weird problem with background worker. Code is too complicated so will try and explain the problem just want to know if anyone has seen something similar.
We have the UI thread spinning off a background thread
The background thread does some printing to a pdf printer in the background
When finished it just dies as in the thread function exits and so I expect the runworkercompleted event to be raised

this is win forms .NET 2.0

So every time we do a fresh install of the product and fire up our app the runworkercompleted even is not getting fired
if we kill our app from task manager and start over it works like a charm ( naturaly we are a little concerned that the first thing a user sees with our product is a hang 🙂 )

Logging has confirmed that in every case
i) The background worker thread function does exit cleanly
ii) No exceptions are raised in said thread func

This is 100% reproable on two machine one a win7 and one Vista Sp1. its really, I cannot understand what the first time run has to do with it

Any suggestions welcome

  • 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-20T12:52:51+00:00Added an answer on May 20, 2026 at 12:52 pm

    I was having this problem when I realized that I was disposing of my BackgroundWorker object and detaching the event handlers too early before the async execution could complete. Look in your code and ensure that you are not surrounding your BackgroundWorker with a using block or specifically calling dispose or otherwise disconnecting your event handlers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this really weird problem in my code (.Net Framework 3.5). So, in
I have a really weird problem with Xcode 3.2.5 In a normal code sequence
This is a really weird problem that I have been having. When I download
I have some really complicated legacy code I've been working on that crashes when
ive got a really weird problem. i have no clue why its not working.
We have this really weird problem in a Web Application when using ActiveRecord 2.0
IDE = VS7 or 2002 Hi all, I have a really weird problem here.
This is the second time that I have this really weird problem with WCF
Okay, I have a really weird problem. When switching over to a different XIB,
I have a really weird WCF problem here... We're connecting to a crappy third-party

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.