I have a GUI application that connects to a sensor, collects data and processes it in the background using BackgroundWorker threads.
In its current form, I'm sending data to a graphical interface using ProgressChanged , which seemed to work well for a start. Since then I have increased the data transfer rate and discovered a problem; if the software remains to work for several minutes, the processor usage increases until it reaches about 100% on both cores on my machine, and at this moment I get an error message:
Remote Debugging Assistant "DisconnectedContext" has encountered a problem in "myapp.exe". Additional Information: Context 0xe2ba0 is disabled. Release interfaces from the current context (context 0xe2d10). This may result in data corruption or loss.
I read something on the Internet that says this can happen if the GUI application cannot quickly translate the messages. I noticed that I can provoke the same crash that will happen faster if I quickly resize the window (i.e. load more messages), which supports the theory I'm thinking of?
So the questions are here:
- Does anyone agree with my hypothesis of forwarding messages?
- Is there any other explanation?
- Is there any way to prove this (maybe look at the number of messages in the queue)?
- Are these bad smells of code that suggest that I am wrong?
Any advice would be greatly appreciated.
debugging crash c ++ - cli
Jon cage
source share