Bug 676042
Summary: | segfault when using qml (probably reference counting error) | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Toshio Ernie Kuratomi <a.badger> | ||||
Component: | PyQt4 | Assignee: | Rex Dieter <rdieter> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | rawhide | CC: | dmalcolm, rdieter, than | ||||
Target Milestone: | --- | Keywords: | Reopened | ||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | qscintilla-2.4.6-3.fc15 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2011-11-19 23:32:46 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
:-/ Upstream response... It's a feature, not a bug... PyQt correctly gives an extra reference to the Stopwatch context object to the QDeclarativeContext returned by rootContext() to prevent it being garbage collected. However the QDeclarativeContext Python object (not the C++ instance) is itself garbage collected and so the extra reference is then discarded. Therefore you need to keep an explicit reference to the Stopwatch instance (as in your workaround), or the value returned by rootContext(), or give the Stopwatch instance a sensible parent. Followup... -------------------------- On Fri, 18 Mar 2011 16:20:23 +0000, Phil Thompson ...on second thoughts I can make this work. Should be fixed in tonight's SIP and PyQt snapshots. ---------------------------- yay! Confirmed this to be fixed in sip-4.13/PyQt4-4.8.6 (testing updates now, will have something bodhi-worthy soon hopefully) qscintilla-2.4.6-3.fc15,PyQt4-4.8.6-1.fc15,sip-4.13-1.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/qscintilla-2.4.6-3.fc15,PyQt4-4.8.6-1.fc15,sip-4.13-1.fc15 Package qscintilla-2.4.6-3.fc15, PyQt4-4.8.6-1.fc15, sip-4.13-1.fc15: * should fix your issue, * was pushed to the Fedora 15 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing qscintilla-2.4.6-3.fc15 PyQt4-4.8.6-1.fc15 sip-4.13-1.fc15' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2011-15608 then log in and leave karma (feedback). qscintilla-2.5.1-2.fc16,PyKDE4-4.7.3-1.fc16.1,PyQt4-4.8.6-1.fc16,sip-4.13-1.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/qscintilla-2.5.1-2.fc16,PyKDE4-4.7.3-1.fc16.1,PyQt4-4.8.6-1.fc16,sip-4.13-1.fc16 Package qscintilla-2.5.1-2.fc16, PyKDE4-4.7.3-1.fc16.1, PyQt4-4.8.6-1.fc16, sip-4.13-1.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing qscintilla-2.5.1-2.fc16 PyKDE4-4.7.3-1.fc16.1 PyQt4-4.8.6-1.fc16 sip-4.13-1.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2011-15775 then log in and leave karma (feedback). qscintilla-2.5.1-2.fc16, PyKDE4-4.7.3-1.fc16.1, PyQt4-4.8.6-1.fc16, sip-4.13-1.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report. qscintilla-2.4.6-3.fc15, PyQt4-4.8.6-1.fc15, sip-4.13-1.fc15, kdebindings-4.6.5-2.fc15, calibre-0.8.0-1.fc15.1, veusz-1.11-2.fc15.1, avogadro-1.0.3-2.fc15.1 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report. |
Created attachment 477653 [details] code to see the segfault Description of problem: When running some simple PyQt4 + QML apps, a segfault can be produced when the QML tries to make use of an object that is exposed to it by the PyQt code. Changing the code very slightly so that the PyQt4 code has an extra reference to the object removes the segfault. This likely means that a reference to the object is not being created in the PyQt4 declarative code. Version-Release number of selected component (if applicable): PyQt4-4.8.3-1.fc15.i686 qt-4.7.1-13.fc15.i686 How reproducible: Everytime Steps to Reproduce: 1. Download attached script 2. run it 3. Click on the window that appears Actual results: Segmentation fault (core dumped) Expected results: The text in the window changes from "nothing yet" to "stopping" Additional info: I'll attach a tarball with the code to do this. The .py file will have a few commented lines that show how to make it not segfault.