Stephen J. Turnbull wrote:
Glynn> Did the input-method-motif.c patch get applied to
21.4.0?
No. I was hoping for some experience with the patch, but I guess I'm
just going to take Valdis as a representative sample, apply it to
21.4.1, and pray.
Well, without the patch, using input-method-motif.c seems to guarantee
disaster (for me, and AFAICT for Valdis, deleting a frame always
causes instant segfault).
Glynn> This stack trace looks familiar (although there
isn't any
Glynn> reference to MULE in the configure command).
There also is no reference to XmIm* in the stack trace. (In fact, no
Xm* anything!) Your patch won't help here, I bet---input-method-motif
probably is not linked into Jan's XEmacs. :-/
Yep; I suspect you're right. I'd forgotten about the explicit
_XmImFreeShellData in the stack trace.
You didn't ask for a wild-ass guess, but here it is anyway:
Here's mine: does it go away if you don't pass "--external-widget" to
configure?
Could XEmacs, specifically x_delete_frame(), be systematically
passing
something incorrect to XtDisplayOfObject, which passes it along to
XtIsSubclass?
x_delete_frame() doesn't call XtDisplayOfObject() directly, and I
can't see any obvious indirect call. I did briefly suspect the
following code from x_delete_frame():
#ifdef EXTERNAL_WIDGET
expect_x_error (XtDisplay (FRAME_X_SHELL_WIDGET (f)));
/* for obscure reasons having (I think) to do with the internal
window-to-widget hierarchy maintained by Xt, we have to call
XtUnrealizeWidget() here. Xt can really suck. */
if (f->being_deleted)
XtUnrealizeWidget (FRAME_X_SHELL_WIDGET (f));
XtDestroyWidget (FRAME_X_SHELL_WIDGET (f));
x_error_occurred_p (XtDisplay (FRAME_X_SHELL_WIDGET (f)));
#else
In the EXTERNAL_WIDGET case, it appears to be passing a Widget which
it's just destroyed to XtDisplay().
However, in XFree86 4.0.3 at least, XtDisplay() doesn't call
XtDisplayOfObject, just DisplayOfScreen(widget->core.screen).
In the XmIm* case, the crash was happening via XtDestroyWidget() and
Phase2Destroy(), whereas the stack trace suggests that
x_delete_frame() is calling XtDisplayOfObject directly (although I
suppose that might be an artifact of -fomit-frame-pointer; if Motif
was built with this option, wouldn't that eradicate any trace of Motif
from the stack trace?).
--
Glynn Clements <glynn.clements(a)virgin.net>