A strang bug on 64 bit systems (Linux only?)
So I've noticed a strange bug with a few of the games, which I'm fairly certain the creators did not see. I'm running Ubuntu 7.06, 64 bit. I just tested one of the games exhibiting this bug in my 32 bit chroot (ubuntu 6.06) and did not experience it, so I'm thinking it's probably a 64 bit issue:The symptoms of this bug are that all game objects seem to be miss-positioned, piling up in the upper right corner of the screen. I'm not sure what the common thread here is, but I experience this bug on at least the following games:
twisted zombie, twisted twister, Hampster Smash, and murmel labyrinth.
Is anyone else seeing this problem and/or have any idea what all these games have in common that the others do not?
(log in to comment)
Comments
% cat test.py import sys import pygame s = pygame.Surface((10, 10)) print 'Python', sys.version print 'PyGame', pygame.__version__ print 'Result', s.get_rect(bottom=100)
% python2.4 test.py Python 2.4.2 (#1, Oct 30 2005, 19:35:03) [GCC 3.4.3 20041125 (Gentoo 3.4.3-r1, ssp-3.4.3-0, pie-8.7.7)] PyGame 1.7.1release Result <rect(0, 90, 10, 10)> % python2.5 test.py Python 2.5b3 (r25b3:51041, Aug 13 2006, 17:18:17) [GCC 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)] PyGame 1.7.1release Result <rect(0, 0, 10, 10)>
Both versions PyGame installations were built from the same (cleaned) source. Both Pythons are 64-bit (sizeof(c_void_p) == 8). Same problem can be reproduced in PyGame 1.8.0pre1 (the source at this function is unchanged). There is no problem directly manipulating `bottom` in a Rect.
Next step is probably to start tracing through surf_get_rect in gdb...
int pos=0;
should be
long pos=0;
(The fact that it works in Python 2.4 is a stack fluke). By examination of related compile warnings, there are similar bugs throughout the rect, mixer, event, image and time extensions.
alex on 2007/09/15 03:49:
I can reproduce similar problems (upper-left corner, or upper-edge) with Python 2.5 on Gentoo 64-bit.I'm going to take a stab and guess that the problem is with PyOpenGL (3.0.0a6 under Py2.5 causing problem, 2.0.1.09 under Py2.4 is ok).