Lesstif and XMT4 (Motif Tools): SegFault XTextWidth

Hello folks,

I stumbled across a problem when trying to port a Linux app to Cygwin with the library XMT (Motif Tools) version 4.0.0.

The app uses XMT (Motif Tools), the convenient gui generator for Motif/X Windows. I can compile the library fine, only the tests do not work. When "mockup"-ing the supplied examples I get the following stacktrace (segmentation fault).

Program received signal SIGSEGV, Segmentation fault.
0x1001f405 in cygX11-6!XTextWidth () from /usr/X11R6/bin/cygX11-6.dll
(gdb) where
#0 0x1001f405 in cygX11-6!XTextWidth () from /usr/X11R6/bin/cygX11-6.dll
#1 0x00403107 in _fu14__XtStrings () at Layout.c:588
#2 0x00518f6d in cygXt-6!XtInitializeWidgetClass ()
from /usr/X11R6/bin/cygXt-6.dll
#3 0x005194cd in cygXt-6!XtInitializeWidgetClass ()
from /usr/X11R6/bin/cygXt-6.dll
#4 0x005199ec in cygXt-6!_XtCreateWidget () from /usr/X11R6/bin/cygXt-6.dll
#5 0x00519b5a in cygXt-6!XtCreateWidget () from /usr/X11R6/bin/cygXt-6.dll
#6 0x00406516 in XmtCreateLayout (parent=0x101038c0, name=0x416182 "layout",
args=0x0, n=0) at Layout.c:2401
#7 0x0040116f in _fu1__XtStrings ()
#8 0x101038c0 in ?? ()
#9 0x00416182 in ?? ()
#10 0x00000000 in ?? ()

It seems that in line 6 of the stacktrace the XmtCreateLayout-Call causes the problem.

Did anyone come across that problem before? The difference in system to the Linux box is solely that cygwin seems to use lesstif, not openmotif (does anyone have any idea, why?) and that it is the cygwin port of xorg-Server.

Any help greatly appreciated,

Thank you,
Martin


ma_meister

ma_meister's picture

Re: Cygwin and XMT 4(Motif Tools): Segmentation Fault XTextWidth

I have just tried it on the PC Linux box: same experiment, "XMT with lesstif" instead of (the working fine) OpenMotif:

Problem appears seemingly the same:

0x00002b6dfcaaf060 in XTextWidth () from /usr/lib64/libX11.so.6
(gdb) where
#0 0x00002b6dfcaaf060 in XTextWidth () from /usr/lib64/libX11.so.6
#1 0x0000000000427c13 in Initialize ()
#2 0x00002b6dfc1f16e9 in ?? () from /usr/lib64/libXt.so.6
#3 0x00002b6dfc1f16b8 in ?? () from /usr/lib64/libXt.so.6
#4 0x00002b6dfc1f2181 in ?? () from /usr/lib64/libXt.so.6
#5 0x00002b6dfc1f2ad6 in _XtCreateWidget () from /usr/lib64/libXt.so.6
#6 0x00002b6dfc221769 in ?? () from /usr/lib64/libXt.so.6
#7 0x00002b6dfc221994 in XtVaCreateManagedWidget () from /usr/lib64/libXt.so.6
#8 0x0000000000408f8f in main (argc=2, argv=0x7fffaef52b68) at mockup.c:109

Does anyone have experiences regarding lesstif and maybe even XMT?

Comments are very appreciated,

Greetings,
Martin