From bf45ca674f7c43162bbe07b3423f6492ba2fcc68 Mon Sep 17 00:00:00 2001 From: "tgoff0@gmail.com" Date: Fri, 3 Apr 2015 01:49:03 +0000 Subject: [PATCH] Fix occassional exceptions on tcl/tk 8.6 when executing python scripts from the GUI. From: santiago --- trunk/gui/api.tcl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/trunk/gui/api.tcl b/trunk/gui/api.tcl index 5a6c0503..f6f72457 100644 --- a/trunk/gui/api.tcl +++ b/trunk/gui/api.tcl @@ -1076,6 +1076,13 @@ proc parseRegMessage { data len flags channel } { # reg message with session number indicates the sid of a session that # was just started from XML or Python script (via reg exec=scriptfile.py) if { $session != "" } { + # The channel passed to here is soon after discarded for + # sessions that are started from XML or Python scripts. This causes + # an exception in the GUI when responding back to daemon if the + # response is sent after the channel has been destroyed. Setting + # the channel to -1 basically disables the GUI response to the daemon, + # but it turns out the daemon does not need the response anyway. + set channel -1 # assume session string only contains one session number connectShutdownSession connect $channel $session $fnhint return