A few days ago I reported some problems with file selection dialogs. I
have now reduced the code so others can see if they can reproduce the
problem.
For those who want to test it:
Select a few files, especially one target, then source, then target,
etc. in different directories. And when making your selection in file
dialogs, hover a few seconds on file names or move your mouse around
slowly before clicking on one. After a couple of times, wish crashes
and quits.
Here is the code:
--------------------------------------------------------------------------------------
package req Tk
set last_dir [pwd]
button .s -text "Select Source" -command select_source
button .t -text "Select Target" -command select_target
button .exit -text Exit -command exit
pack .s .t .exit -side left -padx 10 -pady 10
proc select_source {} {
global last_dir
set path [tk_getOpenFile -title "Source File" \
-parent . \
-initialdir $last_dir]
if {$path != ""} { set last_dir [file dirname $path] }
return $path
}
proc select_target {args} {
global last_dir
set path [tk_getOpenFile -title "Target File" \
-parent . \
-initialdir $last_dir]
if {$path != ""} { set last_dir [file dirname $path] }
return $path
}
I played around for a while, but no crash happened (on Linux).
Which tcl/tk version ?
What is your platform ? (native file-dialogs or tk's?)
Are network-shares involved? (not that I knew of any
specific issues, but who knows, it's generally a
frequent cause for troubles of all kinds ...)
> I played around for a while, but no crash happened (on Linux).
>
> Which tcl/tk version ?
> What is your platform ? (native file-dialogs or tk's?)
> Are network-shares involved? (not that I knew of any
> specific issues, but who knows, it's generally a
> frequent cause for troubles of all kinds ...)
Andreas,
Thanks a lot for testing it. I see it on two different Windows XP
systems with ActiveState 8.4.12 versions. I have not tested it on
Linux yet. No network drives, and just stock file dialogs that ship
with ActiveState.
I did not see this behavior in earlier versions (upto 8.4.11).
While it always happens, you see it sooner if you are deliberately slow
in selecting a file. For example, take a few extra seconds to click on
a folder, go back/up in the folder, etc.
I am thinking it has something to do with the event bindings behind the
scenes.
The file selection dialog are native windows dialogs, Tcl/Tk is not
implementing them.
--
+--------------------------------+---------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
>> While it always happens, you see it sooner if you are deliberately slow
>> in selecting a file. For example, take a few extra seconds to click on
>> a folder, go back/up in the folder, etc.
> The file selection dialog are native windows dialogs, Tcl/Tk is not
> implementing them.
Tcl/Tk is still doing stuff to invoke them, and it might
be doing bad stuff in other threads, while the dialog is up.
Since changing folders is part of reproducing the problem,
there could (just judging from described symptoms) be some
race-condition on what is the current directory ...
>> I did not see this behavior in earlier versions (upto 8.4.11).
Can you try to step back (and forth) to that version and see,
if the problem is really specific to that active state version ?
PS: my test on linux was in the end not relevant to your problem,
since linux uses completely different code for the fileselection
boxes.
> etc. in different directories. And when making your selection in file
> dialogs, hover a few seconds on file names or move your mouse around
> slowly before clicking on one.
Could be a bug in popping up the tooltip.
No crash for me under 8.4.11 (which you knew already)
--
Donald Arseneau as...@triumf.ca
I was not able to reproduce this with ActiveTcl 8.4.13.0 on XP SP2. I
was slow and methodic about trying to reproduce your points.
Jeff
I don't know what to say. For me, I can reproduce the same behavior
all the time; as a matter of fact, without trying. I will either
downgrade to 8.4.11 and or upgrade to 8.4.13 and see if it is better.
By the way, both of the machines on which I see this behavior have
Intel Mobile chips (in case it is relevant).
Thanks!
> I don't know what to say. For me, I can reproduce the same behavior
> all the time; as a matter of fact, without trying.
Can you "prepare a report" to send to Microsoft? (Windows prompts you
to do that.) It will display the crash dump for you; send that text
to a sourceforge bug report (and don't send anything to microsoft).
--
Donald Arseneau as...@triumf.ca
> Can you "prepare a report" to send to Microsoft? (Windows prompts you
> to do that.) It will display the crash dump for you; send that text
> to a sourceforge bug report (and don't send anything to microsoft).
To clarify...
I don't know that this will really be useful.
When the program crashes, windows pops up "xxx application has
encountered a problem and needs to close... .. To see what this
error report contains _click_here_."
Click to view the report, including the "technical information".
I don't think the full stack dump would be useful, but maybe the
info at the top would be. Unfortunately, the text is not selectable
so you may have to take an image of the window, or retype it.
The file name "...txt" that is selectable is binary, and I don't
know what to make of it.
Finally, click [cancel].
--
Donald Arseneau as...@triumf.ca
My sincere thanks to all who replied and took time to test the code.
> When the program crashes, windows pops up "xxx application has
> encountered a problem and needs to close... .. To see what this
> error report contains _click_here_."
>
> Click to view the report, including the "technical information".
> I don't think the full stack dump would be useful, but maybe the
> info at the top would be. Unfortunately, the text is not selectable
> so you may have to take an image of the window, or retype it.
> The file name "...txt" that is selectable is binary, and I don't
> know what to make of it.
After upgrading to v8.4.13, things seemed to be better. However, I am
still seeing the same problem: wish crashes while using the stock
tk_getOpenFile/tk_getSaveFile dialogs.
As per the suggestion above, I captured the error message:
The first pop up window:
-------------------------------------------------------------------------------------------------
Title: Wish Application
Message: Error Signature
AppName: wish84.exe AppVer: 8.4.2.13
ModName: shell32.dll
ModVer: 6.0.2900.2869 Offset: 00091406
The second (technical information dialog) pop up window:
--------------------------------------------------------------------------------------------------------------
Title: Error Report Contents
Message:
Exception information
Code: 0xc0C00005 Flags: 0x00000000
Record: 0xC0000000000000000000 Address: 0x00C00000007ca51406
System information
Windows NT 5.1 Build: 2600
CPU Vendor Code: 756E6547 - 49656E69 - 6C65746E
CPU Version: 000006D8 CPU Feature Code: AFE9FBFF
CPU AMD Feature Code: 00B5E824
Module 1
wish84.exe
.....
The content of the text file that is reported:
---------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-16"?>
<DATABASE>
<EXE NAME="wish84.exe" FILTER="GRABMI_FILTER_PRIVACY">
<MATCHING_FILE NAME="base-tcl-thread-win32-ix86.dll" SIZE="1027593"
CHECKSUM="0x414BCF72" BIN_FILE_VERSION="8.4.2.13"
BIN_PRODUCT_VERSION="8.4.2.13" PRODUCT_VERSION="8.4.13"
FILE_DESCRIPTION="Tcl DLL" COMPANY_NAME="ActiveState Corporation"
PRODUCT_NAME="Tcl 8.4 for Windows" FILE_VERSION="8.4.13"
ORIGINAL_FILENAME="tcl84.dll" LEGAL_COPYRIGHT="Copyright © 2001 by
ActiveState Corporation, et al" VERFILEDATEHI="0x0" VERFILEDATELO="0x0"
VERFILEOS="0x4" VERFILETYPE="0x2" MODULE_TYPE="WIN32"
PE_CHECKSUM="0xDE12E" LINKER_VERSION="0x0"
UPTO_BIN_FILE_VERSION="8.4.2.13" UPTO_BIN_PRODUCT_VERSION="8.4.2.13"
LINK_DATE="04/17/2006 16:33:40" UPTO_LINK_DATE="04/17/2006 16:33:40"
VER_LANGUAGE="English (United States) [0x409]" />
<MATCHING_FILE NAME="base-tcl-thread-win32-ix86.exe" SIZE="545198"
CHECKSUM="0xBB6312A1" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0"
LINKER_VERSION="0x0" LINK_DATE="04/17/2006 16:31:15"
UPTO_LINK_DATE="04/17/2006 16:31:15" />
<MATCHING_FILE NAME="base-tk-thread-win32-ix86.exe" SIZE="1063025"
CHECKSUM="0xF3F1AEA4" BIN_FILE_VERSION="8.4.2.13"
BIN_PRODUCT_VERSION="8.4.2.13" PRODUCT_VERSION="8.4.13"
FILE_DESCRIPTION="ActiveState Basekit, a part of Tcl Dev Kit"
COMPANY_NAME="ActiveState Software Inc." PRODUCT_NAME="TDK Basekit 8.4
for Windows" FILE_VERSION="8.4.13" ORIGINAL_FILENAME="basekit.exe"
LEGAL_COPYRIGHT="Copyright © 1989-2003 by J.Ousterhout et al."
VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x4"
VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0"
LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="8.4.2.13"
UPTO_BIN_PRODUCT_VERSION="8.4.2.13" LINK_DATE="04/17/2006 16:31:56"
UPTO_LINK_DATE="04/17/2006 16:31:56" VER_LANGUAGE="English (United
States) [0x409]" />
<MATCHING_FILE NAME="iconv.dll" SIZE="876544" CHECKSUM="0x5019613C"
MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0"
LINK_DATE="04/17/2006 16:21:38" UPTO_LINK_DATE="04/17/2006 16:21:38" />
<MATCHING_FILE NAME="libexslt.dll" SIZE="38912"
CHECKSUM="0xF79EA050" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0"
LINKER_VERSION="0x7" LINK_DATE="04/17/2006 16:21:59"
UPTO_LINK_DATE="04/17/2006 16:21:59" />
<MATCHING_FILE NAME="libxml2.dll" SIZE="618496"
CHECKSUM="0x74CB6CAB" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0"
LINKER_VERSION="0x20004" LINK_DATE="04/17/2006 16:21:50"
UPTO_LINK_DATE="04/17/2006 16:21:50" />
<MATCHING_FILE NAME="libxslt.dll" SIZE="128000"
CHECKSUM="0x67EAF34D" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0"
LINKER_VERSION="0x10000" LINK_DATE="04/17/2006 16:21:58"
UPTO_LINK_DATE="04/17/2006 16:21:58" />
<MATCHING_FILE NAME="tcl84.dll" SIZE="606208" CHECKSUM="0x31918CF9"
BIN_FILE_VERSION="8.4.2.13" BIN_PRODUCT_VERSION="8.4.2.13"
PRODUCT_VERSION="8.4.13" FILE_DESCRIPTION="Tcl DLL"
COMPANY_NAME="ActiveState Corporation" PRODUCT_NAME="Tcl 8.4 for
Windows" FILE_VERSION="8.4.13" ORIGINAL_FILENAME="tcl84.dll"
LEGAL_COPYRIGHT="Copyright © 2001 by ActiveState Corporation, et al"
VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x4"
VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x9E9EB"
LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="8.4.2.13"
UPTO_BIN_PRODUCT_VERSION="8.4.2.13" LINK_DATE="04/17/2006 16:05:50"
UPTO_LINK_DATE="04/17/2006 16:05:50" VER_LANGUAGE="English (United
States) [0x409]" />
<MATCHING_FILE NAME="tclpip84.dll" SIZE="16384"
CHECKSUM="0x8AEC2596" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0"
LINKER_VERSION="0x0" LINK_DATE="04/17/2006 16:05:52"
UPTO_LINK_DATE="04/17/2006 16:05:52" />
<MATCHING_FILE NAME="tclsh.exe" SIZE="20480" CHECKSUM="0x6EFC9D2B"
BIN_FILE_VERSION="8.4.2.13" BIN_PRODUCT_VERSION="8.4.2.13"
PRODUCT_VERSION="8.4.13" FILE_DESCRIPTION="Tclsh Application"
COMPANY_NAME="ActiveState Corporation" PRODUCT_NAME="Tcl 8.4 for
Windows" FILE_VERSION="8.4.13" ORIGINAL_FILENAME="tclsh84.exe"
LEGAL_COPYRIGHT="Copyright © 2000 by ActiveState Corporation, et al"
VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x4"
VERFILETYPE="0x1" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0"
LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="8.4.2.13"
UPTO_BIN_PRODUCT_VERSION="8.4.2.13" LINK_DATE="04/17/2006 16:05:53"
UPTO_LINK_DATE="04/17/2006 16:05:53" VER_LANGUAGE="English (United
States) [0x409]" />
<MATCHING_FILE NAME="tclsh84.exe" SIZE="20480"
CHECKSUM="0x6EFC9D2B" BIN_FILE_VERSION="8.4.2.13"
BIN_PRODUCT_VERSION="8.4.2.13" PRODUCT_VERSION="8.4.13"
FILE_DESCRIPTION="Tclsh Application" COMPANY_NAME="ActiveState
Corporation" PRODUCT_NAME="Tcl 8.4 for Windows" FILE_VERSION="8.4.13"
ORIGINAL_FILENAME="tclsh84.exe" LEGAL_COPYRIGHT="Copyright © 2000 by
ActiveState Corporation, et al" VERFILEDATEHI="0x0" VERFILEDATELO="0x0"
VERFILEOS="0x4" VERFILETYPE="0x1" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0"
LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="8.4.2.13"
UPTO_BIN_PRODUCT_VERSION="8.4.2.13" LINK_DATE="04/17/2006 16:05:53"
UPTO_LINK_DATE="04/17/2006 16:05:53" VER_LANGUAGE="English (United
States) [0x409]" />
<MATCHING_FILE NAME="tk84.dll" SIZE="806912" CHECKSUM="0x33A40EA5"
BIN_FILE_VERSION="8.4.2.13" BIN_PRODUCT_VERSION="8.4.2.13"
PRODUCT_VERSION="8.4.13" FILE_DESCRIPTION="Tk DLL"
COMPANY_NAME="ActiveState Corporation" PRODUCT_NAME="Tk 8.4 for
Windows" FILE_VERSION="8.4.13" ORIGINAL_FILENAME="tk84.dll"
LEGAL_COPYRIGHT="Copyright © 2001 by ActiveState Corporation, et al"
VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x4"
VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0xD0723"
LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="8.4.2.13"
UPTO_BIN_PRODUCT_VERSION="8.4.2.13" LINK_DATE="04/17/2006 16:07:09"
UPTO_LINK_DATE="04/17/2006 16:07:09" VER_LANGUAGE="English (United
States) [0x409]" />
<MATCHING_FILE NAME="wish.exe" SIZE="24576" CHECKSUM="0x9835F6C4"
BIN_FILE_VERSION="8.4.2.13" BIN_PRODUCT_VERSION="8.4.2.13"
PRODUCT_VERSION="8.4.13" FILE_DESCRIPTION="Wish Application"
COMPANY_NAME="ActiveState Corporation" PRODUCT_NAME="Tk 8.4 for
Windows" FILE_VERSION="8.4.13" ORIGINAL_FILENAME="wish84.exe"
LEGAL_COPYRIGHT="Copyright © 2000 by ActiveState Corporation, et al"
VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x4"
VERFILETYPE="0x1" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0"
LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="8.4.2.13"
UPTO_BIN_PRODUCT_VERSION="8.4.2.13" LINK_DATE="04/17/2006 16:07:11"
UPTO_LINK_DATE="04/17/2006 16:07:11" VER_LANGUAGE="English (United
States) [0x409]" />
<MATCHING_FILE NAME="wish84.exe" SIZE="24576" CHECKSUM="0x9835F6C4"
BIN_FILE_VERSION="8.4.2.13" BIN_PRODUCT_VERSION="8.4.2.13"
PRODUCT_VERSION="8.4.13" FILE_DESCRIPTION="Wish Application"
COMPANY_NAME="ActiveState Corporation" PRODUCT_NAME="Tk 8.4 for
Windows" FILE_VERSION="8.4.13" ORIGINAL_FILENAME="wish84.exe"
LEGAL_COPYRIGHT="Copyright © 2000 by ActiveState Corporation, et al"
VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x4"
VERFILETYPE="0x1" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0"
LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="8.4.2.13"
UPTO_BIN_PRODUCT_VERSION="8.4.2.13" LINK_DATE="04/17/2006 16:07:11"
UPTO_LINK_DATE="04/17/2006 16:07:11" VER_LANGUAGE="English (United
States) [0x409]" />
<MATCHING_FILE NAME="zlib.dll" SIZE="44544" CHECKSUM="0x8F24B8EA"
MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x10000"
LINK_DATE="08/13/2000 16:24:16" UPTO_LINK_DATE="08/13/2000 16:24:16" />
</EXE>
<EXE NAME="SHELL32.dll" FILTER="GRABMI_FILTER_THISFILEONLY">
<MATCHING_FILE NAME="shell32.dll" SIZE="8452096"
CHECKSUM="0xF9DF7499" BIN_FILE_VERSION="6.0.2900.2869"
BIN_PRODUCT_VERSION="6.0.2900.2869" PRODUCT_VERSION="6.00.2900.2869"
FILE_DESCRIPTION="Windows Shell Common Dll" COMPANY_NAME="Microsoft
Corporation" PRODUCT_NAME="Microsoft® Windows® Operating System"
FILE_VERSION="6.00.2900.2869 (xpsp_sp2_gdr.060316-1512)"
ORIGINAL_FILENAME="SHELL32.DLL" INTERNAL_NAME="SHELL32"
LEGAL_COPYRIGHT="© Microsoft Corporation. All rights reserved."
VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004"
VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x81C44A"
LINKER_VERSION="0x50001" UPTO_BIN_FILE_VERSION="6.0.2900.2869"
UPTO_BIN_PRODUCT_VERSION="6.0.2900.2869" LINK_DATE="03/17/2006
04:03:51" UPTO_LINK_DATE="03/17/2006 04:03:51" VER_LANGUAGE="English
(United States) [0x409]" />
</EXE>
<EXE NAME="kernel32.dll" FILTER="GRABMI_FILTER_THISFILEONLY">
<MATCHING_FILE NAME="kernel32.dll" SIZE="983552"
CHECKSUM="0x4CE79457" BIN_FILE_VERSION="5.1.2600.2180"
BIN_PRODUCT_VERSION="5.1.2600.2180" PRODUCT_VERSION="5.1.2600.2180"
FILE_DESCRIPTION="Windows NT BASE API Client DLL"
COMPANY_NAME="Microsoft Corporation" PRODUCT_NAME="Microsoft®
Windows® Operating System" FILE_VERSION="5.1.2600.2180
(xpsp_sp2_rtm.040803-2158)" ORIGINAL_FILENAME="kernel32"
INTERNAL_NAME="kernel32" LEGAL_COPYRIGHT="© Microsoft Corporation. All
rights reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0"
VERFILEOS="0x40004" VERFILETYPE="0x2" MODULE_TYPE="WIN32"
PE_CHECKSUM="0xFF848" LINKER_VERSION="0x50001"
UPTO_BIN_FILE_VERSION="5.1.2600.2180"
UPTO_BIN_PRODUCT_VERSION="5.1.2600.2180" LINK_DATE="08/04/2004
07:56:36" UPTO_LINK_DATE="08/04/2004 07:56:36" VER_LANGUAGE="English
(United States) [0x409]" />
</EXE>
</DATABASE>
Just a thought that struck me:
You wrote before that for reproducing you needed to slowly hover the
mouse on items before clicking.
Could it be that your machine tries to popup some tooltip-style
information on items as you hover above them ?
Does the crashing perhaps depend on which (types of) files you're
hovering on?
Does the crashing depend on what browse-mode (small icons, large
icons, list, details) you're using?
As a matter of fact yes. I just checked and the option to display file
information is on. I will turn it off and see how that goes. Earlier,
I had disabled the file types option to tk_getOpenFile/tk_getSaveFile
but it did not make a difference.
I think you are on the right track, though. Because it would crash
when hover my mouse in an empty space of the file selection dialog (to
read the file names) and then move over to a file to select it. This
would give the OS enough time to try to pop a tooltip.
Jeff,
I was just able to reproduce the crash -- by a different method -- in a
product using Tcl 8.4.6 on XP SP2.
My crash only occurs when zooming too fast, if I take it slow all is ok. It
also happens *before* I select a file.