Bug#585118: snowballz: Crashes with index out of range if resolution is set higher than the available in user config

SevenMachines SevenMachines at yahoo.co.uk
Wed Jun 9 09:45:14 UTC 2010


Package: snowballz
Version: 0.9.5.1-2.1
Severity: normal

Recently had a problem with snowballz crashing due to a left over user config
file that had a resolution setting that was no longer available. Just deleting
the config fixes it so it might not be worth fixing (its probably an unusual
occurrence. but i thought i might as well attach a patch for posterity if
useful

TEST CASE:
* Set resolution in ~/.snowballz.ini to too high a integer
* run snowballz gives crash
Traceback (most recent call last):
  File "snowballz.py", line 595, in <module>
    vw,vh = viewport = settings.get_res()
  File "/usr/share/games/snowballz/settings.py", line 28, in get_res
    return get_res_available()[int(qm)]
IndexError: list index out of range



-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-2-amd64 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages snowballz depends on:
ii  python                    2.5.4-9        An interactive high-level object-o
ii  python-imaging            1.1.7-1+b1     Python Imaging Library
ii  python-numpy              1:1.3.0-3+b1   Numerical Python adds a fast array
ii  python-opengl             3.0.1~b2-1     Python bindings to OpenGL
ii  python-pygame             1.8.1release-2 SDL bindings for games development
ii  python-rabbyt             0.8.1-1+b1     sprite library for Python with gam
ii  ttf-tamil-fonts           1:0.5.10       Free TrueType fonts for the Tamil 

snowballz recommends no packages.

snowballz suggests no packages.

-- no debconf information
-------------- next part --------------
An embedded message was scrubbed...
From: Niall Creech <niallcreech at googlemail.com> 
Subject: Catch a out of range resolution setting in user config
Date: no date
Size: 1031
URL: <http://lists.alioth.debian.org/pipermail/pkg-games-devel/attachments/20100609/ddf75fa3/attachment.eml>


More information about the Pkg-games-devel mailing list