Operating System - HP-UX
1827204 Members
2477 Online
109716 Solutions
New Discussion

crash when initializing xmTextFieldWidgetClass

 
SOLVED
Go to solution
Bart Vanneste
New Member

crash when initializing xmTextFieldWidgetClass

Hello,

I've a crash when trying to the xmTextFieldWidgetClass on HP-UX 11.11
Motif2.1 is used and X11R6.
Attached is a little program that reproduces the problem. Also the 'call stack' when crashed is included.
I've already installed patch PHSS_28371 but it had no effect.
When I compile on HP-UX 10.20 there is no problem (Motif1.2 / X11R6)

Any ideas on what might cause this and/or
ways to fix it?
A brilliant idea: Something that only happens to others.
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: crash when initializing xmTextFieldWidgetClass

Does the crash create a core dump or a crash dump in /var/adm/crash

If it really crashes the machine, perform q4 analysis on it. Instructions attached.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bart Vanneste
New Member

Re: crash when initializing xmTextFieldWidgetClass

It's only the program that crashes.
No core is dumped.
It says "Bus error" when exiting.
A brilliant idea: Something that only happens to others.
Mike Stroyan
Honored Contributor
Solution

Re: crash when initializing xmTextFieldWidgetClass

This answer is a repeat of my response to you in the dev-tools mailing list. I'll put it here for the benefit of other folks trying to answer the question now and for future searches of the same topic.
---------------------------------------------------------------------------
The Motif2.1 code assumes that the vendorShellWidgetClass has been
initialized before other Motif widget classes. The XtAppInitialize
version of your test works because it creates an ApplicationShell
widget, which initializes the applicationShellWidgetClass and its
superclass, the vendorShellWidgetClass. That calls several functions
to set up global data. The vital function in this case was
_XmInitializeTraits, which initializes a global pointer
used code under by XtInitializeWidgetClass(xmTextFieldWidgetClass).

It is not clear if the Motif2.1 authors were right to assume that
vendorShellWidgetClass would be initialized first. But that is
the way it is. You can work around it with the following call.

#include
XtInitializeWidgetClass(vendorShellWidgetClass);