Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

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

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

Comments

@The-Compiler
Copy link
Member

@The-Compiler 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
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 mentioned this issue Jul 10, 2016
2 of 2 tasks complete
@The-Compiler
Copy link
Member Author

@The-Compiler 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
Copy link
Member Author

@The-Compiler 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
Copy link
Member Author

@The-Compiler 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
This now also causes segfaults with Qt 5.8, so something is definitely wrong
here...

See #1638 and #2261
@The-Compiler
Copy link
Member Author

@The-Compiler 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant