Re: [gtk-vnc-devel] [PATCH] Gtk-VNC not packed



Daniel P. Berrange wrote:
On Tue, Jan 15, 2008 at 03:27:52PM +0000, Richard W.M. Jones wrote:
Anthony Liguori wrote:
Richard W.M. Jones wrote:
I don't know if you necessarily want to classify this as a bug, but currently if you create a Gtk-VNC widget but don't pack it, then it will segfault when it tries to draw anything.
I'm not sure what "packed" is. Do we need to wait for realize or something? My concern with this patch is that the buffer disappears until the next resize so when things to get "packed" we don't start displaying like we should.
Sorry, I wasn't clear. This is when you create a Gtk-VNC widget but don't add it to any container, but then you do make it connect to a VNC server. The widget segfaults, because the return value from

Ah I see. Do you think it is a valid use case to create a widget, not add
it to any container and still want to connect ? Or should we consider that
an application bug and try to catch & reject it at the initial call to 'vnc_display_open_host' ?

Well indeed, and hence my comment "I don't know if you necessarily want to classify this as a bug, but ..." in the original post.

BTW, it only crashes after you've supplied the appropriate amount of authentication and it tries to set the canvas to the initial size. This is the stack trace (lots of optimisation, so the parameters don't mean much):

#0  on_resize (opaque=<value optimized out>, width=800, height=600)
    at vncdisplay.c:554
#1 0x00002aaaaaad93f2 in gvnc_resize (gvnc=0x665510, width=6749152, height=81)
    at gvnc.c:1696
#2  0x00002aaaaaadca01 in gvnc_initialize (gvnc=0x665510, shared_flag=0)
    at gvnc.c:2668
#3  0x00002aaaaaae1a96 in vnc_coroutine (opaque=<value optimized out>)
    at vncdisplay.c:839
#4  0x00002aaaaaae393b in coroutine_trampoline (cc=0x664d10)
    at coroutine_ucontext.c:40
#5  0x0000003b87042400 in ?? () from /lib64/libc.so.6
#6  0x00000000006650d8 in ?? ()
#7  0x0000000000000000 in ?? ()

vnc_display_open_host is probably too early to detect this since code such as:

  vnc_display_new ();
  vnc_display_open_host ();
  gtk_container_add ();

is correct because of the delayed creation of the coroutine.

Rich.

--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



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