Bug#1132223: pysiogame startup crash fixed on Debian 13!

william hemselem at gmx.de
Sun Mar 29 14:45:15 BST 2026


Package: pysiogame
Version: 4.20.01-3
Severity: normal
X-Debbugs-Cc: hemselem at gmx.de

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 ***


-- System Information:
Debian Release: 13.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.74+deb13+1-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages pysiogame depends on:
ii  fonts-freefont-ttf  20211204+svn4273-2
ii  fonts-kacst-one     5.0+svn11846-10
ii  python3             3.13.5-1
ii  python3-pygame      2.6.1-1+b2

pysiogame recommends no packages.

pysiogame suggests no packages.

-- no debconf information


More information about the Pkg-games-devel mailing list