Could someone tell me why my application always freezes
Could someone give me some advice?
I design a QT application on Ubuntu. And I use touch screen. But it often freezes when I touch the screen after I leave it alone for hours. And if I don't use touch screen, it works.
I don't know the reason, and I don't know how to analyze it, either. When it freezes, I debug it. But it doesn't run into any code that I design. It loops at "pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185\n".
So could someone tell me the reason or give me some advice?
Thanks in advance.
hi @Qingshui-Kong ,
question, do you happen to have the touchscreen keyboard open when this error occurs?
You mean ubuntu touchscreen keyboard? Or Qt virtual keyboard?
I have ubuntu touchscreen keyboard. But I close it.
I don't use QVirtualKeyboard. But I use some other thirdparty virtualkeyboard.
There was a bug, not sure if it's fixed already, that happened on android qt apps.
Would the app be suspended (for example during screen turn off) while the virtual keyboard was active. The application would become unresponsive. And would have to be restarted
As far as I know, that was only the case for android os. SO this would be the first case I know of for linux.
What version of Qt are you using ?
Thank you very much.
I use Qt 5.9.1.
There is a clock on my application. Before I touch screen, it still runs. But after I touch screen, it stops. I use a QTimer to update the clock.
By the way, what do you mean by say virtual keyboard? Qt virtual keyboard or ubuntu virtual keyboard?
@Qingshui-Kong In the case I described, that would be the OS-native keyboard
5.9.1 is rather old. the latest patch, currently, for 5.9 is 5.9.8.
I would suggest updating and checking again?
So you mean there may be some bugs about that in Qt 5.9.1?
@Qingshui-Kong it's worth a try. don't you think ;-)
5.9 is LTS after all
@J.Hilk Thank you.
I installed Qt 5.9.8 after I uninstalled Qt5.9.1. Then I compiled my project.
I copied the executable file and lib files compiled by Qt 5.9.8 to the destination PC. Then I started the application. But unfortunately, it still froze when i touch the screen after I leave it alone for hours.
Could you give me more advice? Now I don't know what to do to solve the problem.
The system is Ubuntu 16.04
Thank you in advance.
I'm afraid I don't have many more ideas.
Have you tried with a minimal project ? To test your device touchscreen. Maybe everything is working as expected and it's actually something in your code?
I haven't tried with a minimal project.
I also think there should be something wrong in my code. But I have checked the code, and didn't find anything wrong. So I need some help.
What's more, the application is fullscreen. And I haven't tried normal window yet.
Once, it reproduced, I debuged it. And here is some log.
dRUNNING NEEDS-STOP COMMAND -file-list-exec-source-files
dState changed from InferiorRunOk(11) to InferiorStopRequested(13) [master]
dCALL: INTERRUPT INFERIOR
sAttempting to interrupt.
dTRYING TO INTERRUPT INFERIOR
~"1 "VXFoodInspectio" received signal SIGINT, Interrupt.\n"
~"pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185\n"
&"185\t../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: No such file or directory.\n"
dNOTE: INFERIOR STOP OK
dState changed from InferiorStopRequested(13) to InferiorStopOk(14) [master]
HANDLING QUEUED COMMANDS AFTER TEMPORARY STOP
dNOTE: INFERIOR RUN REQUESTED
dState changed from InferiorStopOk(14) to InferiorRunRequested(10) [master]
Could someone give me some advice to analyze it?
A backtrace would be useful I guess.
Thank you very much.
But how can I use it, if the thread is locked?
Could you tell me in detail?
I think it's a gdb command.
But the application doesn't crash. Actually, it freezes. How can it produces dump file?
I am not very familar with this. Could you tell me?
I find a new sympton.
I opened a modal dialog. Then I left it alone. Several hours later, I touch outside the dialog. My application froze.
As I know, if i touch outside of a modal dialog., it will do nothing. At least, it doesn't run into any code that I designed.
So, how could that happen?
If someone see this, please give me some advice. Thanks!
But the application doesn't crash.
You can jump into the Debugger by pressing CTRL+C on the debugger command line (when you started from console)