Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!svin02!eba!al.ele.tue.nl!pim From: pim@ele.tue.nl (Pim Buurman) Newsgroups: comp.windows.x.motif Subject: XtGetValues gives Segmentation fault Message-ID: <554@al.ele.tue.nl> Date: 14 Sep 90 15:08:31 GMT Sender: news@eba.eb.ele.tue.nl (The News system) Organization: Eindhoven University of Technology, The Netherlands Lines: 64 I have a problem with the following widget-tree (only the interesting parts are shown). object main_window : XmMainWindow { arguments { XmNmenuBar = command; }; controls { XmMenuBar command; XmScrolledWindow scrollwindow; }; callbacks { MrmNcreateCallback = procedure create_proc (k_main_window); }; }; object scrollwindow : XmScrolledWindow { arguments { XmNverticalScrollBar = XmScrollBar scrollbar; XmNworkWindow = space; }; controls { XmDrawingArea space; XmScrollBar scrollbar; }; callbacks { MrmNcreateCallback = procedure create_proc(k_scrollwindow); }; }; object space : XmDrawingArea { callbacks { MrmNcreateCallback = procedure create_proc(k_space); XmNexposeCallback = procedure exposed(k_space); XmNinputCallback = procedure button_handler(k_space); }; }; The first time when exposed is called, it crashes in XtGetValues with a segmentation fault on our Apollo DN3000: void exposed(w, tag, reason) Widget w; int *tag; XmDrawingAreaCallbackStruct *reason; { Arg wargs[2]; Dimension width, height; XtSetArg(wargs[0], XmNwidth, &width); XtSetArg(wargs[1], XmNheight, &height); XtGetValues(scrollwindow, wargs, 2); I have tried several things, like changing scrollwindow to a BulletinBoard, etc. Nothing worked. However, on our Alliant FX/8 XtGetValues returns a heigth 0 and a wrong width. On our HP 9000/800 XtGetValues returns the RIGHT values. I know, that the HP is too clever with function arguments. My questions are: 1) Is the tree correct ? 2) Might there be a programming error (somewhere else) ? 3) Is there a bug in motif ? We currently use Motif 1.0.A on Apollo and Alliant (self compiled), and Motif 1.0 on HP (from HP).