[Motiftools-bugs] XmtInputField:Initialize failsto copy String resources
Brought to you by:
motiftools
From: <mot...@li...> - 2004-06-23 20:04:56
|
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D XMT BUG REPORT FORM --------------------------- To: mot...@li... Subject: XmtInputField:Initialize failsto copy String resources YOUR NAME: Fred L. Kleinschmidt YOUR E-MAIL ADDRESS: fre...@bo... VERSION OF XMT: 4.0.0 HARDWARE AND OPERATING SYSTEM: (HP-UX_11.0, AIX4.3, IRIX6.5, SunOS5.8) X LIBRARIES: X11R6 MOTIF LIBRARY: Motif 2.1.0 LESSTIF LIBRARY: =20 COMPILER NAME AND VERSION: Ansi-C AREA: XmtInputField ONE-LINE SUMMARY: Initialize method fails to make copy of String = resources. FULL DESCRIPTION: (Describe the bug or enhancement request below.) The XmtInputField Initialize method fails to make a local copy of the "pattern" and "input" resources. However, the SetValues and Destroy=20 methods free this resource. This causes a crash on some platforms, especially if the resource is initialized with a string constant. DUPLICATE BY: [If you can duplicate the bug, please send us simple code that will allow us to duplicate it too; this will help the debugging process.] WORKAROUND: [If you've found a temporary workaround for the bug, please describe = it.] SUGGESTED FIX:=20 Initialize method should include: if ( iw->input_field.pattern ) { iw->input_field.pattern =3D XtNewString( iw->input_field.pattern = ); } and similarly for iw->input_field.input REPEAT BY: [What you did to get the error; include test program or session transcript if at all possible.] Fred L. Kleinschmidt Associate Technical Fellow Technical Architect, Common User Interface Services e-Business Technology Center M/S 2R-94 (206)544-5225 |