PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 1116 - segfault when removing object reference (by assigning None)
: segfault when removing object reference (by assigning None)
Status: UNCONFIRMED
Product: PySide
Classification: Unclassified
Component: QtGui
: HEAD
: PC Linux
: P5 normal
Assigned To: Hugo Parente Lima
:
:
:
  Show dependency treegraph
 
Reported: 2012-01-09 05:01 EET by Jelle Geerts
Modified: 2012-03-08 16:57 EET (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jelle Geerts 2012-01-09 05:01:59 EET
We get a segfault in certain cases when right-clicking in a QDialog if we call
close() inside the mousePressEvent() handler. The case that I have observed is
when there is only one reference to the QDialog, and when one removes this
reference in response to the closeEvent() handler being called.

The interesting thing is that this only happens when right-clicking, not when
left-clicking or when clicking with the wheel or other mouse buttons. Perhaps
something to do with the fact that right-clicking is normally used to show a
context menu?

See example.py to reproduce the segfault.

Workaround:
To work around the segfault, one can remove the reference to the QDialog at a
later point. For example, by connecting to the 'destroyed' signal (and marking
the QDialog WA_DeleteOnClose), and then removing the reference, as opposed to
removing the reference in the closeEvent() handler.
Comment 1 Matti Airas 2012-03-08 16:57:20 EET
PySide is now a Qt-addon and uses Qt Project's JIRA tool for tracking bugs.
Please verify that the bug is still valid and re-submit it in the address
below:

https://bugreports.qt-project.org/

Sorry for the inconvenience!