Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!kth.se!hemuli.tik.vtt.fi!tml From: tml@hemuli.tik.vtt.fi (Tor Lillqvist) Newsgroups: comp.windows.x Subject: Infinite recursion bug in Xt Message-ID: <5043@hemuli.tik.vtt.fi> Date: 3 Aug 90 08:08:24 GMT Organization: Technical Research Centre of Finland, Laboratory for Information Processing (VTT/TIK) Lines: 35 I ran across something that seems like an infinite recursion bug in Xt: Look at Intrinsic.c:_XtWindowedAncestor: if (object == NULL) { String params = XtName(object); Cardinal num_params = 1; XtAppErrorMsg(XtWidgetToApplicationContext(object), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ "noWidgetAncestor", "windowedAncestor", XtCXtToolkitError, "Object \"%s\" does not have windowed ancestor", ¶ms, &num_params); } Now look at Display.c:XtWidgetToApplicationContext: return _XtGetPerDisplay(XtDisplayOfObject(w))->appContext; ^^^^^^^^^^^^^^^^^^^^ And then IntrinsicI.h: #define XtDisplayOfObject(object) \ ((XtIsWidget(object) ? (object) : _XtWindowedAncestor(object)) \ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->core.screen->display) As yo notice, you _XtWindowedAncestor and XtWidgetToApplicationContext will call each other infinitely... I got a (huge) core dump when playing with xtex. -- Tor Lillqvist, working, but not speaking, for the Technical Research Centre of Finland