I’ve got a PyQt4 project with a very weird error, under certain circumstances the main thread simply dies and I have no idea why.
- No exception reported or shown, I’ve tried wrapping a try – except around app.exec_() and nothing.
- sys.exit() is not called
Does anybody have any tips, is there a tool to see what signals/messages are passed around inside Qt or something else?
It is likely that the application is crashing in Qt. Try running the program with gdb.
gdb --args python myprog.pyWhen the program crashes, this should give you a backtrace that may shed some light on what is going on.
Note that having debug symbols available for Qt will make the backtrace more useful. On Ubuntu or Debian systems, the libqt4-dbg package can be installed to make these debug symbols available.