Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 24426 - pathological crashes with "OverflowError: float too large to convert"
Summary: pathological crashes with "OverflowError: float too large to convert"
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-13 17:25 UTC by Jens Mayer
Modified: 2003-07-14 20:00 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Mayer 2003-07-13 17:25:29 UTC
Overview description: 
Pathological (app-games/pathological) version 1.1.2 crashes when trying to start
a game. The application comes up, sound works - it just crashes when hitting the
"start game" button.

Steps to Rproduce:
Start pathological (i.e. on the commandline), hit "Start Game".

Actual Results:
basquiat@warhol basquiat $ pathological
Traceback (most recent call last):
  File "/usr/share/games/pathological/pathological.py", line 2196, in ?
    rc = game.play()
  File "/usr/share/games/pathological/pathological.py", line 1611, in play
    popup("Please wait...\n", (150, 50))
  File "/usr/share/games/pathological/pathological.py", line 1524, in popup
    linespacing = min( linespacing, int(1.2 * popup_font.get_height()))
OverflowError: float too large to convert

Expected Results:
Well, playing this nice game? ;)
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2003-07-13 17:29:52 UTC
Jens -

Please post the output of emerge info as requested by the bug submission page.

Thanks.
Comment 2 Jens Mayer 2003-07-13 17:37:36 UTC
Sorry, forgot about that. Here is the output:

Portage 2.0.48-r1 (default-x86-1.4, gcc-3.2.2, glibc-2.3.2-r1)
=================================================================
System uname: 2.4.20-xfs-r3 i686 Intel(R) Pentium(R) 4 Mobile CPU 1.80GHz
GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo/ http://mirrors.sunsite.dk/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/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 cups jpeg libg++ mad mikmod mmx nls pdflib spell xml2 xmms zlib gtkhtml gdbm berkdb slang tetex nas bonobo ggi tcltk guile gpm tcpd pam libwww python imlib qt motif aalib acpi acpi4linux -alsa apache2 arts avi cdr crypt dga directfb dvd encode esd fbcon gif gnome gphoto2 gtk gtk2 java kde ldap mozilla mpeg ncurses oggvorbis opengl pcmcia perl png quicktime readline sdl sse ssl svga tiff truetype usb xv X radeon imap"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O3 -pipe"
CXXFLAGS="-march=pentium3 -O3 -pipe"
ACCEPT_KEYWORDS="x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"
Comment 3 SpanKY gentoo-dev 2003-07-13 19:13:20 UTC
if you dont mind me asking, how big is your font ? :) 
 
try doing this: 
edit /usr/share/games/pathological/pathological.py 
goto line 1524 
change where it says int() to long() 
Comment 4 Jens Mayer 2003-07-14 06:51:50 UTC
How big is what font? ;) Everything should be set up quite normally here, as there aren't any obviously huge fonts around. Screen resolution is 1600x1200, running fluxbox with the gnome-settings-daemon in the background (to have antialiased fonts with the gtk2 applications). The game crashes in normal and full screen mode.

I tried some things following your suggestion:

line 1524:
changed:
linespacing = min( linespacing, int(1.2 * popup_font.get_height())) to
linespacing = min( linespacing, long(1.2 * popup_font.get_height()))

line 1527: (as it crashed with the same error here)
changed:
linespacing = int(linespacing * 1.3) to
linespacing = long(linespacing * 1.3)

Ok, now I can get until the "Please wait" screen shows up, then crashing with:

Traceback (most recent call last):
  File "/usr/share/games/pathological/pathological.py", line 2196, in ?
    rc = game.play()
  File "/usr/share/games/pathological/pathological.py", line 1619, in play
    board = Board( self, board_pos)
  File "/usr/share/games/pathological/pathological.py", line 942, in __init__
    self.launch_queue.append(random.choice(self.colors))
  File "/usr/lib/python2.2/random.py", line 355, in choice
    return seq[int(self.random() * len(seq))]
OverflowError: float too large to convert

As I'm not a programmer, I don't really know where to change what. Another thought: I happened to compile everything on my machine with "march=pentium4" for along time until I heard of the problems this might cause with gcc. Are there any packages you suggest me to recompile? (python is march=pentium3 anyway,)
Comment 5 Jens Mayer 2003-07-14 15:09:52 UTC
Ok, after googling around a bit, I think the problem is related to the unstable glibc 2.3.2 that I'm using (I emerged it as a dependency with some other unstable package, I guess). As donwgrading brought me in big troubles, I'm emerging it again now and can't play pathological until my glibc gets stable. ;) So it's not a problem with pathological, but related to glibc 2.3.2/python.

Sorry for wasting your time and thank you very much for your quick help. I set this bug to INVALID since it doesn't seem to be a pathological problem, as mentioned above.
Comment 6 SpanKY gentoo-dev 2003-07-14 19:49:27 UTC
there is a bug in the gcc-3.x series that if you compile glibc with march=pentium4 
then some floating point conversions are invalid ... we have some bugs open 
about it here on bugzilla ... 
 
hopefully it'll go away soon because i like using march=pentium4 on my 
machine :) 
Comment 7 Jens Mayer 2003-07-14 20:00:41 UTC
Maybe this was what caused the problem. In the process of reemerging my glibc (after the downgrade nearly fscked my system), I emerged the "old" unstable glibc, read: the same that pathological didn't work with in the beginning. The compiler setting now is "march=pentium3". Maybe the first glibc was compiled with "march=pentium4", I don't know anymore - but anyway pathological works now. And it's sooooo addictive. This will ruin any productivity in my live for at least two weeks. ;)