The TkWmStackorderToplevel function in unix/tkUnixWm.c
seems to incorrectly calculate the number of toplevels
when they are displayed on different displays. This
results in the message "num matched toplevel windows
does not equal num children" and then wish aborts.
Script to reproduce the situation:
# wish -display :0
% toplevel .x -screen :1
.x
% wm stackorder .
num matched toplevel windows does not equal num children
Aborted
In a conversation on the Tcler's chat Joe English
remarked the following about this:
The point where it's panicking looks to me like it's
not really an error condition at all (let alone a fatal
one) -- More like "I'm making an assumption about what
the state of the system should be, and crashing hard if
that assumption isn't true". But in this case the
assumption in question (a) doesn't always hold and
probably (b) doesn't even need to hold for the code to
work.
Logged In: YES
user_id=90858
Could you test out the following patch. It was created on
the HEAD
but it should work with Tcl 8.4 as well. The patch just
limits the
matched toplevel wrappers to toplevels on the same display
as the
parent window that is passed in.
Patch to fix wm stackorder panic
Logged In: YES
user_id=37987
I didn't have any problem applying the patch against Tk 8.4.9.
My testing showed no sign of the bug anymore.
Logged In: YES
user_id=90858
Fixed in CVS by checkin on 2005-04-07. Will back port to
8.4 in a bit if I don't hear any complaints about the CVS
version.
Logged In: YES
user_id=72656
backport?
Logged In: YES
user_id=90858
Check fix into 8.4 branch on 2005-05-31.