Tk Source Code

View Ticket
Login
Ticket UUID: 220647
Title: "winfo containing" can crash wish
Type: Bug Version: final: 8.2.3
Submitter: welch Created on: 2000-10-31 23:47:24
Subsystem: 65. Generic Window Operations Assigned To: nobody
Priority: 2 Severity:
Status: Closed Last Modified: 2001-03-28 05:12:56
Resolution: Fixed Closed By: dgp
    Closed on: 2001-03-27 22:12:56
Description:
OriginalBugID: 3983 Bug
Version: 8.2.3
SubmitDate: '2000-01-06'
LastModified: '2000-01-07'
Severity: SER
Status: Released
Submitter: techsupp
ChangedBy: hobbs
RelatedBugIDs: 716
OS: Solaris
OSVersion: Solaris 7
Machine: Sparc
FixedDate: '2000-01-07'
FixedInVersion: 8.3b1


Name:
Colin McDonald

ReproducibleScript:
The following simplified script consistently fails under Solaris 7:

toplevel .top1
toplevel .top2
update
set x [winfo rootx .top2]
set y [winfo rooty .top2]
destroy .top2
winfo containing $x $y

ObservedBehavior:
wish exits with the following Xlib error message:

X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  40 (X_TranslateCoords)

DesiredBehavior:
The Tk routine Tk_CoordsToWindow has no protection against windows being
deleted.  It should probably use Tk_CreateErrorHandler and/or ignore
Tk windows in the process of being deleted.



This was coincidentally fixed in 8.3b1 by bug 716 (for Tix) where
the panic was changed to a stderr message with the error handler
used. 
-- 01/07/2000 hobbs