> I do now. I had to correct the patch, tough. There is an obvious
> type (a second definition of xic in the last line) and there is no
> function x_any_window_or_parent_to_frame, so I use
> x_any_window_to_frame. Is the former a 21.2 thing and should be
> available in 21.1 as well?
No. Ditch that patch completely. I should not write late night
patches :-(. However I now have another better theory.
> > It would be very nice to find out why the backtraces are cut short..
> > I have seen that before. I hope it doens't become widespread because
> > debugging crashes will become close to impossible that way.
>
> Yeah, I know. But I really cannot say what the problem is. Somehow
> the backtrace mechnism interacts badly with the stack frame generated
> by the libc/kernel.
Aparrently you can get the right backtrace if you use run Xemacs
directly under gdb. Karl Kleinpaste did that and based on his info we
think it is a problem with x_any_window_to_frame.
[Late breaking news: That you hit the assert is another confirmation
of that].
More importantly Karl was able to find out the offending window id and
a window-tree dump of the frame (see the archive). The conclusion was
made that the menu window was involved.
However I looked at it again, and I think that is wrong. The window is
a horizontal scrollbar!. Can you remember whether one of your windows
had a horizontal scrollbar just before you typed the keys?
I also think I know what the problem is
x_any_window_to_frame checks whether this window is a scrollbar using
x_window_is_scrollbar. That essentially consists of
if (f->mirror_dirty)
update_frame_window_mirror (f);
return (EMACS_INT) x_scrollbar_loop (X_WINDOW_IS_SCROLLBAR, f->root_window,
f->root_mirror, 0, win);
The "x_scrollbar_loop" basically recurses through the XEmacs window
structure to find a window whois scrollbar window has window id 'win'.
The problem is with update_frame_window_mirror(), this basically syncs
the window and scrollbar structure with how it should be. However this
is wrong!
x_any_window_to_frame is called when we have an event generated for a
particular window. This implies that the Xt-window belongs to a widget
that is actually being displayed, i.e. to the old window
structure.
Ulrich could you try this patch? (sorry for using you as a guinea pig
like that instead of giving you a work around to get rid of the
crashes, but you seem to be the only one who can reproduce it failry
consistently).
(this is again untested. But I am fairly certain this will compile)
My only worry is that update_frame_window_mirror could also be called
by other functions in between.
Index: scrollbar-x.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs-20/src/scrollbar-x.c,v
retrieving revision 1.14
diff -u -u -r1.14 scrollbar-x.c
--- scrollbar-x.c 1998/06/02 03:50:57 1.14
+++ scrollbar-x.c 1999/08/18 17:49:35
@@ -681,8 +681,11 @@
if (!FRAME_X_P (f))
return 0;
+ /* No stupid! We do not want to do this. We are using this to process
+ events. These are generated by the _old_ structure.
if (f->mirror_dirty)
update_frame_window_mirror (f);
+ */
return (EMACS_INT) x_scrollbar_loop (X_WINDOW_IS_SCROLLBAR, f->root_window,
f->root_mirror, 0, win);
}