[comp.windows.x] Error: XmuCvtStringToWidget

rod@scooter.rosemount.com (Rodney Drenth) (04/12/91)

An error exists in the way the String to Widget Conversion routine is
registered with the resource converter in the Athena Form WIdget.
The resource converter should not cache conversions, but does. Under
certain circumstances it will cause sporatic bus errors and segmentation
faults. 

The problem affects the fromVert and fromHoriz resources in the Athena
Form widget.  If these are specified in a resource file (not in a program)
and if the form widget and its children can be destroyed and re-created, it is
possible for the widget ID of the form widget to stay the same but the
Widget ID's of the children to be different.  When this occurs, and
because the Name To Widget conversion is cached, the resource conversion
returns incorrect values, which cause segmentation faults and core dumps.

The problem can be corrected by either not specifying the fromHoriz and
fromVert resources in resource files, or by making a copy of the 
XmuCvtStringToWidget function, modifying it so that it is a new type
resource converter, and changing the ClassInitialize function in the
Athena Form Widget to install your revised StringToWidget function with
XtCacheNone specified.

Rodney Drenth