Public bug reported: Description: Ubuntu 10.04.3 LTS
Package: tk8.5 Version: 8.5.8-1 If the display variable has an IPv4 mapped address, then any attempt to open Tk windows crashes with the following error: vega-a [x86_64.linux] 26% echo $DISPLAY ::ffff:127.0.0.1:1.0 vega-a [x86_64.linux] 27% idle Traceback (most recent call last): File "/usr/bin/idle", line 5, in <module> main() File "/usr/lib/python2.6/idlelib/PyShell.py", line 1386, in main root = Tk(className="Idle") File "/usr/lib/python2.6/lib-tk/Tkinter.py", line 1646, in __init__ self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError: Can't find a usable tk.tcl in the following directories: /usr/share/tcltk/tcl8.5/tk8.5 /usr/lib/tk8.5 /usr/local/lib/tcltk/tk8.5 /usr/local/share/tcltk/tk8.5 /usr/lib/tcltk/tk8.5 /usr/share/tcltk/tk8.5 /lib/tk8.5 /usr/library /usr/share/tcltk/tk8.5/tk.tcl: can't access "::tk::Priv.::ffff:127.0.0.1:1": parent namespace doesn't exist can't access "::tk::Priv.::ffff:127.0.0.1:1": parent namespace doesn't exist while executing "upvar #0 ::tk::Priv.::ffff:127.0.0.1:1 ::tk::Priv" ("uplevel" body line 1) invoked from within "uplevel #0 upvar #0 ::tk::Priv.$disp ::tk::Priv" (procedure "tk::ScreenChanged" line 9) invoked from within "tk::ScreenChanged [winfo screen .]" (file "/usr/share/tcltk/tk8.5/tk.tcl" line 290) invoked from within "source /usr/share/tcltk/tk8.5/tk.tcl" ("uplevel" body line 1) invoked from within "uplevel #0 [list source $file]" This probably means that tk wasn't installed properly. It appears that the :: in the DISPLAY variable is being misinterpreted by Tcl, and causing this crash There appears to be a patch mentioned http://ubuntuforums.org/archive/index.php/t-1315426.html which I can confirm works for us. Here is the patch (credit to Tristan Schmelcher) --- tk.tcl.8.5 2009-12-06 19:14:10.000000000 +0100 +++ tk.tcl.new 2009-12-06 19:19:04.000000000 +0100 @@ -248,7 +248,14 @@ set disp $screen } - uplevel #0 upvar #0 ::tk::Priv.$disp ::tk::Priv + # disp can legally contain "::", so we have to create the portion up to + # the last :: as a namespace. + set var_name ::tk::Priv.${disp} + set x [string last :: $var_name] + set namespace_name [string range $var_name 0 [expr {$x - 1}]] + namespace eval $namespace_name {} + + uplevel #0 upvar #0 $var_name ::tk::Priv variable ::tk::Priv global tcl_platform ** Affects: tk8.5 (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/867434 Title: TK crashes with IPv4 mapped addresses in $DISPLAY To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/tk8.5/+bug/867434/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs