Suse 10 x86_64 motif core dump when creating the main window

Hi there,

I am getting a weird problem since I upgrade my Linux desktop from 9.3 to 10.0 in 64bits.
My code which was working fine until now crashes in the following routine:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
0 0x00000000005f4008 in xmPrimitiveClassRec ()
#1 0x00002aaaab8805c6 in _XtCreateIndirectionTable () from /usr/X11R6/lib64/libXt.so.6
#2 0x00002aaaab880989 in _XtGetResources () from /usr/X11R6/lib64/libXt.so.6
#3 0x00002aaaab86a5f9 in XtInitializeWidgetClass () from /usr/X11R6/lib64/libXt.so.6
#4 0x00002aaaab86ab41 in _XtCreateWidget () from /usr/X11R6/lib64/libXt.so.6
#5 0x00002aaaab8985f9 in XtOverrideTranslations () from /usr/X11R6/lib64/libXt.so.6
#6 0x00002aaaab8988d6 in XtVaCreateManagedWidget () from /usr/X11R6/lib64/libXt.so.6
#7 0x0000000000407804 in zgMainWinCreate ()
#8 0x000000000046cd65 in zgGuiMain ()
#9 0x0000000000412209 in zmGuiInit ()
#10 0x00000000004072e7 in zmMasterInit ()
#11 0x0000000000406e17 in main ()

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

The code used is fairly straight forward and as follows:

XtSetLanguageProc(NULL, NULL, NULL);
toplevel = XtVaAppInitialize(&app_context, "zgui",
NULL, 0, &argc, argv, fallbacks, NULL);

main_win = XtVaCreateManagedWidget("mainwin",
xmMainWindowWidgetClass, toplevel,
NULL);
iconInit(main_win);

main_form = XtVaCreateManagedWidget("rowcol",
xmRowColumnWidgetClass, main_win,
XmNorientation, XmVERTICAL,
XmNpacking, XmPACK_TIGHT,
XmNresizable, True,
XmNadjustLast, True,
XmNadjustMargin, True,
XmNresizeHeight, True,
XmNresizeWidth, True,
NULL);

main_tools = zgMainWinAddToolbars(main_form);
main_output = zgOutputCreate(main_form);
XtVaSetValues(main_output,
XmNleftAttachment, XmATTACH_FORM,
XmNrightAttachment, XmATTACH_FORM,
XmNtopAttachment, XmATTACH_WIDGET,
XmNtopWidget, main_tools,
XmNbottomAttachment, XmATTACH_FORM,
NULL);

wmdel = XmInternAtom(XtDisplay(toplevel), "WM_DELETE_WINDOW", False);
XmAddWMProtocolCallback(toplevel, wmdel, zgFileQuitCB, NULL);

XtRealizeWidget(toplevel);
zgMainWinInitialize();

I do not understand what is happening and would greatly appreciate any help. I am using gcc to compile with the following flags:
gcc -O -pipe -Wall -I/usr/lib64 -I/usr/X11R6/include -m64 -c
and link with the following libraries:
-lm -L/usr/X11R6/lib64 -lGLw -lGLU -lGL -lXp -lXm -lXaw -lXmu -lXext -lXt -lSM -lICE -lX11

My system various versions are as follows:
KDE 3.5.2 Level "a"
Kernel 2.6.13-15.8-smp
OpenMotif 2.2.3-13
xorg-x11 6.8.2.100
gcc 4.0.2
glibc 2.3.5-40

Note