Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 20318 - python 2.2.2 Tkinter crash with tcltk 8.4.2
Summary: python 2.2.2 Tkinter crash with tcltk 8.4.2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Jason Shoemaker (RETIRED)
URL:
Whiteboard:
Keywords:
: 20872 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-05-02 06:13 UTC by Peter Stieglecker
Modified: 2003-05-12 16:36 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
tkinter-alternate.patch (tkinter-alternate.patch,3.46 KB, patch)
2003-05-06 12:32 UTC, Stanislav Brabec
Details | Diff
python-2.2.2-r1.diff (python-2.2.2-r1.diff,612 bytes, patch)
2003-05-06 12:35 UTC, Stanislav Brabec
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Stieglecker 2003-05-02 06:13:36 UTC
Note: I am using the _unstable_ branch of Gentoo 1.2. Tkinter.py coming with
Python 2.2.2 seems to have problems with tcltk 8.4.2. It might be the problem
reported at
http://sourceforge.net/tracker/index.php?func=detail&aid=698517&group_id=5470&atid=105470

It can be seen when playing app-games/pysol. The application crashes as soon as
you move the mouse to the menu area.

Or just start idle.py and choose File/New Window

Reproducible: Always
Steps to Reproduce:
1. emerge app-games/pysol
2. start the game
3. move the mouse to the menu are

1. start idle.py
2. try open a new window
Actual Results:  
$ pysol
Traceback (most recent call last):
  File "pysol.py", line 19883, in ?
  File "pysol.py", line 19881, in main
  File "pysol.py", line 19854, in pysol_main
  File "pysol.py", line 2382, in __init__
  File "pysol.py", line 2332, in mainloop
  File "/usr/lib/python2.2/lib-tk/Tkinter.py", line 937, in mainloop
    self.tk.mainloop(n)
  File "pysol.py", line 1820, in CallWrapper____call__
  File "/usr/lib/python2.2/lib-tk/Tkinter.py", line 1032, in _substitute
    e.num = getint(b)
ValueError: invalid literal for int(): ??


Expected Results:  
hours of fun playing pysol

$ emerge info
Portage 2.0.47-r10 (default-1.0, gcc-2.95.3, glibc-2.2.5-r4,2.2.5-r8)
=================================================================
System uname: 2.4.20-xfs-r2 i686 AMD Athlon(tm) Processor
GENTOO_MIRRORS="http://gentoo.oregonstate.edu/
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="x86 oss 3dnow apm avi crypt cups encode jpeg libg++ mikmod mmx mpeg ncurses
pdflib quicktime spell truetype xml2 xmms xv arts berkdb bonobo cdr esd gdbm gif
gnome gnome-libs gpm gtk guile imlib java kde libwww motif mozilla mysql nls
oggvorbis opengl pam perl png python qt readline scanner sdl slang snmp ssl svga
tcltk tcpd tetex tiff X xfs apache2"
COMPILER=""
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=i686 -O3 -pipe"
CXXFLAGS="-march=i686 -O3 -pipe"
ACCEPT_KEYWORDS="x86 ~x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"
Comment 1 Gustavo Felisberto (RETIRED) gentoo-dev 2003-05-02 12:23:35 UTC
I dont even have Tkinter.

humpback@sam humpback $ pysol
Traceback (most recent call last):
  File "pysol.py", line 117, in ?
  File "/usr/lib/python2.2/lib-tk/Tkinter.py", line 35, in ?
    import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter

PySol cannot find the Tkinter Python libraries.
Please check your Python installation.

Comment 2 Stanislav Brabec 2003-05-02 15:22:39 UTC
Please recompile your python. Tkinter is probably linked against old tcl. I am working on recompile script, which can fix it generally.
Comment 3 Peter Stieglecker 2003-05-03 05:56:39 UTC
Recompiling Python does not help with the "invalid literal for int" problem. I tried that already.
Comment 4 Peter Stieglecker 2003-05-04 16:38:30 UTC
As expected, downgrading tcl/tk to 8.3.4 made idle.py and pysol work again. So it seems not to be a compile/link problem.
Comment 5 Stanislav Brabec 2003-05-05 15:56:09 UTC
Please look at following URL. It declares to be a fixed version for tk-8.4.2.
http://www.oberhumer.com/opensource/pysol/Tkinter.py and info at http://www.oberhumer.com/opensource/pysol/
Comment 6 Stanislav Brabec 2003-05-05 17:34:26 UTC
Complete thread with fix is in Python bug tracker:
http://sourceforge.net/tracker/index.php?func=detail&aid=707701&group_id=5470&atid=305470

Fix should be >=tk-8.4.2 only.
Comment 7 Stanislav Brabec 2003-05-06 12:32:48 UTC
Created attachment 11586 [details, diff]
tkinter-alternate.patch
Comment 8 Stanislav Brabec 2003-05-06 12:35:24 UTC
Created attachment 11587 [details, diff]
python-2.2.2-r1.diff

There is an ebuild patch. Pysol works for me with both tk-8.3.4 and tk-8.4.2.

Proposed ChangeLog entry:

Fixed Tkinter crash with tk-8.4.2 (bug #20318, Python bugs #698517 and
#707701).

Must be marked as stable before tk-8.4.2.

Because python is a critical package, I expect confirmation from (or commit by)
any senior developer.
Comment 9 Alastair Tse (RETIRED) gentoo-dev 2003-05-08 07:57:06 UTC
i've committed a python-2.2.2-r1 with the fix that you have there, Stanislav.

it is currently masked and marked unstable for all archs, although i'm pretty sure there will be no problems with it. it'll probably be unmasked in 2 days time and live in unstable until tcl/tk-8.4.x is marked as stable.
Comment 10 Stanislav Brabec 2003-05-09 05:56:16 UTC
I have tested it also with tk-8.3, so the fix should be compatible with both out tk's.
Comment 11 Martin Holzer (RETIRED) gentoo-dev 2003-05-12 16:06:24 UTC
*** Bug 20872 has been marked as a duplicate of this bug. ***
Comment 12 Alastair Tse (RETIRED) gentoo-dev 2003-05-12 16:36:10 UTC
new python with tk 8.4.2 patch is now in ~x86.