Dear Maintainer,
*** Reporter, please consider answering these questions, where appropriate ***
pysiogame startup crash fixed on Debian 13!
PROBLEM:
- ValueError: subsurface rectangle outside surface area
- NameError: game_boards import via eval()
FIXED mit 2 Patches:
PATCH 1: create_subsurfaces() ersetzen durch:
def create_subsurfaces(self):
screen_w, screen_h = self.screen.get_size()
def safe_subsurface(rect):
if rect is None: return self.screen.copy()
x, y, w, h = rect
if x < 0: x = 0
if y < 0: y = 0
if x + w > screen_w: w = screen_w - x
if y + h > screen_h: h = screen_h - y
if w <= 0 or h <= 0: return self.screen.copy()
try:
return self.screen.subsurface((x, y, w, h))
except ValueError:
return self.screen.copy()
self.game_bg = safe_subsurface(self.sizer.game_bg_pos)
self.info_bar = safe_subsurface(self.sizer.info_bar_pos)
self.score_bar = safe_subsurface(self.sizer.score_bar_pos)
self.dialogbg = safe_subsurface(self.sizer.dialogbg_pos)
self.dialogwnd = safe_subsurface(self.sizer.dialogwnd_pos)
self.sb.resize()
text
PATCH 2: eval("game_boards.%s") ersetzen durch:
import importlib
game_module_name = m.game_constructor[0:7]
game_module = importlib.import_module(f'game_boards.{game_module_name}')
self.game_const = getattr(game_module, m.game_constructor.split('.')[-1])
text
Tested: Debian 13, pygame 2.6.1, Python 3.13.5, 1280x1024
Das Spiel läuft jetzt perfekt!
*** End of the template - remove these template lines ***
We believe that the bug you reported is fixed in the latest version of
pysiogame, which is due to be installed in the Debian FTP archive.
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 1132223@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Bastian Germann <bage@debian.org> (supplier of updated pysiogame 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 ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sat, 03 Oct 2026 00:22:31 +0200
Source: pysiogame
Architecture: source
Version: 4.20.01+dfsg-3
Distribution: unstable
Urgency: medium
Maintainer: Debian Games Team <pkg-games-devel@lists.alioth.debian.org>
Changed-By: Bastian Germann <bage@debian.org>
Closes: 1132223
Changes:
pysiogame (4.20.01+dfsg-3) unstable; urgency=medium
.
* Team upload
* Add patch subsurface to clip subsurface rectangles to the display, so that
the game no longer dies with "ValueError: subsurface rectangle outside
surface area". Closes: #1132223
* Add patch game-boards-import to load the game modules with importlib
instead of exec/eval, so that starting a game no longer dies with
"NameError: name 'game_boards' is not defined". Closes: #1132223
Checksums-Sha1:
8319aea8a3de9c6709c172348289fca5cc0f99f7 1881 pysiogame_4.20.01+dfsg-3.dsc
8f5be575bbcbe78c46ed39fd27a7e0a29a6b62fe 20148 pysiogame_4.20.01+dfsg-3.debian.tar.xz
33bbcedc295e9666fe8f97261a8b867ff74f7440 5623 pysiogame_4.20.01+dfsg-3_source.buildinfo
Checksums-Sha256:
d098ceba265246ebd004cd5e48d5bf9e1e47d524a7a13204d0711ca7d4a7266e 1881 pysiogame_4.20.01+dfsg-3.dsc
74bd4f4013ec9631a073845f30a1287722753e76034ce2f0b448779812a766de 20148 pysiogame_4.20.01+dfsg-3.debian.tar.xz
e360fed7efe131eed65ac5a922aac09b332b0690474cbd6844c38c77ed642c32 5623 pysiogame_4.20.01+dfsg-3_source.buildinfo
Files:
0d525f8e79c9e722f5302c83b9570f49 1881 games optional pysiogame_4.20.01+dfsg-3.dsc
ce3657fac23d729671e1f35aec8f5656 20148 games optional pysiogame_4.20.01+dfsg-3.debian.tar.xz
104c95f3e446442b2fc32e060b5248e6 5623 games optional pysiogame_4.20.01+dfsg-3_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQHEBAEBCgAuFiEEQGIgyLhVKAI3jM5BH1x6i0VWQxQFAmrAMoMQHGJhZ2VAZGVi
aWFuLm9yZwAKCRAfXHqLRVZDFLp6DADqAfVrOBo7JGmC5fGSpEo7774CvP6sUju1
nomL0hEnGtjXohsMS7GVimNiRPynp5hPX4r4nbCWNx/T7JfLecQOcMjbT1+EPxum
f+SysYPOJKNdkbk0JoJZrLH4PhXH+9VJJi0W7EFyU95cfUQZP147C4jmMS9SMT02
NS08c3Ky/FVN7NgyXq4DAxGJRuXnfHGUVHwAqJJWRXaJEP+ct+SxK1KZBwmIQwOM
57XU+SaSRfiHmPsmAwdF5zPg7nrUR8dWXTqs9CA/Pmfy6X73qKnEVAW3vFr8CKKS
A++MxNiCOuGNjp8rLpHH2YwCB7enQjettp3smbLZ5+ZyoH7P+M+ekuuzq6svoCkb
sfjSdmM+jCn95QoEa83paa+SU1mwLVB8h6qAhzztWvCKCy4SdG0c3lBEdNO3d4Io
Ah5KvBLtfW0oY5WlEJ3Qs/ICjGXM9TiCPVDBXhVEVtu7H2FQXJFu8sMcHftEQjw4
RqU068aHpwhmRXuV34mejnHqCguzUMM=
=iax5
-----END PGP SIGNATURE-----