Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!unido!pcsbst!jkh From: jkh@pcsbst.UUCP (jkh) Newsgroups: comp.windows.x Subject: Problems destroying topLevelShellWidgets Message-ID: <794@pcsbst.UUCP> Date: 3 Apr 89 18:05:11 GMT Reply-To: jkh@violet.berkeley.edu ( Jordan K. Hubbard ) Organization: PCS GmbH, Pfaelzer-Wald-Str. 36, 8000 Muenchen; West-Germany Lines: 52 I have a widget based application that likes to pop up ancillary display windows from time to time, each of which can be closed independently. I create a single top level shell with XtInitialize(). Fine. Then I create one of these other display windows as type "topLevelShellWidget", using XtCreatePopupShell() with my original top level shell as a parent, and pop it up with XtPopup(). Still no problem. Inside this popup shell is a form widget and inside the form are a number of buttons. One of the button's job is to "close" the entire display window. Ok, says I, I'll just XtPopdown() the top level popup shell. Wonderful. Works great. But for various reasons, I can't re-use one of these popup shells once they've been closed, so it doesn't make much sense for me to leave it around, wasting resources. When I try to do an XtDestroyWidget() on the popup shell, the application coredumps. Based on the following stacktrace, can anyone give me some idea of what's going on? #0 0x3f362 in lmalloc (16) #1 0x3f532 in malloc (16) #2 0x15656 in XtMalloc (16) #3 0x15816 in _XtAddCallback (1274020, 1065348112, 99810, 0) #4 0x1877a in XtDestroyWidget (1274020) #5 0x119e2 in TextDestroy (1273644) #6 0x185d0 in Phase2Destroy (1273644) #7 0x18536 in Recursive (1273644, 99710) #8 0x1849a in Recursive (1272924, 99710) #9 0x1849a in Recursive (1272632, 99710) #10 0x18700 in XtPhase2Destroy (1272632, 0, 0) #11 0x15c16 in _XtCallCallbacks (1065348116, 0) #12 0x1a2b6 in XtDispatchEvent (1065348164) #13 0x1a66a in XtAppMainLoop (1163784) #14 0x1a648 in XtMainLoop () #15 0x2e0 in main (1, 1065348434, 1065348442) (main.c line 149) It *is* possible to destroy one of these things, isn't it? Jordan -- -------- Jordan Hubbard PCS Computer Systeme GmbH West Germany UUCP: {uunet,decwrl}!pyramid!pcsbst!jkh ARPA: jkh@violet.berkeley.edu "I'd like a burrito please." "Was?" "Uh. Ich moechte ein Mexicanische 'Burrito', bitte." "Hahahahahahaha.. Das ist ein guter Witz. Du bist toll.." "Hey! It's real easy, just take some cheese, some meat and some beans and roll it up like this.." "Raus!"