Re: [gtk-vnc-devel] crash in coroutine
- From: "Daniel P. Berrange" <berrange redhat com>
- To: Jonh Wendell <jwendell gnome org>
- Cc: gtk-vnc-devel List <gtk-vnc-devel lists sourceforge net>
- Subject: Re: [gtk-vnc-devel] crash in coroutine
- Date: Thu, 17 Jan 2008 22:25:39 +0000
On Thu, Jan 17, 2008 at 03:10:47PM -0300, Jonh Wendell wrote:
> Hi, guys.
>
> There is a bug opened against vinagre, about a crash when a host is not
> found. The bug report is at: https://bugs.launchpad.net/bugs/183169
>
> In Ubuntu Gutsy (where I am running now) it works fine. But on Hardy, or
> even in Foresight VMWare image (running GNOME 2.21 alpha) the bug is
> reproducible.
Ok, I think I understand why this happens. In the last bit of code in the
coroutine before it exits it does
g_object_unref(G_OBJECT(obj));
In this case it is causing the vncdisplay widget to be destroyed & free'd.
This includes the co-routine state. Unfortunately, this co-routine state
is still needed in order to switch back to the main context.
Rather than unref'ing the object in vnc_coroutine cleeanup code, we need
to register a 'release' function when initially creating the coroutine
and unref it there instead.
Oh, and we need to fix 'coroutine_swap/_coroutine_release so that they
don't access the 'struct coroutine' object after the 'release' callback
has been called.
The same problem will deinitely impact both ucontext & gthread coroutines.
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]