Your message dated Sat, 16 Dec 2017 21:21:17 +0100
with message-id <[email protected]>
and subject line Re: python-pygame: pygame.sprite.collide_circle misses (a lot 
of) collisions due to incorrect arithmetic
has caused the Debian Bug report #681975,
regarding python-pygame: pygame.sprite.collide_circle misses (a lot of) 
collisions due to incorrect arithmetic
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.)


-- 
681975: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=681975
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: python-pygame
Version: 1.8.1release-2+b1
Severity: normal
Tags: upstream


There is an error in how circle collisions are calculated in
pygame.sprite.collide_circle.  It checks whether distance^2 < radius1^2
+ radius2^2, where it should check whether distance^2 < (radius1 +
radius2)^2.  The effect is that sometimes clearly colliding rects/radii
are not reported as colliding:

>>> import pygame
>>> class test: pass
...
>>> a, b = test(), test()
>>> a.rect = pygame.Rect
>>> a.rect = pygame.Rect(0,0,10,10)
>>> b.rect = pygame.Rect(8,8,10,10)
>>> pygame.sprite.collide_circle(a,b)
False
>>> c, d = test(), test()
>>> c.rect = pygame.Rect(0,0,10,10)
>>> d.rect = pygame.Rect(8,0,10,10)
>>> c.radius = d.radius = 5
>>> pygame.sprite.collide_circle(c,d)
False

I'm also a little bit worried: this kind of error should be caught by
upstream regression/unit testing; don't pygame developers write tests
for their code before shipping?

-- Package-specific info:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                          Version                       Description
+++-=============================-=============================-==========================================================================
un  libsdl-dev                    <none>                        (no description 
available)
ii  libsdl-gfx1.2-4               2.0.20-1.1                    drawing and 
graphical effects extension for SDL
un  libsdl-image-dev              <none>                        (no description 
available)
un  libsdl-image1.0-dev           <none>                        (no description 
available)
un  libsdl-image1.1-dev           <none>                        (no description 
available)
ii  libsdl-image1.2               1.2.10-2+b2                   image loading 
library for Simple DirectMedia Layer 1.2
un  libsdl-image1.2-dev           <none>                        (no description 
available)
un  libsdl-mixer-dev              <none>                        (no description 
available)
un  libsdl-mixer1.0-dev           <none>                        (no description 
available)
un  libsdl-mixer1.1-dev           <none>                        (no description 
available)
ii  libsdl-mixer1.2               1.2.8-6.3                     mixer library 
for Simple DirectMedia Layer 1.2
un  libsdl-mixer1.2-dev           <none>                        (no description 
available)
ii  libsdl-net1.2                 1.2.7-2                       network library 
for Simple DirectMedia Layer
un  libsdl-perl                   <none>                        (no description 
available)
ii  libsdl-sound1.2               1.0.3-3+b1                    Decoder of 
several sound file formats for SDL
ii  libsdl-ttf2.0-0               2.0.9-1                       ttf library for 
Simple DirectMedia Layer with FreeType 2 support
un  libsdl0.11                    <none>                        (no description 
available)
un  libsdl0.11-dev                <none>                        (no description 
available)
un  libsdl1.0-dev                 <none>                        (no description 
available)
un  libsdl1.1-dev                 <none>                        (no description 
available)
un  libsdl1.2                     <none>                        (no description 
available)
un  libsdl1.2-all                 <none>                        (no description 
available)
un  libsdl1.2-arts                <none>                        (no description 
available)
un  libsdl1.2-dev                 <none>                        (no description 
available)
un  libsdl1.2-esd                 <none>                        (no description 
available)
un  libsdl1.2-nas                 <none>                        (no description 
available)
un  libsdl1.2-oss                 <none>                        (no description 
available)
ii  libsdl1.2debian               1.2.14-6.1                    Simple 
DirectMedia Layer
un  libsdl1.2debian-all           <none>                        (no description 
available)
ii  libsdl1.2debian-alsa          1.2.14-6.1                    Simple 
DirectMedia Layer (with X11 and ALSA options)
un  libsdl1.2debian-arts          <none>                        (no description 
available)
un  libsdl1.2debian-esd           <none>                        (no description 
available)
un  libsdl1.2debian-nas           <none>                        (no description 
available)
un  libsdl1.2debian-oss           <none>                        (no description 
available)
un  libsdl1.2debian-pulseaudio    <none>                        (no description 
available)

-- System Information:
Debian Release: 6.0.5
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core)
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-pygame depends on:
ii  libc6              2.11.3-3              Embedded GNU C Library: Shared lib
ii  libjpeg62          6b1-1                 The Independent JPEG Group's JPEG 
ii  libpng12-0         1.2.44-1+squeeze4     PNG library - runtime
ii  libsdl-image1.2    1.2.10-2+b2           image loading library for Simple D
ii  libsdl-mixer1.2    1.2.8-6.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.14-6.1            Simple DirectMedia Layer
ii  libsmpeg0          0.4.5+cvs20030824-2.2 SDL MPEG Player Library - shared l
ii  libx11-6           2:1.3.3-4             X11 client-side library
ii  python             2.6.6-3+squeeze7      interactive high-level object-orie
ii  python-central     0.6.16+nmu1           register and build utility for Pyt
ii  python-numpy       1:1.4.1-5             Numerical Python adds a fast array
ii  ttf-freefont       20090104-7            Freefont Serif, Sans and Mono True

python-pygame recommends no packages.

python-pygame suggests no packages.

-- no debconf information

--- End Message ---
--- Begin Message ---
> There is an error in how circle collisions are calculated in
> pygame.sprite.collide_circle.  It checks whether distance^2 < radius1^2
> + radius2^2, where it should check whether distance^2 < (radius1 +
> radius2)^2.  The effect is that sometimes clearly colliding rects/radii
> are not reported as colliding:

Seems fixed in recent versions.

-nik

Attachment: signature.asc
Description: PGP signature


--- End Message ---
_______________________________________________
Python-modules-team mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team

Reply via email to