[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
| Title: | "OSF/Motif" is a trademark | 
| Notice: | MOTIF kit note in 7.* | 
| Moderator: | GOOEY::GRASS | 
|  | 
| Created: | Mon Aug 07 1989 | 
| Last Modified: | Thu Jun 05 1997 | 
| Last Successful Update: | Fri Jun 06 1997 | 
| Number of topics: | 5973 | 
| Total number of notes: | 24620 | 
5951.0. "Segmentation fault in XtDestroyWidget under DUNIX 4.0b" by RDGENG::READINGS_R (Richard Readings) Thu Apr 10 1997 04:00
The following code example, together with the customer's own Motif library
(libXm.so), works fine with DUNIX 3.2c but suffers a segmentation fault when it
calls XtDestroyWidget under DUNIX 4.0b. 
The segmentation fault only occurs with the environment variable
"WINTIF_COMPATIBILITYMODE" set to "Windows95", which modifies the behaviour of
the customer's libXm.so. The library is available via anonymous ftp from
apc013.reo.dec.com:/pub/libXm.so.
The example runs OK under DUNIX 4.0x with the DUNIX 3.2c libXt.so however. Can
the customer (ISV) ship this with his Motif library?
Richard
------------------------------ code example -------------------------------
#include <stdio.h>
#include <math.h>
#include <Xm/Xm.h>
main (argc, argv)
int argc;
char **argv;
{
    XtAppContext context;
    Widget shell, container, draw, scale1, scale2;
    Display *display;
    int i;
    Visual *visual;
    Colormap cmap;
    unsigned int depth;
    XtToolkitInitialize ();
    context = XtCreateApplicationContext ();
    display = XtOpenDisplay (context, NULL, NULL, "Scale",
                             NULL, NULL,
                             &argc, argv);
    /* Create a temporary shell so application resources can be fetched from the
       resource database */
    shell = XtVaAppCreateShell (NULL, "ColourWheel",
                                applicationShellWidgetClass,
                                display, NULL);
    
    /* Now the depth, visual and colormap is known, destory the old, temporary
       shell and create a new one */
    XtDestroyWidget (shell);
}
| T.R | Title | User | Personal Name
 | Date | Lines | 
|---|