G
Guest
I have a C# application that consists of a Form and a seperate Engine class. The engine class is run in multiple worker threads and does all the work for the application. When the work that it is doing results in information the user should see, a message is placed in a queue that the Form monitors in order to receive this information and display it.
When the Form receives information to display, it calls Control.Invoke to be sure the updating of the GUI is handled in the main UI thread. After the call to Invoke, the Form goes back to monitoring the queue for additional information to display.
My application typically needs to run for many hours at a time. Typical GUI updates from each piece of data on the GUI happen 10 times per minute. So each of the GUI areas is typically updated every 6 seconds. When my application starts, all of my GUI areas update as expected. However, after a period of time (30-90 minutes) my GUI stops updating.
The cause is that a call to Control.Invoke has blocked (as it is supposed to do) and it has never returned. This is easily verified in the debugger in the IDE.
What would cause the Control.Invoke call to black and never return? Does anyone has any experience with this?
Thank you for your help.
When the Form receives information to display, it calls Control.Invoke to be sure the updating of the GUI is handled in the main UI thread. After the call to Invoke, the Form goes back to monitoring the queue for additional information to display.
My application typically needs to run for many hours at a time. Typical GUI updates from each piece of data on the GUI happen 10 times per minute. So each of the GUI areas is typically updated every 6 seconds. When my application starts, all of my GUI areas update as expected. However, after a period of time (30-90 minutes) my GUI stops updating.
The cause is that a call to Control.Invoke has blocked (as it is supposed to do) and it has never returned. This is easily verified in the debugger in the IDE.
What would cause the Control.Invoke call to black and never return? Does anyone has any experience with this?
Thank you for your help.