When using vfs::mk4 and [file copy] and multi threading
on Windows, wish crashes with the error message:
"called Tcl_Close on channel with refCount > 0"
This issue applies only to the wish application or
tclkit on windows. Tclsh and tclkitsh on windows are
not affected. When using [file copy] on normal non-vfs
directories, everything is fine as well. Only with
*non-existing* vfs directories mounted via
vfs::mk4::Mount (or maybe other vfs::*::Mount's) the
crash appeared to me.
I've written a short script which makes it easy to
reproduce the bug:
# channel refcount bug
package require Thread
catch {console show}
set T [thread::create -preserved]
thread::send $T [list set D [file dirname [info script]]]
set script {
package require vfs::mk4
set logOpen 0
proc ::Log {msg} {
if {$::logOpen} {
set mode a
} else {
set mode w
set ::logOpen 1
}
set L [open [file join $::D log.txt] $mode]
puts $L $msg
close $L
}
Log $D
set src [file join $D test.txt]
set tdir [file join $D tdir.kit]
set dest [file join $tdir test.txt]
Log $dest
Log 1
set vfsh [vfs::mk4::Mount $tdir $tdir]
Log 2
file copy $src $dest
Log 3
vfs::mk4::Unmount $vfsh $tdir
Log 4
}
thread::send -async $T $script
# end channel bug script
When the directory exists, the crash does not happen,
but the script runs only until "Log 2".
It is not very clear to me whether this is a bug in Tk
(because it only appears with wish/windows) or vfs or
metakit.
Nobody/Anonymous ( nobody ) - 2006-04-11 09:03
8
Closed
Fixed
Jeffrey Hobbs
75. wish
obsolete: 8.4.13
Public
|
Date: 2006-05-26 19:44 Logged In: YES |
|
Date: 2006-05-23 20:53 Logged In: YES |
|
Date: 2006-05-10 05:54 Logged In: YES |
|
Date: 2006-05-10 05:06 Logged In: YES |
|
Date: 2006-05-10 03:50 Logged In: YES |
|
Date: 2006-05-10 00:24 Logged In: YES |
|
Date: 2006-05-10 00:19 Logged In: YES |
|
Date: 2006-05-09 23:57 Logged In: YES |
|
Date: 2006-05-09 16:02 Logged In: YES |
|
Date: 2006-05-09 15:46 Logged In: YES |
|
Date: 2006-05-09 13:02 Logged In: YES |
|
Date: 2006-05-08 12:47 Logged In: YES |
|
Date: 2006-04-12 15:17 Logged In: YES |
|
Date: 2006-04-12 07:31 Logged In: YES |
|
Date: 2006-04-11 18:41 Logged In: YES |
|
Date: 2006-04-11 16:38 Logged In: YES |
|
Date: 2006-04-11 12:13 Logged In: YES |
| Filename | Description | Download |
|---|---|---|
| console.diff | Download | |
| refcount.tcl | test script | Download |
| vfs-stdchan.patch | patch to vfs to work around core std chan inheritance weirdness | Download |
| Field | Old Value | Date | By |
|---|---|---|---|
| File Added | 179419: console.diff | 2006-05-26 19:44 | hobbs |
| close_date | - | 2006-05-26 19:44 | hobbs |
| resolution_id | Accepted | 2006-05-26 19:44 | hobbs |
| status_id | Open | 2006-05-26 19:44 | hobbs |
| resolution_id | None | 2006-05-23 20:53 | vincentdarley |
| assigned_to | vincentdarley | 2006-05-23 20:53 | vincentdarley |
| File Added | 177431: vfs-stdchan.patch | 2006-05-10 05:54 | hobbs |
| assigned_to | hobbs | 2006-05-10 05:54 | hobbs |
| File Added | 177429: refcount.tcl | 2006-05-10 05:06 | hobbs |
| artifact_group_id | obsolete: 8.4.12 | 2006-05-10 00:24 | hobbs |
| status_id | Pending | 2006-05-10 00:20 | hobbs |
| resolution_id | Works For Me | 2006-05-10 00:20 | hobbs |
| close_date | 2006-05-09 23:57 | 2006-05-10 00:20 | hobbs |
| priority | 5 | 2006-05-10 00:19 | hobbs |
| close_date | - | 2006-05-09 23:57 | hobbs |
| status_id | Open | 2006-05-09 23:57 | hobbs |
| assigned_to | andreas_kupries | 2006-05-09 23:57 | hobbs |
| resolution_id | None | 2006-05-09 23:57 | hobbs |
| assigned_to | vincentdarley | 2006-04-21 22:49 | vincentdarley |
| assigned_to | dgp | 2006-04-12 15:17 | dgp |
| close_date | 2006-04-11 12:13 | 2006-04-11 18:41 | dgp |
| artifact_group_id | None | 2006-04-11 18:41 | dgp |
| status_id | Pending | 2006-04-11 18:41 | dgp |
| assigned_to | hobbs | 2006-04-11 12:13 | dgp |
| close_date | - | 2006-04-11 12:13 | dgp |
| status_id | Open | 2006-04-11 12:13 | dgp |
Copyright © 2010 Geeknet, Inc. All rights reserved. Terms of Use