Re: [gtk-list] Re: gtk+970925 with solaris x11r6



Jens-Ulrik Holger Petersen <petersen@kurims.kyoto-u.ac.jp> writes:
>
>     >> Probably these are all known problems and have been fixed?  Or is
>     >> something wrong here?
> 
>     Marius> I can't reproduce any of them, sorry.  Does the Guile version of
>     Marius> testgtk, test-gtk.scm, crash on you, too?
> 
> Yes.

I think I have found something.  All your crashes happen on windows
with scrollbars, right?  Now scrollbars destroy one of their windows
twice (the trough) as I now found out, and that confuses the ref
counting so that the GdkWindow is freed prematurely and the hash_table
loses its key.

Could you try this patch and tell me if it cures the crashes?

*** gtkhscrollbar.c~	Thu Sep 25 03:29:12 1997
--- gtkhscrollbar.c	Sun Oct 12 22:59:01 1997
***************
*** 147,153 ****
--- 147,155 ----
  
    attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
    widget->window = gdk_window_new (widget->parent->window, &attributes, attributes_mask);
+ 
    range->trough = widget->window;
+   gdk_window_ref (range->trough);
  
    attributes.x = widget->style->klass->xthickness;
    attributes.y = widget->style->klass->ythickness;
*** gtkvscrollbar.c~	Thu Sep 25 03:29:12 1997
--- gtkvscrollbar.c	Sun Oct 12 22:59:03 1997
***************
*** 145,151 ****
--- 145,153 ----
  
    attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
    widget->window = gdk_window_new (widget->parent->window, &attributes, attributes_mask);
+ 
    range->trough = widget->window;
+   gdk_window_ref (range->trough);
  
    attributes.x = widget->style->klass->xthickness;
    attributes.y = widget->style->klass->ythickness;



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