Scid vs PC uses embeded toplevels inside notebook and panedwidnows.
All wish-8.5 series code is fine, but 8.6.0 and todays (April 6) trunk
crash when closing a panedwindow and/or notebook.Via keyboard bindings.
svn co https://scidvspc.svn.sourceforge.net/svnroot/scidvspc
cd scidvspc
./configure TCL_VERSION=8.6
make install
/usr/local/bin/scid
press f2 twice
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 10 (X_UnmapWindow)
Resource id in failed request: 0x3e00995
Serial number of failed request: 34177
Current serial number in output stream: 34182
Sorry for the shitty bug report. I'm trying to find a testcase , but so far am unable.
To be a little more specific, i think the problem is not related to Key input,
but rather the order of widget destroy.
This code works
set tabid [$w select]
$w forget $tabid
destroy $tabid
_cleanup_tabs $w
but this code fails
proc createToplevelFinalize {w} {
if { $::docking::USE_DOCKING } {
bind $w <Destroy> +[ namespace code "::docking::cleanup $w %W"]
Any ideas on a work around even ? But i think wish-8.6.0 code is faulty.
Well that is weird.
If i remove the two catches here, i can avoid a fail under some conditions.
Is bug related to "catch" itself ?
catch {
bind $w <Destroy> {}
bind $dockw <Destroy> {}
}
# Maybe during Scid closing, some race conditions lead to exceptions ? In case, catch this by default
catch {
foreach nb [array names tbs] {
if { [lsearch [$nb tabs] $dockw ] != -1 } {
$nb forget $dockw
destroy $dockw
::docking::_cleanup_tabs $nb
return
}
}
}
Ok - this seems resolved.
App is probably detroying a non-existing window.
Wish-8.6 should probably not crash though. Cheers.
Bug in Wish-8.6 seems to be one with "catch"
Catching this code is generating core dumps.
Without the catch, it works fine (note the extraneous destroy is commented out)
catch {
foreach nb [array names tbs] {
if { [lsearch [$nb tabs] $dockw ] != -1 } {
$nb forget $dockw
### This seems wrong
# destroy $dockw
::docking::_cleanup_tabs $nb
return
}
}
}