Re: [dev] [surf] Segfault bug

From: Troels Henriksen <>
Date: Thu, 10 Jun 2010 10:20:03 +0200

Gene Auyeung <> writes:

> Hi,
> For a while I've been frustrated when I close a surf window, it takes
> down the process that created it, along with all windows of that
> process. For clicking a link in gmail will open a new window, and
> closing that window sometimes closes the parent window as well. Today
> I had some time to insert printfs into surf.c to find out what's going
> on.

I posted a patch to fix this some time ago. There are three similar
issues as far as I know:

 * When destroying a surf window, you will often end up with a situation
   in which you are in mid-takedown and have destroyed the progress bar,
   yet an event that wishes to update the progress bar will arrive.
   This will usually crash due to a BadWindow error. This can be fixed
   by disabling signals in the destroyclient function:

     g_signal_handlers_disconnect_matched(GTK_WIDGET(c->view), G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, c);

 * Something similar to the above, although harder to fix, in which some
   internal part of WebKit is not done with its work by the time you
   g_free() it. I have not been able to figure out a way to fix this.

 * Fucking modules like Flash and Java not dealing well with being
   closed, resulting in BadWindow errors similar to the first problem.

I advocate simple adding an X11 error handler that ignores BadWindow
errors. This seems like a pretty standard way to do it.

\  Troels
/\ Henriksen
Received on Thu Jun 10 2010 - 08:20:03 UTC

This archive was generated by hypermail 2.2.0 : Thu Jun 10 2010 - 08:24:01 UTC