[MacPorts] #29659: gtk3 is broken on macs(all versions)

MacPorts noreply at macports.org
Tue May 31 07:47:52 PDT 2011


#29659: gtk3 is broken on macs(all versions)
-----------------------------------+----------------------------------------
 Reporter:  krugomvolki@…          |       Owner:  singingwolfboy@…           
     Type:  defect                 |      Status:  new                        
 Priority:  Normal                 |   Milestone:                             
Component:  ports                  |     Version:  1.9.2                      
 Keywords:                         |        Port:  gtk3                       
-----------------------------------+----------------------------------------
Changes (by macsforever2000@…):

  * owner:  macports-tickets@… => singingwolfboy@…


Old description:

> copy&paste, drag-n-drop are broken on mac port of gtk3 due to null or
> uninitialized pointers being dereferenced
>
> how to reproduce:
> build gtk3 with +no_x11 +quartz variants, run gtk3-demo, select
> "clipboard" demo.
> try to paste text by pressing the button "paste" and see warning in
> console: assertion GDK_IS_DISPLAY(...) failed. text in not inserted in
> the text field;
> try to drag an image at the bottom of window, program crashes with bus
> error. last 2 calls in call stack are:
> #0  0x006c605a in gtk_style_context_save (context=0x14) at
> gtkstylecontext.c:1727
> #1  0x007b099e in gtk_drag_highlight_draw (widget=0x14, cr=0x24a160,
> data=0x0) at gtkdnd-quartz.c:352
>

> in order to fix these bugs, the following functions must be patched:
> gtk_clipboard_wait_for_contents() in gtk/gtkclipboard-quartz.c
>
>       selection_data = g_slice_new0 (GtkSelectionData);
>       selection_data->selection = clipboard->selection;
>       selection_data->target = target;
>       //FIX: set display!!!!!
>       selection_data->display=clipboard->display;
>
> and
>
>   selection_data = _gtk_quartz_get_selection_data_from_pasteboard
> (clipboard->pasteboard,
>                                    target,
>                                    clipboard->selection);
>   //FIX: set display!!!!!
>   if(selection_data)selection_data->display=clipboard->display;
>

> in gtk/gtkdnd-quartz.c, gtk_style_context_save()
>
>   //GtkStyleContext *context;
>   //FIX: initialize pointer before using it!!!!
>   GtkStyleContext *context=gtk_widget_get_style_context (widget);
>   gtk_style_context_save (context);
>
> after these patches, i've got  gtk3 working properly on mac os 10.5
> see also: https://bugzilla.gnome.org/show_bug.cgi?id=651224

New description:

 copy&paste, drag-n-drop are broken on mac port of gtk3 due to null or
 uninitialized pointers being dereferenced

 how to reproduce:
 build gtk3 with +no_x11 +quartz variants, run gtk3-demo, select
 "clipboard" demo.
 try to paste text by pressing the button "paste" and see warning in
 console: assertion GDK_IS_DISPLAY(...) failed. text in not inserted in the
 text field;
 try to drag an image at the bottom of window, program crashes with bus
 error. last 2 calls in call stack are:
 {{{
 #0  0x006c605a in gtk_style_context_save (context=0x14) at
 gtkstylecontext.c:1727
 #1  0x007b099e in gtk_drag_highlight_draw (widget=0x14, cr=0x24a160,
 data=0x0) at gtkdnd-quartz.c:352
 }}}

 in order to fix these bugs, the following functions must be patched:
 gtk_clipboard_wait_for_contents() in gtk/gtkclipboard-quartz.c
 {{{
       selection_data = g_slice_new0 (GtkSelectionData);
       selection_data->selection = clipboard->selection;
       selection_data->target = target;
       //FIX: set display!!!!!
       selection_data->display=clipboard->display;
 }}}
 and
 {{{
   selection_data = _gtk_quartz_get_selection_data_from_pasteboard
 (clipboard->pasteboard,
                                    target,
                                    clipboard->selection);
   //FIX: set display!!!!!
   if(selection_data)selection_data->display=clipboard->display;
 }}}

 in gtk/gtkdnd-quartz.c, gtk_style_context_save()
 {{{
   //GtkStyleContext *context;
   //FIX: initialize pointer before using it!!!!
   GtkStyleContext *context=gtk_widget_get_style_context (widget);
   gtk_style_context_save (context);
 }}}

 after these patches, i've got  gtk3 working properly on mac os 10.5
 see also: https://bugzilla.gnome.org/show_bug.cgi?id=651224

--

Comment:

 In the future, please use WikiFormatting and the Preview button to check.
 Also please Cc the maintainer(s). I have fixed these for you.

-- 
Ticket URL: <https://trac.macports.org/ticket/29659#comment:1>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list