>>>> "Stephen" == Stephen J Turnbull
<turnbull(a)sk.tsukuba.ac.jp> writes:
>>>> "Andy" == Andy Piper
<andy(a)xemacs.org> writes:
Andy> Its in my inbug box :) I'm still
trying to fix the crash
Andy> that occurs when you select tabs.
Stephen> Oh, that.
Stephen> At line 2744 of src/glyphs-x.c:
Stephen> XtSetArg (al [0], XtNtopWidget, child);
Stephen> child can be NULL. I don't know how it gets that way.
Stephen> :-)
The patch below fixes the crash, but buggifies the tabs (that is, the
current buffer and the tabs get unsynched each time the assert fails):
Index: src/glyphs-x.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/glyphs-x.c,v
retrieving revision 1.49.2.76
diff -u -r1.49.2.76 glyphs-x.c
--- glyphs-x.c 2000/08/06 09:27:15 1.49.2.76
+++ glyphs-x.c 2000/08/10 06:11:46
@@ -2741,8 +2741,16 @@
Widget child = XtNameToWidget
(IMAGE_INSTANCE_X_WIDGET_ID (ii),
cur->name);
- XtSetArg (al [0], XtNtopWidget, child);
- XtSetValues (IMAGE_INSTANCE_X_WIDGET_ID (ii), al, 1);
+ if (!child)
+ {
+ fprintf (stderr, "uh-oh, busted tabs! (buffer %s)\n",
+ cur->name ? cur->name : "NULL");
+ }
+ else
+ {
+ XtSetArg (al [0], XtNtopWidget, child);
+ XtSetValues (IMAGE_INSTANCE_X_WIDGET_ID (ii), al, 1);
+ }
break;
}
cur = cur->next;
There are four buffers in the initial tabs: ben-mule.diff~,
ben-mule.diff.orig, ben-mule.diff, and *Group* in that order.
Clicking the tabs more or less randomly produces the following on
stderr:
bash-2.04$ uh-oh, busted tabs! (buffer ben-mule.diff~)
uh-oh, busted tabs! (buffer ben-mule.diff.orig)
uh-oh, busted tabs! (buffer ben-mule.diff.orig)
uh-oh, busted tabs! (buffer ben-mule.diff.orig)
uh-oh, busted tabs! (buffer ben-mule.diff~)
uh-oh, busted tabs! (buffer ben-mule.diff~)
uh-oh, busted tabs! (buffer ben-mule.diff~)
uh-oh, busted tabs! (buffer ben-mule.diff~)
uh-oh, busted tabs! (buffer ben-mule.diff.orig)
uh-oh, busted tabs! (buffer ben-mule.diff.orig)
uh-oh, busted tabs! (buffer ben-mule.diff~)
uh-oh, busted tabs! (buffer ben-mule.diff~)
uh-oh, busted tabs! (buffer ben-mule.diff~)
uh-oh, busted tabs! (buffer ben-mule.diff~)
uh-oh, busted tabs! (buffer ben-mule.diff~)
uh-oh, busted tabs! (buffer ben-mule.diff~)
uh-oh, busted tabs! (buffer ben-mule.diff~)
uh-oh, busted tabs! (buffer ben-mule.diff.orig)
There doesn't seem to be any way to get the error to occur for one of
the other buffers, and they never end up in the leftmost positions;
those are monopolized by the two buffers producing the error
messages.
I don't ever get a crash, so it's always a null Widget pointer when
things are bogus.
My hypothesis that the widget passed to XtNameToWidget might be bogus
is presumably wrong; it's constant in the code.
--
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences Tel/fax: +81 (298) 53-5091
_________________ _________________ _________________ _________________
What are those straight lines for? "XEmacs rules."