How to debug a QT application which hangs after some time of run
Hi,
I have an application which uses QProcess to talk to a gdb. The program runs for some time and the application hangs after it. There is a thread which reads the output periodically from the process and application sends next command only after receiving output for the previous command. How to debug this kind of problem ?
Thanks in advance,
Subbarao
Re: How to debug a QT application which hangs after some time of run
Run the application in a debugger.
Once it "hangs" press pause in the debugger, and continue to step through, and see what the code is doing which it is not supposed to do.
Re: How to debug a QT application which hangs after some time of run
Hi,
Thanks for the suggestion.
I attached the gdb to the process when the application got hanged. At the top of the callstack I can see __pthread_read_nocancel followed by ::read call in socketRead function of QProcess class. Have you ever seen this kind of problem ?
Regards,
Subbarao
Re: How to debug a QT application which hangs after some time of run
This is too general to be able to be answered.
Why don't you debug the way I suggested?
Then you can step through and know where you are in the code.