-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.9.0 Beta 1
-
None
-
Archlinux, PyQt5 5.8
With a Qt 5.8 with https://codereview.qt-project.org/#/c/176113/ applied on top, I get segfaults here:
#0 0x00007f7a0da00f5f in raise () at /usr/lib/libpthread.so.0 #1 0x00007f7a0da01080 in <signal handler called> () at /usr/lib/libpthread.so.0 #2 0x00007f7a0b5d37b1 in QMetaObject::activate(QObject*, int, int, void**) (sender=0x276d848, signalOffset=3, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7ffc35fbd250) at kernel/qobject.cpp:3612 #3 0x00007f7a0b5d46d7 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=<optimized out>, m=m@entry=0x7f7a0b9f3ec0 <QIODevice::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7ffc35fbd250) at kernel/qobject.cpp:3602 #4 0x00007f7a0b64a201 in QIODevice::channelReadyRead(int) (this=<optimized out>, _t1=<optimized out>) at .moc/moc_qiodevice.cpp:193 #5 0x00007f79fd842b7c in QAbstractSocketPrivate::canReadNotification() (this=0x1b748e0) at socket/qabstractsocket.cpp:733 #6 0x00007f79fd84e131 in QReadNotifier::event(QEvent*) (this=<optimized out>, e=<optimized out>) at socket/qnativesocketengine.cpp:1241 #7 0x00007f79f5d753dc in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x1b68830, e=0x7ffc35fbd520) at kernel/qapplication.cpp:3745 #8 0x00007f79f5d7cbf1 in QApplication::notify(QObject*, QEvent*) (this=0x14fa0b0, receiver=0x1b68830, e=0x7ffc35fbd520) at kernel/qapplication.cpp:3502 #9 0x00007f79f65f42ce in sipQApplication::notify(QObject*, QEvent*) (this=0x14fa0b0, a0=0x1b68830, a1=0x7ffc35fbd520) at sipQtWidgetsQApplication.cpp:232 #10 0x00007f7a0b5a84b0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x1b68830, event=event@entry=0x7ffc35fbd520) at kernel/qcoreapplication.cpp:988 #11 0x00007f7a0b5fd56d in QCoreApplication::sendEvent(QObject*, QEvent*) (event=0x7ffc35fbd520, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231 #12 0x00007f7a0b5fd56d in socketNotifierSourceDispatch(GSource*, GSourceFunc, gpointer) (source=0x152e1d0) at kernel/qeventdispatcher_glib.cpp:106 #13 0x00007f7a07e7d5a7 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0 #14 0x00007f7a07e7d810 in () at /usr/lib/libglib-2.0.so.0 #15 0x00007f7a07e7d8bc in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0 #16 0x00007f7a0b5fd0bf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x152f240, flags=...) at kernel/qeventdispatcher_glib.cpp:423 #17 0x00007f7a0b5a690a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffc35fbd740, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212 #18 0x00007f7a0b5aee54 in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1261
I've actually seen the same when calling QApplication::processEvents() in my code. Adding QEventLoop::ExcludeSocketNotifiers makes things a lot better, though I've still seen some segfaults with it (in the same place).
They mostly happen when doing QtNetwork downloads (with a QNAM), while QtWebEngine is initialized.
Note that I'm using PyQt, so a few funky things could be going on regarding memory management - however, I've never seen it happen with an unpatched Qt 5.8 (when avoiding processEvents at least), and without QtWebEngine code involved.