A problem similar to making the interface suspended
-
A problem similar to making the interface suspended
recently,I write a c++ program for data acquisition,but when it is running,I will find there is a problem similar to making the interface suspended,there is no warning that the program did not respond, at the same time I cann't do anything on the Windows10 system platform,it's more like blocking the response event of the system, so I want to know how to handle this problem. Expect for your answer.
-
From the symtoms you describe it is probably a race condition you have implemented. Without more information others require a crystal ball to give you any advice.
Probably best is to use the debugger and try to find the place where your app is getting lost. Sometimes you can use pause in the debugger and it will show you where it is currently based on the call stack.
Another method is using qDebug() at some strategic positions and try to limit the search to some fewer places
-
Repeated data aquisition typically has an action started whenever new data is available. This action is most likely the source of the problem respectively it is the first point to start the search. Sometimes it helps to check simply system time stamps e.g. reading the current time stamp (storing or outting on screen) and build the difference. Possibly also https://doc.qt.io/qt-5/qelapsedtimer.html is an option. Never used that because I have already my own toolset. However, this looks suitable.