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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T17:26:04+00:00 2026-05-19T17:26:04+00:00

I have an C# application by which I configure the parameters of an Ethernet

  • 0

I have an C# application by which I configure the parameters of an Ethernet camera. The camera acts as a server and the application acts as client.

There are 2 sockets for communication, one for data/command communication – data socket(2 way communication) and another socket for image, the camera sends the image via the image socket(one way communication). The camera will send the image via image socket whenever a hardware trigger is given to it(not predictable when the hardware trigger would come).

The user can configure the camera by changing the values in the GUI. When user changes a parameter, the applications sends the command and the data to camera via the command socket and waits for response(Receive timeout is 5 sec). The camera receives the command and sends the response back. The GUI receives it updates the user that its successfully updated.

I have put the image socket in the background worker.An infinite while loop inside it keeps polling for image in image socket and whenever the image is received, it is displayed in GUI(I use a delegate to do that). All is well 🙂

Now, when a trigger has come to camera, it would send the image. At the same instant the user changes a parameter, the application sends the command/data and waits for response. The camera will receive the command only after sending the image completely. What happens is that the backgroundworker(that receives the image)is not running when the application is waiting for the response for the command. So, UI is waiting for response in command socket and camera is sending image in image socket and UI does not receive the image as background worker is not running. It becomes a deadlock and timeout(5 sec) happens at the command socket :(.

Why is the backgroundworker not running when the socket is waiting for timeout?
I replaced the background worker with thread and I set the priority as highest. The error (timeout) frequency has come down, but the same problem happens occasionaly. Can any of you guys help me sort this and help me understand the problem.

Thanks,
Vishnu

  • 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-19T17:26:05+00:00Added an answer on May 19, 2026 at 5:26 pm

    I would suggest you make sure that the delegate used to refresh the image from the background worker is called asynchronously (using BeginInvoke). Synchronous invocation may cause interlocking.

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

Sidebar

Related Questions

I have an application which is receiving data for thousands (say 50,000) subjects. Each
I have a application which handles picture chosen from gallery. But there is a
Currently I have one application in which I am able to access .mdb or
I have a cakePHP application that is pulling data from two different databases, which
I have a C++ application which has written for years. There are a lot
I have a flex application which is configured with blazeds sever and i am
I have application which uses Sherlock ActionBar package. The application uses platform-specific behavior for
I have application which needs to use a dll (also written by me) which
I have an application which uses the microsoft kinect device. The thing is that
I have an application which logs in into a webservice. I start a new

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.