Re: glib-2.22.5, gtk-2.18.8 and firefox 3.6



Fix confirmed.  Good work on the bisect.  Patch below.

diff -Naur gtk+-2.18.8.orig/gtk/gtkentry.c gtk+-2.18.8/gtk/gtkentry.c
--- gtk+-2.18.8.orig/gtk/gtkentry.c	2010-03-15 18:36:16.000000000 -0400
+++ gtk+-2.18.8/gtk/gtkentry.c	2010-03-17 11:31:42.000000000 -0400
@@ -6668,8 +6668,11 @@
   g_object_notify (obj, "invisible-char-set");
   g_object_thaw_notify (obj);
 
-  gtk_editable_set_position (GTK_EDITABLE (entry), 0);
-  gtk_entry_recompute (entry);
+  if (priv->buffer)
+    {
+      gtk_editable_set_position (GTK_EDITABLE (entry), 0);
+      gtk_entry_recompute (entry);
+    }
 }
 


On 03/17/2010 10:20 AM, Allin Cottrell wrote:
> 
> On Tue, 16 Mar 2010, Marty Jack wrote:
> 
>> I confirm this.  LFS, glib-2.22.4, gtk-2.18.8, firefox 3.6 and
>> thunderbird 3.0.3 both fail on startup with that or a similar
>> backtrace.  Every other GTK application I tried worked before I
>> reverted to 2.18.7.
> 
> Same here (firefox 3.6 was the only GTK app I tried that failed
> with gtk-2.18.8). After some bisection:
> 
> * The GLib update from 2.22.4 to 2.22.5 is not relevant.
> * The GTK change that prevents firefox 3.6 from running is the
>   modification of gtk/gtkentry.c.
> 
> The only change in gtkentry.c is the addition of the code
> 
>  gtk_editable_set_position (GTK_EDITABLE (entry), 0);
>  gtk_entry_recompute (entry);
> 
> in two places in the function gtk_entry_set_buffer(). It is the
> second use of this code that produces the segfault.  I don't
> pretend to understand exactly what's going on here, but I notice
> that the first use is conditional on priv->buffer not being NULL.
> If I conditionalize the second invocation in the same way firefox
> does not crash.
> 
> Allin Cottrell
> 
> 
> 
> 
> 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]