Your message dated Wed, 04 Jun 2008 20:47:16 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#481071: fixed in pygame 1.7.1release-4.2
has caused the Debian Bug report #481071,
regarding python-pygame: pygame.image.fromstring does not work
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)
--
481071: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=481071
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: python-pygame
Version: 1.7.1release-4.1+b1sam1
Severity: important
The attached python code does not seem to work. If I patch pygame with
the attached patch, it is revealed that the call to
PyString_AsStringAndSize in image_fromstring is corrupting the value of
h, causing the image size sanity check later in the code to fail!
$ ./pyg1.py
h = 192
h = 0
Traceback (most recent call last):
File "./pyg1.py", line 7, in <module>
i = pygame.image.fromstring (str (s.get_data ()), (256, 192), 'RGBA')
ValueError: String length does not equal format and resolution size
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (530, 'testing'), (520, 'unstable'), (510, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.25-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages python-pygame depends on:
ii libc6 2.7-10 GNU C Library: Shared libraries
ii libsdl-image1.2 1.2.6-3 image loading library for Simple D
ii libsdl-mixer1.2 1.2.8-3 mixer library for Simple DirectMed
ii libsdl-ttf2.0-0 2.0.9-1 ttf library for Simple DirectMedia
ii libsdl1.2debian 1.2.13-2 Simple DirectMedia Layer
ii libsmpeg0 0.4.5+cvs20030824-2 SDL MPEG Player Library - shared l
ii python 2.5.2-1 An interactive high-level object-o
ii python-central 0.6.6 register and build utility for Pyt
ii python-numeric 24.2-8.2 Numerical (matrix-oriented) Mathem
python-pygame recommends no packages.
-- no debconf information
#!/usr/bin/python
import cairo
import pygame
s = cairo.ImageSurface (cairo.FORMAT_ARGB32, 256, 192)
i = pygame.image.fromstring (str (s.get_data ()), (256, 192), 'RGBA')
diff --git a/src/image.c b/src/image.c
index 3deb089..40cba47 100644
--- a/src/image.c
+++ b/src/image.c
@@ -20,6 +20,8 @@
[EMAIL PROTECTED]
*/
+#include <stdio.h>
+
/*
* image module for pygame
*/
@@ -614,7 +616,9 @@ PyObject* image_fromstring(PyObject* self, PyObject* arg)
if(w < 1 || h < 1)
return RAISE(PyExc_ValueError, "Resolution must be positive values");
+ fprintf (stderr, "h = %i\n", h);
PyString_AsStringAndSize(string, &data, &len);
+ fprintf (stderr, "h = %i\n", h);
if(!strcmp(format, "P"))
{
--- End Message ---
--- Begin Message ---
Source: pygame
Source-Version: 1.7.1release-4.2
We believe that the bug you reported is fixed in the latest version of
pygame, which is due to be installed in the Debian FTP archive:
pygame_1.7.1release-4.2.diff.gz
to pool/main/p/pygame/pygame_1.7.1release-4.2.diff.gz
pygame_1.7.1release-4.2.dsc
to pool/main/p/pygame/pygame_1.7.1release-4.2.dsc
python-pygame_1.7.1release-4.2_i386.deb
to pool/main/p/pygame/python-pygame_1.7.1release-4.2_i386.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
A Mennucc1 <[EMAIL PROTECTED]> (supplier of updated pygame package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Wed, 04 Jun 2008 21:15:00 +0200
Source: pygame
Binary: python-pygame
Architecture: source i386
Version: 1.7.1release-4.2
Distribution: unstable
Urgency: high
Maintainer: Ed Boraas <[EMAIL PROTECTED]>
Changed-By: A Mennucc1 <[EMAIL PROTECTED]>
Description:
python-pygame - SDL bindings for games development in Python
Closes: 481071
Changes:
pygame (1.7.1release-4.2) unstable; urgency=high
.
* Non-maintainer upload.
* Bug fix: "python-pygame: pygame.image.fromstring does not work",
thanks to Sam Morris (Closes: #481071), by applying
http://patches.ubuntu.com/p/pygame/extracted/01_stack_overwrite.dpatch
Checksums-Sha1:
4863bc2fef68bd73bd390ba1b3cd1e78cc422461 1329 pygame_1.7.1release-4.2.dsc
9e6ee56702d85f3f553246e59041920c4f922668 6757 pygame_1.7.1release-4.2.diff.gz
6d7464e9135b1bce76570c13ee13add21d19a919 819386
python-pygame_1.7.1release-4.2_i386.deb
Checksums-Sha256:
083cf61c41659c9a9cf49e25846e95dc7005de47d8631b49c337ccffd3a8c39c 1329
pygame_1.7.1release-4.2.dsc
4b08af475b6a4284eb72db422b57f982746e677baab5151c949954a3eb960a04 6757
pygame_1.7.1release-4.2.diff.gz
0db37d9c9236ca154181149ae4d422d5f2c023f595e5455a3c7b4accd0537fdd 819386
python-pygame_1.7.1release-4.2_i386.deb
Files:
743a9fb6ee65f2a1a476c7c7ab58ba08 1329 python optional
pygame_1.7.1release-4.2.dsc
3bd16aeca66e640733f0756fc7a6a7e9 6757 python optional
pygame_1.7.1release-4.2.diff.gz
ca9f877b5c57f674974881e93a6fe4d7 819386 python optional
python-pygame_1.7.1release-4.2_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFIRvWT9B/tjjP8QKQRAnMoAJ9Byh+Vw9O2hVsjs61ywyOnxEDzcgCeObLy
t2xCEkREMeHQBLKH2LteMtI=
=KnLD
-----END PGP SIGNATURE-----
--- End Message ---