| Description: |
OriginalBugID: 3872 Bug
Version: 8.2.2
SubmitDate: '1999-12-13'
LastModified: '1999-12-21'
Severity: CRIT
Status: Closed
Submitter: techsupp
ChangedBy: hobbs
RelatedBugIDs: 716
OS: IRIX
OSVersion: IRIX 6.5
Machine: Origin 2000, Octanes
ClosedDate: '1999-12-21'
Name:
Rob Ratcliff
Extensions:
Tix, Incr Tcl/Tk, sox
CustomShell:
Only the patch described above
ReproducibleScript:
The tixwish interpretter crashed sometimes when a toplevel window
(popup) is deleted.
I haven't been able to duplicate the problem in a small application
to attach, but it does happen reliably, sometimes after deleting
the problematic popup window 2-3 times.
ObservedBehavior:
Sometimes, when a toplevel window is deleted tixwish crashes
with the error:
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 40 (X_TranslateCoords)
Resource id in failed request: 0x1c002b6
Serial number of failed request: 34982
Current serial number in output stream: 34982
DesiredBehavior:
Toplevel window is destroyed without crashing interpretter
Patch:
*** tkUnixWm.c.origThu Apr 15 18:51:47 1999
--- tkUnixWm.cMon Dec 13 13:49:55 1999
***************
*** 3489,3494 ****
--- 3489,3495 ----
int x, y, childX, childY, tmpx, tmpy, bd;
WmInfo *wmPtr;
TkWindow *winPtr, *childPtr, *nextPtr;
+ Tk_ErrorHandler handler;
TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr;
/*
***************
*** 3528,3539 ****
* the toplevel.
*/
while (1) {
if (XTranslateCoordinates(Tk_Display(tkwin), parent, window,
x, y, &childX, &childY, &child) == False) {
! panic("Tk_CoordsToWindow got False return from XTranslateCoordinates");
}
if (child == None) {
return NULL;
}
for (wmPtr = (WmInfo *) dispPtr->firstWmPtr; wmPtr != NULL;
--- 3529,3546 ----
* the toplevel.
*/
+ handler = Tk_CreateErrorHandler(Tk_Display(tkwin), -1, -1, -1,
+ (Tk_ErrorProc *) NULL, (ClientData) NULL);
while (1) {
if (XTranslateCoordinates(Tk_Display(tkwin), parent, window,
x, y, &childX, &childY, &child) == False) {
! fprintf (stderr, "Tk_CoordsToWindow got False return from XTranslateCoordinates\n");
! fflush (stderr);
! return NULL;
! /* panic("Tk_CoordsToWindow got False return from XTranslateCoordinates"); */
}
if (child == None) {
+ Tk_DeleteErrorHandler(handler);
return NULL;
}
for (wmPtr = (WmInfo *) dispPtr->firstWmPtr; wmPtr != NULL;
***************
*** 3556,3561 ****
--- 3563,3569 ----
}
gotToplevel:
+ Tk_DeleteErrorHandler(handler);
winPtr = wmPtr->winPtr;
if (winPtr->mainPtr != ((TkWindow *) tkwin)->mainPtr) {
return NULL;
PatchFiles:
unix/tkUnixWm.c
|