Merge lp:~rohangarg/usb-creator/fix-for-1315866 into lp:usb-creator

Proposed by Rohan Garg on 2014-05-04
Status: Merged
Approved by: Evan on 2014-05-13
Approved revision: 441
Merged at revision: 439
Proposed branch: lp:~rohangarg/usb-creator/fix-for-1315866
Merge into: lp:usb-creator
Diff against target: 45 lines (+20/-0)
2 files modified
bin/usb-creator-kde (+11/-0)
debian/changelog (+9/-0)
To merge this branch: bzr merge lp:~rohangarg/usb-creator/fix-for-1315866
Reviewer Review Type Date Requested Status
Evan (community) 2014-05-04 Approve on 2014-05-13
Michał Zając (community) Approve on 2014-05-04
Review via email: mp+218220@code.launchpad.net
To post a comment you must log in.
Michał Zając (quintasan) wrote :

It fixes the issue for me.

review: Approve
440. By Rohan Garg on 2014-05-05

Changelog++

Evan (ev) wrote :

Can you explain in a comment in the code exactly why this is
necessary? Please convince me this isn't a hack.

Rohan Garg (rohangarg) wrote :

Well, it's more of a workaround at the moment while upstream is sorting out this bug, see [1]. I've cleared a similar patch for other PyQt4 projects with upstream, see [2]

[1] http://www.riverbankcomputing.com/pipermail/pyqt/2014-March/033957.html
[2] http://www.riverbankcomputing.com/pipermail/pyqt/2014-April/034016.html

Evan (ev) wrote :

Sure, but we need to know why it's there and when it's truly safe to
remove. Can you please reference that discussion in a comment in the
code?

441. By Rohan Garg on 2014-05-06

Add more info regarding the workaround in the comments

Rohan Garg (rohangarg) wrote :

Bump?

Evan (ev) wrote :

Ah, thanks for re-raising this. I didn't see that you committed a more detailed explanation.

Merging now.

review: Approve
Rohan Garg (rohangarg) wrote :

Cheerio :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/usb-creator-kde'
2--- bin/usb-creator-kde 2013-01-28 13:24:55 +0000
3+++ bin/usb-creator-kde 2014-05-06 13:10:51 +0000
4@@ -18,6 +18,8 @@
5 import sys
6 import logging
7
8+import sip
9+
10 from dbus import DBusException
11
12 from PyQt4 import uic
13@@ -42,6 +44,15 @@
14 setup_logging()
15 setup_gettext()
16
17+ #FIXME: Workaround for LP: 1315866
18+ # This happens due to the fact that when a Python dict is garbage
19+ # collected the order in which the individual items in the dict are
20+ # garbage collected is unpredictable, causing the dtor's to be called
21+ # after python exits. In order to work around the issue, upstream
22+ # suggested that projects disable the automatic destruction of C++
23+ # instances and C structures
24+ # Ref: http://www.riverbankcomputing.com/pipermail/pyqt/2014-March/033929.html
25+ sip.setdestroyonexit(False)
26 # Add cmdline options
27 options = KCmdLineOptions()
28 options.add("i").add("iso <img>", ki18n("provide a source image (CD or raw disk) to pre-populate the UI."))
29
30=== modified file 'debian/changelog'
31--- debian/changelog 2014-04-01 14:04:42 +0000
32+++ debian/changelog 2014-05-06 13:10:51 +0000
33@@ -1,3 +1,12 @@
34+usb-creator (0.2.57) UNRELEASED; urgency=medium
35+
36+ * Workaround Python Qt4 being sucky (LP: #1315866)
37+ - Known bug in Python Qt4 trying to delete objects twice, workaround by
38+ telling SIP to not call dtors on each object, and instead throwing away
39+ everything at the end
40+
41+ -- Rohan Garg <rohangarg@kubuntu.org> Mon, 05 May 2014 12:04:00 +0200
42+
43 usb-creator (0.2.56) trusty; urgency=medium
44
45 [ Ivan Larionov ]

Subscribers

People subscribed via source and target branches