[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] [bug] color module on Pygame 1.8.1



I appreciate the color extension module is still under construction for 1.8.1 but this bug is unusual and could easily be missed. This is for Python 2.5.2 on Windows. When running the shadow effects array example in the Pygame cookbook, http://www.pygame.org/wiki/ShadowEffects, I get this exception:

>python pstest.py numpy
Traceback (most recent call last):
 File "pstest.py", line 73, in <module>
   main()
 File "pstest.py", line 50, in main
labelD = add_shadow(textD, (20, 10), shadow_scale=0.8, ambience=ambience)
OverflowError: long int too large to convert to int

There is no way a Python function call should raise an OverflowError like that. Replacing the preceding line:

   textD.set_colorkey(Color('white'))

with:

   textD.set_colorkey((255, 255, 255, 255))

prevents the exception. So either the new Color type isn't working properly with colorkeys or memory is being overwritten somewhere.

--
Lenard Lindstrom
<len-l@xxxxxxxxx>