I am now seeing core dumps when I cancel or close a dialog box.
It is very easy to reproduce this. Click file->open then cancel in the dialog
box.
I found an entry in the list (21.5.10 crash on Solaris 2.8) that matches the
problem I am seeing. According to ddd, the problem is that the
find_window_mirror_internal crashes because the window and the window mirror
are not in sync. win->hchild is non-null but rmir->hchild is NULL.
find_window_mirror checks if win is null but does not check if the mirror is
null. The for loop should check both win and that rmir is not NULL.
If the two data structures are never supposed to be out of sync then a warning
message can be added, i.e. remove the #if 0
/* Given a real window, find the mirror structure which contains its
redisplay structures. */
static struct window_mirror *
find_window_mirror_internal (Lisp_Object win, struct window_mirror *rmir,
struct window *w)
{
for (; !NILP (win) && (rmir != NULL);
win = XWINDOW (win)->next, rmir = rmir->next)
{
if (w == XWINDOW (win))
return rmir;
if (!NILP (XWINDOW (win)->vchild))
{
struct window_mirror *retval =
find_window_mirror_internal (XWINDOW (win)->vchild,
rmir->vchild, w);
if (retval) return retval;
}
if (!NILP (XWINDOW (win)->hchild))
{
struct window_mirror *retval =
find_window_mirror_internal (XWINDOW (win)->hchild,
rmir->hchild, w);
if (retval) return retval;
}
}
#if 0
if (!NILP(win) && (NULL == rmir))
{
warn_when_safe(Qwindowp, Qwarning, "XEmacs: %s: %s: %s:\n"
"window and mirror are out of sync.\n"
"win != NILP but mirror = NULL!",
__FILE__, __LINE__, __FUNCTION__);
}
#endif
return 0;
}
-Aaron