Ulrich Drepper <drepper(a)cygnus.com> writes:
> :-) What compiler were you using?
A quite stable egcs release.
Well the stable egcs 1.0.3 and gcc 2.8.1. releases are responsible for
about half the crashes in our bug tracking archive, so I have got into
the habit of asking.
However this almost for sure a real XEmacs bug.
Anyhow, I have now a version with all debug info compiled in and
will
try to get more information.
Well. I think that unless you also set x_debug_events to 1 using a
debugger it won't help much.
I am pretty sure (based on Karl's backtrace), that the crash can be
made to go away if we simply chop the
XIC xic = FRAME_X_XIC (x_any_window_to_frame
(get_device_from_display (event->display),
event->window));
line in event-Xt.c into pieces and do nothing if x_any_window_to_frame
returns NULL. However as Kyle says, it would be much nicer to actually
not get into that situation in the first place. Thus, observing that
the window still has a parent that we didn't delete: Can you try out
this patch? In particular can you trigger the assert? (which replaces
the crash).
The patch is of the "untested but obvious type".
Index: event-Xt.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/event-Xt.c,v
retrieving revision 1.41.2.11
diff -u -u -r1.41.2.11 event-Xt.c
--- event-Xt.c 1999/07/30 09:14:01 1.41.2.11
+++ event-Xt.c 1999/08/17 00:20:50
@@ -780,9 +780,16 @@
int bufsiz = sizeof (buffer);
Status status;
#ifdef XIM_XLIB
- XIC xic = FRAME_X_XIC (x_any_window_to_frame
+ XIC xic;
+ struct frame *f;
+
+ /* Sometimes we get a keysym for a window that we have deleted,
+ but its parent is still known too us. */
+ f = x_any_window_or_parent_to_frame
(get_device_from_display (event->display),
- event->window));
+ event->window);
+ assert(f != NULL);
+ XIC xic = FRAME_X_XIC (f);
#endif /* XIM_XLIB */
#endif /* HAVE_XIM */