[PyQt] Tracking down a random segfault inside QMetaObject::activate(QObject*, int, int, void**)

Nikolaus Waxweiler madigens at gmail.com
Sun May 21 11:22:01 BST 2017


Hi list,
I'm working on Trufont (https://github.com/trufont/trufont) on Fedora
25 (Python 3.5, PyQt 5.7.1) and am also testing it on Ubuntu 17.04
(Python 3.5, PyQt 5.8.1 using the package from PyPi). I'm trying to
track down a random segfault within QMetaObject::activate that often
occurs when doing something with the glyphs, like adding, deleting and
sorting. I suspect there's a use-after-delete involved somehow, but I
have no idea which (Python) code triggers the offending (C++) code
path, so I can't breakpoint it :( Faulthandler and the Python extension
for GDB only see the call to Qt's application loop (app.exec() in
__main__).

Backtrace: https://paste.fedoraproject.org/paste/dLFBP6~G-ETWTyL2OJIGql
5M1UNdIGYhyRLivL9gydE=

Steps to reproduce:
1) Install Trufont or at least its' dependencies with `pip3`, you can
run it from Lib/ with `gdb -ex r --args python3 -m trufont`.
2) Open some font in it (File -> Import -> some .otf or .ttf)
3) Go to Font -> Sort... -> Select "Canned" -> Ok. Repeat until Trufont
crashes.

What can I do to pin this down?


More information about the PyQt mailing list