Re: [Sawfish] periodic segfault

[ Thread Index | Date Index | More lists.tuxfamily.org/sawfish Archives ]


Maybe I got it wrongly. Librep is (almost) single-threaded.  My new
guess is that w is not Lisp_Window, which is a structure defined in
sawfish.h. If some other pointer is casted, it can probably cause
segfault. (I don't understand C much, either. :P)

Lisp_Window itself is a purely sawfish object. (Librep provides ways to
extend its lisp in C, and Sawfish does do some to implement things it
needs for WM.) So X's race conditions can't affect if it's limited
to refresh_frame_part(). If this is the case, it's quite nasty.

It also includes the possibility that fp is not really a
frame_part. In your case, it was obtained in leave_notify() in
events.c, which had invoked find_frame_part_by_window() in frames.c:
------------------------------------------------------------------------

/* Find the frame-part that is drawn in window ID */
struct frame_part *
find_frame_part_by_window (Window id)
{
    union {
        struct frame_part *f;
        XPointer p;
    } fp;

    return XFindContext (dpy, id, window_fp_context, &fp.p) ? 0 : fp.f;
}
------------------------------------------------------------------------
Here, `id' seems to be an id in Xlib. I don't know What XFindContext is.

That's all for now.
Teika (Teika kazura)


-- 
--
Sawfish ML


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/