[Bug 561303] Re: PyQt4 applications crash at exit
This bug was fixed in the package python-qt4 - 4.7.2-0ubuntu1.1 --- python-qt4 (4.7.2-0ubuntu1.1) lucid-proposed; urgency=low * d/p/lp-561303.diff: Cherry pick fix from 4.7.3 to stop crashes. (LP: #561303) -- Clint ByrumFri, 22 Jun 2012 10:59:44 -0700 ** Changed in: python-qt4 (Ubuntu Lucid) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to python-qt4 in Ubuntu. https://bugs.launchpad.net/bugs/561303 Title: PyQt4 applications crash at exit To manage notifications about this bug go to: https://bugs.launchpad.net/pylotro/+bug/561303/+subscriptions -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
This seems to work fine and is obviously more correct than what's there now. ** Tags removed: verification-needed ** Tags added: verification-done -- You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to python-qt4 in Ubuntu. https://bugs.launchpad.net/bugs/561303 Title: PyQt4 applications crash at exit To manage notifications about this bug go to: https://bugs.launchpad.net/pylotro/+bug/561303/+subscriptions -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
I'm not actually able to reproduce the original issue. The example programs all work fine without this update. -- You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to python-qt4 in Ubuntu. https://bugs.launchpad.net/bugs/561303 Title: PyQt4 applications crash at exit To manage notifications about this bug go to: https://bugs.launchpad.net/pylotro/+bug/561303/+subscriptions -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
** Branch linked: lp:~ubuntu-branches/ubuntu/lucid/python-qt4/lucid- proposed -- You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to python-qt4 in Ubuntu. https://bugs.launchpad.net/bugs/561303 Title: PyQt4 applications crash at exit To manage notifications about this bug go to: https://bugs.launchpad.net/pylotro/+bug/561303/+subscriptions -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
Hello Xavier, or anyone else affected, Accepted python-qt4 into lucid-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/python- qt4/4.7.2-0ubuntu1.1 in a few hours and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case details of your testing will help us make a better decision. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance! ** Changed in: python-qt4 (Ubuntu Lucid) Status: In Progress => Fix Committed ** Tags added: verification-needed -- You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to python-qt4 in Ubuntu. https://bugs.launchpad.net/bugs/561303 Title: PyQt4 applications crash at exit To manage notifications about this bug go to: https://bugs.launchpad.net/pylotro/+bug/561303/+subscriptions -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
** Changed in: python-qt4 (Ubuntu Lucid) Status: Triaged => In Progress ** Changed in: python-qt4 (Ubuntu Lucid) Assignee: (unassigned) => Clint Byrum (clint-fewbar) -- You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to python-qt4 in Ubuntu. https://bugs.launchpad.net/bugs/561303 Title: PyQt4 applications crash at exit To manage notifications about this bug go to: https://bugs.launchpad.net/pylotro/+bug/561303/+subscriptions -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
The full diff isn't needed and contains new features that aren't the sort we generally accept for an SRU. The relevant bit of the diff to fix this problem is: === modified file 'sip/QtGui/qapplication.sip' --- sip/QtGui/qapplication.sip revid:james.wes...@ubuntu.com-20100323222732-06b2oty73v82ag1o +++ sip/QtGui/qapplication.sip revid:cshor...@googlemail.com-20120520132153-3ifiwl7jly55pil0 @@ -1,4 +1,4 @@ -// qapplication.sip generated by MetaSIP on Wed Mar 17 18:29:25 2010 +// qapplication.sip generated by MetaSIP on Fri Apr 16 11:32:08 2010 // // This file is part of the QtGui Python extension module. // @@ -596,13 +596,17 @@ %End virtual ~QApplication(); %MethodCode -// Make sure all top level widgets are deleted before the QApplication. This -// is a typical cause of crashes (or at least strange behaviour) when an -// application terminates. +// Make sure all top level widgets are not owned by Python and so won't be +// destroyed by the garbage collector after QApplication is destroyed. QWidgetList tlw = QApplication::topLevelWidgets(); for (int i = 0; i < tlw.count(); ++i) -delete tlw.at(i); +{ +PyObject *sw = sipGetPyObject(tlw.at(i), sipType_QWidget); + +if (sw) +sipTransferTo(sw, 0); +} // Handle all other QObject instances that we want to make sure are deleted // before the QApplication is deleted. Please don't do the full version update. Do a new one with this as a patch. -- You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to python-qt4 in Ubuntu. https://bugs.launchpad.net/bugs/561303 Title: PyQt4 applications crash at exit To manage notifications about this bug go to: https://bugs.launchpad.net/pylotro/+bug/561303/+subscriptions -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
I uploaded cshorler's fix to lucid-proposed, it awaits review by the SRU team. ** Also affects: python-qt4 (Ubuntu Lucid) Importance: Undecided Status: New ** Changed in: python-qt4 (Ubuntu Lucid) Status: New => Triaged ** Changed in: python-qt4 (Ubuntu Lucid) Importance: Undecided => High -- You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to python-qt4 in Ubuntu. https://bugs.launchpad.net/bugs/561303 Title: PyQt4 applications crash at exit To manage notifications about this bug go to: https://bugs.launchpad.net/pylotro/+bug/561303/+subscriptions -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
** Description changed: + [Test Case] + Try any of the basic examples in python-qt4-doc: + + jss@jss-laptop:$ python /usr/share/doc/python-qt4-doc/examples/richtext/syntaxhighlighter.py + ... + Segmentation fault + Fixed versions should work properly. + + [Regression Potential] + While this is an update from upstream, it is a very tiny actual change (view the diff with 'filterdiff -x doc/* -x sip/*'). + + --- + Binary package hint: python-qt4 Package python-qt4 (python bindings for qt4) seems to be broken in Lucid beta 2. Many PyQt4 applications crash at exit, which can be easily reproduced by running some of the example applications available in package python-qt4-doc. For example, run ' python /usr/share/doc/python- qt4-doc/examples/dialogs/findfiles.py'. When the dialog is closed, the application dies with segmentation fault. The python-qt4 version in Lucid beta 2 is 4.7.2-0ubuntu1. The PyQt4 mailing list has several recent reports about this kind of crashes with PyQt4 version 4.7.2, due to some changes in the way objects are deleted at exit. The following message on the mailing list indicates that a fixed version 4.7.3 is to be released shortly. I hope the fixed version will be included in Lucid, or if not possible then revert back to some older version that does not crash applications at exit. http://www.riverbankcomputing.com/pipermail/pyqt/2010-April/026385.html -- You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to python-qt4 in Ubuntu. https://bugs.launchpad.net/bugs/561303 Title: PyQt4 applications crash at exit To manage notifications about this bug go to: https://bugs.launchpad.net/pylotro/+bug/561303/+subscriptions -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
Would love a Lucid port for this :-) -- You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to python-qt4 in Ubuntu. https://bugs.launchpad.net/bugs/561303 Title: PyQt4 applications crash at exit -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
+1 for Lucid...thanks. -- You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to python-qt4 in Ubuntu. https://bugs.launchpad.net/bugs/561303 Title: PyQt4 applications crash at exit -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
Hello; just checking to see if someone had had the chance to pick up on this. -- You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to python-qt4 in ubuntu. https://bugs.launchpad.net/bugs/561303 Title: PyQt4 applications crash at exit -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
Thank you. I had opened bug #694541 in the meantime, to track the Lucid- specific part. Please feel free to close that if you believe it best to solve the problem here. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/561303 Title: PyQt4 applications crash at exit -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
I'll take this up after 31st December if no one has poked it by then, nominated for lucid for now ** Changed in: python-qt4 (Ubuntu) Milestone: None => ubuntu-10.04.2 -- You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to python-qt4 in ubuntu. https://bugs.launchpad.net/bugs/561303 Title: PyQt4 applications crash at exit -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
The problem still exists in Lucid Lynx, which is a long term support release. Will the problem be fixed in Lucid as well, or will those of us who use the long term support release have to give up on any expectations of support? -- You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to python-qt4 in ubuntu. https://bugs.launchpad.net/bugs/561303 Title: PyQt4 applications crash at exit -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
Fix released in python-qt4 that should solve the problem in PyLotRO ** Changed in: pylotro Status: New => Fix Released -- PyQt4 applications crash at exit https://bugs.launchpad.net/bugs/561303 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
** Changed in: python-qt4 (Ubuntu) Status: New => Fix Released -- PyQt4 applications crash at exit https://bugs.launchpad.net/bugs/561303 You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to python-qt4 in ubuntu. -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
The problem seems to be fixed in maverick RC amd64. -- PyQt4 applications crash at exit https://bugs.launchpad.net/bugs/561303 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
I can't run the profiler because the segfault happens before it writes the profile output. really annoying. -- PyQt4 applications crash at exit https://bugs.launchpad.net/bugs/561303 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
PyQt 4.7.3 seems to be mostly a bugfix release. Therefore, does it stand any chance to get included to the package repository as an update? The segfault quite annoys me. -- PyQt4 applications crash at exit https://bugs.launchpad.net/bugs/561303 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
Note that even the simplest PyQt programs segmentation fault with the current PyQt version. Try any of the basic examples in python-qt4-doc: j...@jss-laptop:$ python /usr/share/doc/python-qt4-doc/examples/richtext/syntaxhighlighter.py ... Segmentation fault This problem stops my application (Veusz) saving its setting on exit. Please fix this - Fedora took a couple of days to release a new version. -- PyQt4 applications crash at exit https://bugs.launchpad.net/bugs/561303 You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to python-qt4 in ubuntu. -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
Thanks for that. I've changed my code to look like this now. I'll test it with 4.7.2 later and see if I still get a segfault. QtGui.qApp = app app.exec_() QtGui.qApp = None -- PyQt4 applications crash at exit https://bugs.launchpad.net/bugs/561303 You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to python-qt4 in ubuntu. -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
Personally I would classify this as a workaround. IMO not following a good-practice should not result in a segfault. My usage of QApplication is rather unique, in that I create and destroy multiple QApplication instances sequentially, in the same process. You don't need to bother with setting QtGui.qApp if your process stops when the QApplication instance stops. Maybe setting QtGui.qApp = None after each QApplication has shut down is enough to solve the segfault. However, I chose to be thorough and set it always. It's only two lines of extra code. QtCore.qApp is indeed a typo, the code is correct in using QtGui.qApp. Thanks for pointing that out. -- PyQt4 applications crash at exit https://bugs.launchpad.net/bugs/561303 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
Sybren, is that a work around or a good-practice? I don't seem to set QtGui.qApp anywhere in my application at all. However, I'm using 4.7.3 now and I don't encounter this problem at all. If it is a good practice, I will set QtGui.qApp to the current QApplication instance. Also, in your blog you've said: > After a lot of puzzling I found out that QtCore.qApp needs to refer to the running QApplication instance, While your code uses QtGui.qApp. That's a typo I presume? -- PyQt4 applications crash at exit https://bugs.launchpad.net/bugs/561303 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
Just a heads-up: the segfault-at-exit can also be caused by instantiating multiple QApplication instances. This confuses Qt/PyQt and can cause a segfault at the destruction of the second QApplication instance. I've blogged about this (including the solution) at http://stuvel.eu/archive/127/pyqt-segfault-solved -- PyQt4 applications crash at exit https://bugs.launchpad.net/bugs/561303 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
By the way, it seems to be quite a small change from 4.7.2 to 4.7.3. The changelog can be found at http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/ChangeLog -- PyQt4 applications crash at exit https://bugs.launchpad.net/bugs/561303 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
http://article.gmane.org/gmane.comp.python.pyqt-pykde/18961 indicates that version 4.7.3 indeed fixes this issue. Please fix this issue, as it's quite bothersome for me. The crash doesn't just occur at the end of the PyQt process, but when the QApplication is deleted. In my unittests this happens for every test, to ensure inter-test insulation, but due to the segmentation fault the test runner dies while testing. -- PyQt4 applications crash at exit https://bugs.launchpad.net/bugs/561303 You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to python-qt4 in ubuntu. -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
I can confirm this bug in Lucid. -- PyQt4 applications crash at exit https://bugs.launchpad.net/bugs/561303 You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to python-qt4 in ubuntu. -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
** Also affects: pylotro Importance: Undecided Status: New -- PyQt4 applications crash at exit https://bugs.launchpad.net/bugs/561303 You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to python-qt4 in ubuntu. -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs
[Bug 561303] Re: PyQt4 applications crash at exit
** Tags added: lucid -- PyQt4 applications crash at exit https://bugs.launchpad.net/bugs/561303 You received this bug notification because you are a member of Kubuntu Bugs, which is subscribed to python-qt4 in ubuntu. -- kubuntu-bugs mailing list kubuntu-b...@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs