objreg/QObject::destroyed related segfaults in tests #1638

Closed
The-Compiler opened this Issue Jul 10, 2016 · 4 comments

Comments

Projects
None yet
1 participant
@The-Compiler
Collaborator

The-Compiler commented Jul 10, 2016

On PyQt < 5.6, since e361237 we get random segfaults when tests are using fake_web_tab.

They seem to happen in the QObject::destroyed slot in C++:

#0  0x00007ffff3e8fd92 in PyQtSlot::invoke (this=0x3409310, qargs=qargs@entry=0x7fffffff7850, self=0x80000005, self@entry=0x0, result=result@entry=0x0, no_receiver_check=<optimized out>)
    at ../../qpy/QtCore/qpycore_pyqtslot.cpp:111
#1  0x00007ffff3e8fe6d in PyQtSlot::invoke (this=<optimized out>, qargs=qargs@entry=0x7fffffff7850, no_receiver_check=<optimized out>) at ../../qpy/QtCore/qpycore_pyqtslot.cpp:76
#2  0x00007ffff3e9b730 in PyQtSlotProxy::unislot (this=0x2b27e70, qargs=0x7fffffff7850) at ../../qpy/QtCore/qpycore_pyqtslotproxy.cpp:205
#3  0x00007ffff3e9c077 in PyQtSlotProxy::qt_metacall (this=0x2b27e70, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffffff7850) at ../../qpy/QtCore/qpycore_pyqtslotproxy.cpp:170
#4  0x00007ffff38870a4 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007ffff38874ef in QObject::destroyed(QObject*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007fffec3332b8 in QWidget::~QWidget() () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#7  0x00007fffeb524a19 in sipQWidget::~sipQWidget (this=0x351e0b0, __in_chrg=<optimized out>) at sipQtWidgetspart9.cpp:30765
#8  0x00007ffff08c9b06 in ?? () from /root/outside/.tox/py34/lib/python3.4/site-packages/sip.cpython-34m-x86_64-linux-gnu.so
#9  0x00007ffff08cae29 in ?? () from /root/outside/.tox/py34/lib/python3.4/site-packages/sip.cpython-34m-x86_64-linux-gnu.so
#10 0x00000000005154c2 in ?? ()
#11 0x00000000004e884f in ?? ()
#12 0x00000000004e866b in ?? ()
#13 0x00000000005a4467 in ?? ()
#14 0x00000000004ddde8 in ?? ()
#15 0x00000000004dd50c in ?? ()
#16 0x00000000004cce5c in _PyObject_GC_Malloc ()

The slot gets connected in objreg (to self.on_destroyed). No idea what's causing the segfault - I guess ideally we should avoid using the destroyed signal entirely.

The-Compiler added a commit that referenced this issue Jul 10, 2016

Skip tests using fake_web_tab on PyQt < 5.6
For some weird reason they cause a segfault in QObject::disconnect since
fake_web_tab was converted to a fixture...

See #1638

@The-Compiler The-Compiler referenced this issue Jul 10, 2016

Merged

Initial QtWebEngine refactoring #1629

2 of 2 tasks complete
@The-Compiler

This comment has been minimized.

Show comment
Hide comment
@The-Compiler

The-Compiler Jul 10, 2016

Collaborator

Seems like test_history_interface crashes during qtbot.waitSignal too... so much fun! 😡

Collaborator

The-Compiler commented Jul 10, 2016

Seems like test_history_interface crashes during qtbot.waitSignal too... so much fun! 😡

The-Compiler added a commit that referenced this issue Jul 10, 2016

The-Compiler added a commit that referenced this issue Jul 11, 2016

@The-Compiler

This comment has been minimized.

Show comment
Hide comment
@The-Compiler

The-Compiler Jul 11, 2016

Collaborator

The other segfault was actually due to test_tab and just happened to happen in test_history_interface.

Collaborator

The-Compiler commented Jul 11, 2016

The other segfault was actually due to test_tab and just happened to happen in test_history_interface.

@The-Compiler

This comment has been minimized.

Show comment
Hide comment
@The-Compiler

The-Compiler Jul 15, 2016

Collaborator

I should probably take a look at #640 rather sooner than later...

Collaborator

The-Compiler commented Jul 15, 2016

I should probably take a look at #640 rather sooner than later...

The-Compiler added a commit that referenced this issue Feb 1, 2017

Unconditionally disable test_tab
This now also causes segfaults with Qt 5.8, so something is definitely wrong
here...

See #1638 and #2261
@The-Compiler

This comment has been minimized.

Show comment
Hide comment
@The-Compiler

The-Compiler Mar 19, 2018

Collaborator

Seems to look better with Qt 5.7.1 nowadays.

Collaborator

The-Compiler commented Mar 19, 2018

Seems to look better with Qt 5.7.1 nowadays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment