Hi, I encountered a stupid problem ... First have a look at the following piece of code : ----------------------------------------- void G4UIRoot::Exit() { gSystem->ProcessEvents(); if( (UI = G4UImanager::GetUIpointer())) { UI->SetCoutDestination(NULL); UI->SetSession(NULL); UI = G4UImanager::GetUIpointer(); gSystem->ProcessEvents(); } if (historyFrame) { delete historyFrame; // inherits from "public TGMainFrame" historyFrame = ((G4RootTextFrame *)0); gSystem->ProcessEvents(); } if (outputFrame) { delete outputFrame; // inherits from "public TGMainFrame" outputFrame = ((G4RootTextFrame *)0); gSystem->ProcessEvents(); } if (errorFrame) { delete errorFrame; // inherits from "public TGMainFrame" errorFrame = ((G4RootTextFrame *)0); gSystem->ProcessEvents(); } if (mainFrame) { delete mainFrame; // inherits from "public TGMainFrame" mainFrame = ((G4RootMainFrame *)0); gSystem->ProcessEvents(); } if (!existedRint) { gApplication->Terminate(0); // Rint gSystem->ProcessEvents(); } } ----------------------------------------- Then some explanations ... On "Exit" this is expected to close and destroy max. 4 of X11 windows (historyFrame, outputFrame, errorFrame, mainFrame). The first version of this routine had no "gSystem->ProcessEvents();" at all and then it was sure that a couple of : Error in <RootX11ErrorHandler>: BadWindow (invalid Window parameter) (XID: 54526138) Error ... BadDrawable ... (something like this) would appear after one tried to "Exit". Now, the routine contains a lot of "gSystem->ProcessEvents();" and in principle there are no X11 errors present ... unfortunately, from time to time (very rarely) the "BadWindow" errors still appears. Can one make this routine more robust ? Any help appreciated, Thanks in advance, Jacek.
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:48 MET