Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.4.1, 5.5.1
-
None
-
QWebChannel project's test folder, using Qt 5.5 layman overlay, installed on Gentoo Linux.
-
7cb2d467c3421eced44ae7b887b8738cc68595fc
Description
Creating a class and moving it to a different QThread, and then emitting a signal from that thread causes QWebChannel to segfault.
Issue seems to be caused by the use of QObject::sender() in signalhandler_p.hpp (qt_metacall). sender() which will be null if used from a different thread than the sender object's affinity.
I believe this can be fixed by using Qt::AutoConnection in the connection type, though I'm not sure if this is safe without some feedback on whether this type of queuing would be correct in the overall architecture.
Sample output without fix:
QFATAL : TestWebChannel::testAsyncObject() Received signal 11
FAIL! : TestWebChannel::testAsyncObject() Received a fatal error.
Loc: [Unknown file(0)]
Totals: 6 passed, 1 failed, 0 skipped, 0 blacklisted
-
-
-
-
-
-
-
-
- Finished testing of TestWebChannel *********
Aborted
- Finished testing of TestWebChannel *********
-
-
-
-
-
-
-
Debugging info:
Program received signal
SIGABRT, Aborted.
0x00007ffff5552267 in raise () from /lib64/libc.so.6
-
-
- Program received signal SIGABRT (Aborted) ***
ASSERT: "object" in file signalhandler_p.h, line 253
- Program received signal SIGABRT (Aborted) ***
-
Attachments
Issue Links
- relates to
-
QTBUG-80729 TestWebChannel::testAsyncObject() is flaky and crashes on many platforms
- Closed
-
QTBUG-57022 TestWebChannel::testAsyncObject() fails randomly
- Closed
- replaces
-
QTBUG-74611 Flaky tests/auto/webchannel crashes on multiple platforms in CI
- Closed