On Sat, Jan 14, 2017 at 09:38:53PM +0000, Simon McVittie wrote:
> On Sat, 14 Jan 2017 at 19:50:17 +0000, Simon McVittie wrote:
> > > On Mon, Jan 9, 2017 at 2:21 PM, James Clarke <jrt...@debian.org> wrote:
> > > > I would guess there are some UI
> > > > interactions happening not on the main UI thread.
> > 
> > I found a couple of places where this was done wrong. I'll send a
> > patch series soon.
> 
> Try these?
> 
> They seem to work here, but I didn't get this crash myself (in GNOME
> on Wayland with Gtk's standard Adwaita theme, if it matters) so I can't
> say whether they are a complete fix.

I'm not sure why it's working for me and not you. That fixes the
segfault, but I still get:

> Traceback (most recent call last):
>   File "/usr/lib/python3/dist-packages/reportbug/ui/gtk2_ui.py", line 692, in 
> validate
>     value = self.get_value()
>   File "/usr/lib/python3/dist-packages/reportbug/ui/gtk2_ui.py", line 1355, 
> in get_value
>     self.info_buffer.get_end_iter())
> TypeError: Gtk.TextBuffer.get_text() takes exactly 4 arguments (3 given)

After applying the attached patch on top of your series, I can get to
the editor, type, and progress to the final submission options screen. I
have yet to use it to report an actual bug, but it looks promising :)

Regards,
James
>From c88fbf24a8fb7f77d4ffa6b9b46d6d2e09912345 Mon Sep 17 00:00:00 2001
From: James Clarke <jrt...@debian.org>
Date: Sat, 14 Jan 2017 23:15:49 +0000
Subject: [PATCH] gtk2_ui: Gtk.TextBuffer.get_text needs include_hidden_chars
 given

This used to default to True with PyGTK, but needs to be given
explicitly with gi.
---
 reportbug/ui/gtk2_ui.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/reportbug/ui/gtk2_ui.py b/reportbug/ui/gtk2_ui.py
index 5a5e92c..c29ec7e 100644
--- a/reportbug/ui/gtk2_ui.py
+++ b/reportbug/ui/gtk2_ui.py
@@ -1352,7 +1352,8 @@ class EditorPage(Page):
     def get_value(self):
         _assert_context(ui_context)
         info = self.info_buffer.get_text(self.info_buffer.get_start_iter(),
-                                         self.info_buffer.get_end_iter())
+                                         self.info_buffer.get_end_iter(),
+                                         True)
         if not info.strip():
             return None
         subject = self.subject.get_text().strip()
-- 
2.11.0

Reply via email to