GUI Freeze on Multi-Thread Application
-
Hey there,
I just need some suggestions on multi-threading to avoid GUI Freeze.
I developed a system which has three threads excluding main GUI thread.Thread 1 : Image Grabber - It captures Image and emit the image for displaying .
Thread 2 : Serial Reader - I used synchronous Qt Serial Code and values are emitted to display on the GUI.
Thread 3 : Database Storing - Stores the data coming from Serial Reader (I used it in Main GUI Thread, when Serial Values are displayed on GUI in that function I implemented storing the data in database)
The system is working fine without freezing and is running 12 hours per day, but at certain times the GUI Freezes when I click on a button or on a popup.
It would be great if someone can provide me with some useful information on why GUI is Freezing when I click on a button, If I don't press anything the system works fine.
(Note: this doesn't happen daily it happens once or twice a week). -
add mutex to places where it is needed.
-
@mvsri there is deadlock in your code. You need to find out the reason. Output more log info. Nobody can help you without looking at your code.
one possible reason could be a func with mutex is called from another func with mutex.
-
Hi,
What kind of popup are triggering the freeze ?
1/5