QApplication hanging on poll() (sometimes)
I'm having an intermittent issue where the following main.cpp will hang on the call to QApplication (int argc, char *argv[]) at a poll() call.
I'm using Qt 5.1.1, g++ 4.8.5 and Eclipse 4.11.0 on RHEL 7.8.
This is the simple main program that QtCreator created for me so I'm assuming that it is doing it as expected.
Code:
#include <QApplication>
#include "MyMainWindow.h"
int main (int argc, char *arg[])
{
MyMainWindow w;
a.exec()
}
I'm currently using Eclipse as my IDE and am using the .pro file from QtCreator and qmake to create a Makefile which I then compile with in Eclipse.
My problem is that occasionally my program hangs and when I use the Eclipse debugger (gdb) to see where it's hanging up it's in a call to poll() :confused:. This means that it never leaves QApplication to start MyMainWindow.
Like I said this only happens occasionally and sometimes I can just logoff and back on and it works. Rebooting the system always fixes it, but that's kind of exteme.
Has anyone seen this before? It's very frustrating since I'm on a tight schedule and I can't reboot this system every time this happens.
Re: QApplication hanging on poll() (sometimes)
Where is the call to "w.show()" to actually put your main window up on screen?
And isn't there a "kill" command in linux to stop a process? Rebooting your PC just to stop a program seems a little extreme.
Re: QApplication hanging on poll() (sometimes)
Quote:
Originally Posted by
d_stranz
Where is the call to "w.show()" to actually put your main window up on screen?
It's in MyMainWidow
Quote:
And isn't there a "kill" command in linux to stop a process? Rebooting your PC just to stop a program seems a little extreme.
After I exit out of the Eclipse, there's noting to kill.
Re: QApplication hanging on poll() (sometimes)
I'm still having this problem.
Could it be a result of having Gnome 3 on my system (there are other problems with this on RHEL 7.8)?