GNU bug report logs - #11984
24.1; segfault while deleting a window

Previous Next

Package: emacs;

Reported by: Russell Sim <russell.sim <at> gmail.com>

Date: Thu, 19 Jul 2012 02:17:01 UTC

Severity: normal

Merged with 12175

Found in version 24.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 11984 <at> debbugs.gnu.org, cyd <at> gnu.org, russell.sim <at> gmail.com
Subject: bug#11984: 24.1; segfault while deleting a window
Date: Wed, 25 Jul 2012 18:27:27 +0300
> Date: Wed, 25 Jul 2012 09:15:03 +0200
> From: martin rudalics <rudalics <at> gmx.at>
> CC: cyd <at> gnu.org, russell.sim <at> gmail.com, 11984 <at> debbugs.gnu.org
> 
>  > If you built Emacs with the change, and tooltips work for you,
> 
> How do I test it?  Is evaluating
> 
> (x-show-tip "???")
> 
> enough?

Probably, but I find it easier to move the mouse pointer over some of
the mouse-sensitive areas of the display (tool bar, menu items, mode
line), each time waiting for the tooltip to pop up and then pop down
after a few seconds.

> Because tooltip frames appear fragile.  x_create_tip_frame uses
> 
>    Fset_window_buffer (FRAME_ROOT_WINDOW (f), buffer, Qnil);
> 
> while make_frame has
> 
>      /* Use set_window_buffer, not Fset_window_buffer, and don't let
>         hooks be run by it.  The reason is that the whole frame/window
>         arrangement is not yet fully initialized at this point.  Windows
>         don't have the right size, glyph matrices aren't initialized
>         etc.  Running Lisp functions at this point surely ends in a
>         SEGV.  */
>      set_window_buffer (root_window, buf, 0, 0);
> 
> Wouldn't the fact that the frame has not been set up completely when
> assigning a buffer to its root window suggest that Fset_window_buffer
> should not be used here either?

I know almost nothing about these intimate details.  Exactly what is
it that makes running the hooks safe, and when does it happen during
frame creation, is not documented anywhere, AFAICS.

So feel free to replace the call to Fset_window_buffer with
set_window_buffer, if you think that's more appropriate.




This bug report was last modified 12 years and 282 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.