[PyQt] Debugging segfault in PyQt application?

Hans-Peter Jansen hpj at urpla.net
Mon Dec 23 13:54:30 GMT 2013


On Freitag, 20. Dezember 2013 13:02:36 Jason Tiller wrote:
> Hi, all,
> 
> I collaborate on a complex PyQt application.  We're experiencing
> segfaults that arise from QtCore, but I'm stumped as to how to drill
> down into the coredump and get useful information from the backtrace.
> Anybody have any suggestions as to a useful approach for debugging
> segfaults in PyQt applications?  We can currently cause the issue
> (fairly) reliably every 20 minutes or so with manual button mashing.

Use a _Linux_ distribution, that also delivers easy to install debug info 
packages.

E.g.: for openSUSE, you need to add the oss debug and update-debug repos in 
"yast2 repositories", than in "yast2 sw_single", enable the display of debug 
packages in options menu and list the packages in question (libqt4, python, 
python-qt4, python-sip) in the package installer, and select the -debuginfo 
rpms.

After that, you get a meaningful backtrace with:

gdb python
(gdb) set args yourmainscript.py
(gdb) run
<bang>
(gdb) bt full

Paste the backtrace here (with line wrapping disabled!)

Hth,
Pete


More information about the PyQt mailing list