[PyQt] QtWebEngineWidgets crasher
Kovid Goyal
kovid at kovidgoyal.net
Thu Mar 19 05:44:07 GMT 2015
This is a long standing issue with PyQt 5.x. See for example,
http://www.riverbankcomputing.com/pipermail/pyqt/2014-October/034951.html
The backtraces are useless, and the crash is typically random occurring
in some fraction of starts. The only clue I have been able to get is
that the crash happens in the QXcbEventReader thread. It does not happen
when using a non-xcb based QPA plugin. An it never happens with pure Qt
applications. Which tells me it is a combination of PyQt object
lifetimes and something in the XCB QPA plugin. Unfortunately, the crash
seems to involve stack corruption, which is why getting good backtraces
is so difficult.
Unfortunately, I am not a native code guru, so this is about where my
knowledge ends.
Kovid.
On Thu, Mar 19, 2015 at 03:15:03AM +0000, Baz Walter wrote:
> On 19/03/15 02:47, Kovid Goyal wrote:
> >Sounds like an object lifetime bug,
> >try explicitly deleting widget after app.exec_()
> >
>
> No that doesn't work, but it's not the point anyway. It's trivial to find
> several ways to "fix" my toy example - e.g. give the widget a parent, import
> QtWebEngineWidgets globally, move app into the test function, etc, etc.
>
> The question is why a non-global import of the QtWebEngineWidgets module
> (and no other PyQt module) causes my test case to crash on exit. At the
> moment, I can't find a way to debug it. Even with debug builds of PyQt5 and
> Qt5, the backtrace seems pretty useless (I also tried valgrind with similar
> results):
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7fffe8c3c700 (LWP 2903)]
> 0x00007fffeba9d399 in ?? ()
> (gdb) bt full
> #0 0x00007fffeba9d399 in ?? ()
> No symbol table info available.
> #1 0x00007fffe8c3bf10 in ?? ()
> No symbol table info available.
> #2 0x00000000009362a0 in ?? ()
> No symbol table info available.
> #3 0x00007fffe8c3bf50 in ?? ()
> No symbol table info available.
> #4 0x0000000000936600 in ?? ()
> No symbol table info available.
> #5 0x00007fffffffbebf in ?? ()
> No symbol table info available.
> #6 0x00007ffff5f9f55e in QThreadPrivate::start (arg=0x9362a0) at
> thread/qthread_unix.cpp:337
> __clframe = {__cancel_routine = 0x7ffff5f9e650
> <QThreadPrivate::finish(void*)>, __cancel_arg = 0x9362a0, __do_it = 1,
> __cancel_type = <optimized out>}
> thr = 0x9362a0
> data = 0x7fffe4003f80
> objectName = {static null = {<No data fields>}, d = 0x7f04f0}
> Backtrace stopped: previous frame inner to this frame (corrupt stack?)
>
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
--
_____________________________________
Dr. Kovid Goyal
http://www.kovidgoyal.net
http://calibre-ebook.com
_____________________________________
More information about the PyQt
mailing list