GUI freezing issue
-
We have developed a system which integrates with camera and micro controller.
GUI shows the image from the camera and serial count from micro controller, we used a serial thread to poll the data from micontroller and emitted the signal to GUI to display it and also we have used a separate thread to capture image and pass it to main thread.
The problem with the application is when the system is in idle state, the GUI freezes and we have to restart the application to start working (idle meaning, user is not leasing any buttons and counts and images are coming in continuously).
Most important thing to notice here is the GUI freeze issue is not consistent here. There are several systems installed, and some places, the freeze (not responding) issue comes once in 2/3 weeks and in some places, once in 2 days. Waiting for the application to be responsive doesn’t help.My main question is what is the main cause for the GUI to freeze and is there any checks to implement on serial thread and image capturing thread to avoid unnecessary data emissions.
-
@dev_512 Hi,
Just an hypothesis. You may produce more data from your worker thread capturing images than your main GUI thread is able to process. This cause the event queue to grow and make the app crashing when it's full. Did you try to decrease number of images you process by second ?