From: Daniel A. S. <st...@ic...> - 2001-08-29 00:57:50
|
At 14:36 +0200 on 28/8/01, Mats Bengtsson wrote: >Made a fresh download from SourceForge, trashed the old >"Tool Command Folder", backed up Tcl/Tk 8.3.3 Folder, >installed, placed the TclXML folder into the new "Tool Command Folder", >launched wish, sourced the attached tcl script, >picked the attached xml file, File/Quit and crash. >Attached is the StdLog file. Hope this helps. >Tomorrow I will try to reproduce it on my job machine MacOS 9.1. >I have MacOS 8.6. Mats, your problem has nothing to do with TclXML but rather with the use of "puts stderr" in your TestingXML.tcl script. There are problems with stderr and the Wish console that I have been struggling with myself here for a project, at the moment I have only managed to workaround them by writing to stdout instead (e.g. remove all occurrences of stderr in your script and the crash goes away... or run the script in Tclsh, without the tk_getOpenFile of course) The problem is related to the fact that two channels (stdout & stderr) are associated with the Tk console window on MacOS and that at exit destruction of the first channel (stdout) leads to disposal of the console window and structures, destruction of the second channel (stderr) then tries to flush the channel if it was ever used by trying to output an empty string, but the console window is already gone at that point, thus leading to a crash (actually the autoloader tries to reload the console but autoloading is disabled at that point and bad things happen all over...) Fixing this involves diving deeper into Tcl channel code than I have time for at this point, it probably is a problem that was introduced relatively recently, i.e. the 8.2-8.3 timeframe (I see it on 8.3.2), maybe somebody with easy access to 8.0.5 could check there? BTW, there is a more recent version of tclxml than what you sent me available on sourceforge (tclxml-2.1theta) Also, for future reference, when tracking down bugs in Tcl/Tk it is always more useful to do it in TkTest (or TclTest) as these executables have debugging symbols enabled and optimization turned off. The StdLog you sent me isn't very useful as it is lacking most symbol names, an equivalent one from TkTest would have pinpointed the problem much more closely. To make a long story short, avoid the use of stderr in MacTk for now... Thanks for the great bug report, it was easy to track down the source of the problem with what you sent me. Maybe you could enter a minimal case of use of stderr causing a crash into the sourceforge bug manager? that would really be a helpful reminder that this bug needs to be addressed. It will also make more people aware of the problem, esp. those more familiar with the intricacies of tcl channel code than myself. Cheers, Daniel -- ** Daniel A. Steffen ** "And now to something completely ** Department of Mathematics ** different" Monty Python ** Macquarie University ** <mailto:st...@ma...> ** NSW 2109 Australia ** <http://www.maths.mq.edu.au/~steffen/> |