Ralf Soergel writes:
To post to the list, you need to be a member, or use the
report-xemacs-bug function. These simple tests catch a lot of "new"
spam that gets through the content filters.
Thanks for figuring this out.
(gdb) ptype ThreeDWidget
type = struct _ThreeDRec {
CorePart core;
SimplePart simple;
ThreeDPart threeD;
} *
(gdb) ptype GaugeWidget
type = struct _GaugeRec {
CorePart core;
SimplePart simple;
ThreeDPart threeD;
LabelPart label;
GaugePart gauge;
} *
This is as expected.
GaugeWidget should inherit ThreeDWidget, ok. But the offset of the
ThreeDPart will depend on the used struct type for dereferencing:
(gdb) p &((GaugeWidget)w)->threeD
$9 = (ThreeDPart *) 0x210f378
(gdb) p &((ThreeDWidget)w)->threeD
$10 = (ThreeDPart *) 0x210f380
this leads to misinterpreted variables in ThreeDPart and below in the
GaugeWidget and results in SIGSEGV
The different offsets seems result of different versions of the
SimpleWidgetClass in my runtime loaded /usr/lib64/libXaw3d.so.8 and
the libXaw3d version at xemacs compile time. See the difference:
Right, I see it now. This is because (at least in my Gentoo system)
when I grepped the /usr/include/X11 tree, there was no #define of
XAW_INTERNATIONALIZATION there, but it's used in many of the widget
struct declarations. So the "Boolean international" declaration isn't
part of the structure as compiled into XEmacs code that accesses the
struct, although apparently it is there in the distributed libraries.
Maybe in compiling system XAW_INTERNATIONALIZATION was not set
during build of athena lib, but in my running system it was.
Also see in include/X11/Xaw3d/SimpleP.h for meaning of
XAW_INTERNATIONALIZATION
But I don't know how to fix. Do we need a static linked xemacs?
No, we need statically linked Xorg developers. Changing the structure
of SimpleWidget was a bad idea in the first place, but they couldn't
even bother to keep Xaw3d in sync with Xaw. I suspect that
distributors have figured out that they need to build Xaw3d with
XAW_INTERNATIONALIZATION, but it doesn't get defined because there's
no place for it to be defined (it should be in XlibConf.h, I think,
but the regular Xaw doesn't use it).
I don't have time right now, maybe tonight, but you could try
building XEmacs with
./configure <your usual options> XAW_INTERNATIONALIZATION=1
I think the configure test is pretty easy (link to libXaw3d, check if
the w->SimplePart.internationalization member is present, if so,
#define XAW_INTERNATIONALIZATION).
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta