Re: [spice-gtk][PATCHv2] spice-widget: Protect against a NULL window

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

 



On Tue, 2014-11-25 at 14:38 +0100, Christophe Fergeau wrote:
> Hey,
> 
> On Tue, Nov 25, 2014 at 02:28:01PM +0100, Fabiano Fidêncio wrote:
> > Return early instead of call gtk_widget_get_window() with a NULL window,
> > avoiding segfaults when running on windows using GTK3.
> > 
> > Program received signal SIGSEGV, Segmentation fault.
> > _gdk_windows_has_impl <window=window@entry=0x0> at gdkwindow.c:584
> > <gdb> bt
> >  #0  _gdk_window_has_impl (window=window@entry=0x0) at gdkwindow.c:584
> >  #1  0x70f02821 in gdk_win32_window_get_handle (window=0x0) at
> >      gdkwindow-win32.c:3459
> >  #2  0x00c759ef in update_display (display=0x1b18440) at
> >      spice-widget.c:1297
> >  #3  0x00c77280 in focus_in_event (widget=0x1b18440, focus=0x1b02b68) at
> >      spice-widget.c:1462
> 
> Hmm, do we get a focus-in event on a widget which does not have a
> GdkWindow? this seems unexpected (?)

Seems like we do and this is one thing I still have to debug.

> 
> >  #4  0x665727f5 in ?? () from C:\Program Files\VirtViewer
> >      (GTK3)\bin\libgtk-3-0.dll
> >  #5  0x00000000 in ?? ()
> 
> Small nit, it's not gtk_widget_get_window(NULL) which causes this crash,
> but GDK_WINDOW_HWND(NULL)

Sure, you're right.


> 
> The log accounts for the last hunk in this patch, what about the other
> try_keyboard_grab part? Looking at focus_in_event, I guess it is the
> same trace with s/update_display/try_keyboard_grab ?

Exactly.

Best Regards,
--
Fabiano Fidêncio

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]