Technical article 100840

My Motif program fails with the error "Floating exception - core dumped".

OpenServer 5.0.0OpenServer 5.0.2

Written · Last revised

Problem

I have compiled the following sample code using the command:

cc -o foo foo.c -lXm -lXt -lX11 -lXmu -lsocket -lmalloc
Running foo gives the error:
Floating exception - core dumped
#include <stdio.h>
#include <Xm/Form.h>
#include <Xm/Label.h>
main(int argc, char *argv[])
{
  XtAppContext appContext;

Widget appShell = XtVaAppInitialize (&appContext, "DebugTest", NULL, 0, &argc, argv, NULL, NULL);

Widget form = XtVaCreateManagedWidget("", xmFormWidgetClass, appShell, XmNmarginWidth, 1, NULL);

XtVaCreateManagedWidget("LabelString",
xmLabelWidgetClass, form,
XmNleftAttachment, XmATTACH_POSITION,
XmNleftPosition, 0,
NULL);
  XtRealizeWidget(appShell);
  XtAppMainLoop(appContext);
}

Cause

There is a problem with the enhanced form handling code in the X Libraries that ship with SCO OpenServer Release 5.0.0 and SCO OpenServer 5.0.2.

Solution

This problem has been reported to SCO Engineering.

One workaround to the problem is to suppress the Form capability. This can be done by adding the following lines to the .Xdefaults file in the users home directory:

! Allow all enhancements  except FORM
*useIxiAdds:  DRAWINGAREA, EDITRES, XPM3, LIST, CAPSLOCK, PANEDW, NUMLOCK, ENVIRONMENT

From the Xinuos technical article database, record 100840. Reproduced with permission. The original is at www.sco.com/ta/100840, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.