Package: reportbug
Version: 6.4.3
Followup-For: Bug #620225
Dear Maintainer,
I have been looking at this problem and I think I might have some clues on what
is causing the error.
>From what I could find in my searches (gdb mainly) the problem is related to
the fact the reportbug is updating the UI directly from a thread.
Apparently the right way to update the UI directly from a thread is to use
gobject.idle_add().
>From the traces I got from gdb it seems that the problem was coming from the
call to label.set_text () so I modified all the calls to that to use idle_add.
And everything seems to be working ok here, no crashes for me now.
I hope this helps or at least could give you some clues on how to fix the
problem.
I'm not a python programmer so please take my patch with a grain of salt :)
Best regards,
Bruno Ramos
-- Package-specific info:
** Environment settings:
DEBEMAIL="[email protected]"
DEBFULLNAME="Bruno Filipe Oliveira Ramos"
INTERFACE="gtk2"
** /home/brunoramos/.reportbugrc:
reportbug_version "6.4.3"
mode standard
ui gtk2
no-cc
header "X-Debbugs-CC: [email protected]"
smtphost reportbug.debian.org
-- System Information:
Debian Release: 7.0
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1,
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.2.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages reportbug depends on:
ii apt 0.9.7.7
ii python 2.7.3-3
ii python-reportbug 6.4.3
reportbug recommends no packages.
Versions of packages reportbug suggests:
pn claws-mail <none>
pn debconf-utils <none>
pn debsums <none>
pn dlocate <none>
ii emacs23-bin-common 23.4+1-4
ii exim4 4.80-7
ii exim4-daemon-light [mail-transport-agent] 4.80-7
ii file 5.11-2
ii gnupg 1.4.12-7
ii python-gtk2 2.24.0-3+b1
ii python-gtkspell 2.25.3-12
pn python-urwid <none>
ii python-vte 1:0.28.2-5
ii xdg-utils 1.1.0~rc1+git20111210-6
Versions of packages python-reportbug depends on:
ii apt 0.9.7.7
ii python 2.7.3-3
ii python-debian 0.1.21+nmu2
ii python-debianbts 1.11
ii python-support 1.0.15
python-reportbug suggests no packages.
-- no debconf information
--- reportbug/ui/gtk2_ui.py.orig 2013-02-02 00:28:38.063811988 +0100
+++ reportbug/ui/gtk2_ui.py 2013-02-02 00:28:47.891812223 +0100
@@ -616,7 +616,7 @@
def execute (self, prompt, options=None, force_prompt=False, default=''):
# Hackish: remove the text needed for textual UIs...
- self.label.set_text (prompt.replace(' (enter Ctrl+c to exit reportbug without reporting a bug)', ''))
+ gobject.idle_add (self.label.set_text, prompt.replace(' (enter Ctrl+c to exit reportbug without reporting a bug)', ''))
self.entry.set_text (default)
if options:
@@ -673,7 +673,7 @@
def execute (self, prompt):
self.empty_ok = True
# The result must be iterable for reportbug even if it's empty and not modified
- self.label.set_text (prompt)
+ gobject.idle_add (self.label.set_text, prompt)
self.buffer.set_text ("")
self.buffer.emit ('changed')
@@ -762,7 +762,7 @@
def execute (self, prompt):
self.empty_ok = True
- self.label.set_text (prompt)
+ gobject.idle_add (self.label.set_text, prompt)
self.model = gtk.ListStore (str)
self.model.connect ('row-changed', self.validate)
@@ -803,7 +803,7 @@
def execute (self, par, options, prompt, default=None, any_ok=False,
order=None, extras=None, multiple=False):
- self.label.set_text (par)
+ gobject.idle_add (self.label.set_text, par)
self.model = gtk.ListStore (str, str)
self.view.set_model (self.model)
@@ -1011,7 +1011,7 @@
return matches
def execute (self, buglist, sectitle):
- self.label.set_text ("%s. Double-click a bug to retrieve and submit more information." % sectitle)
+ gobject.idle_add (self.label.set_text, "%s. Double-click a bug to retrieve and submit more information." % sectitle)
self.model = gtk.TreeStore (*([str] * len (self.columns)))
for category in buglist:
@@ -1089,7 +1089,7 @@
message = message % args
# make it all on one line, it will be wrapped at display-time
message = ' '.join(message.split())
- self.label.set_text (message)
+ gobject.idle_add (self.label.set_text, message)
# Reportbug should use final_message, so emulate it
if ('999999' in message):
self.set_page_type (gtk.ASSISTANT_PAGE_CONFIRM)
@@ -1215,7 +1215,7 @@
self.default.grab_focus ()
def execute (self, prompt, menuopts, options):
- self.label.set_text (prompt)
+ gobject.idle_add (self.label.set_text, prompt)
buttons = []
for menuopt in menuopts:
@@ -1294,7 +1294,7 @@
return vbox
def set_label (self, text):
- self.label.set_text (text)
+ gobject.idle_add (self.label.set_text, text)
def reset_label (self):
self.set_label ("This operation may take a while")
_______________________________________________
Reportbug-maint mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reportbug-maint