Skip to content

Segmentation fault when using solid_overlay on empty rendered text #3747

@OwenCMYK

Description

@OwenCMYK

Environment:

pygame-ce 2.5.7 (SDL 2.32.10, Python 3.13.7)
Platform:		Windows-10-10.0.19045-SP0
System:			Windows
System Version:		10.0.19045
Processor:		AMD64 Family 23 Model 24 Stepping 1, AuthenticAMD	SSE2: Yes	AVX2: Yes	NEON: No
Architecture:		Bits: 64bit	Linkage: WindowsPE

Python:			CPython 3.13.7 (tags/v3.13.7:bcee1c3, Aug 14 2025, 14:15:11) [MSC v.1944 64 bit (AMD64)]
GIL Enabled:		True
pygame version:		2.5.7
SDL versions:		Linked: 2.32.10	Compiled: 2.32.10
SDL Mixer versions:	Linked: 2.8.1	Compiled: 2.8.1
SDL Font versions:	Linked: 2.24.0	Compiled: 2.24.0
SDL Image versions:	Linked: 2.8.8	Compiled: 2.8.8
Freetype versions:	Linked: 2.11.1	Compiled: 2.11.1

Display Driver:		windows
Mixer Driver:		wasapi

Current behavior:

Python crashes with a segmentation fault.

Expected behavior:

The code should make a small window, and then close.

Test code

import pygame
pygame.init()
win = pygame.display.set_mode((1,1)) # Resolution doesn't seem to matter
Font = pygame.font.Font("Fonts/CloisterBlack.ttf", 1) # Font and size doesn't seem to matter
RenderedText = Font.render("", 0, (0, 0, 0)).convert_alpha() # Text has to be empty
pygame.transform.solid_overlay(RenderedText,(255,255,255))

Stack trace/error output/other error logs

pygame-ce 2.5.7 (SDL 2.32.10, Python 3.13.7)
Platform:		Windows-10-10.0.19045-SP0
System:			Windows
System Version:		10.0.19045
Processor:		AMD64 Family 23 Model 24 Stepping 1, AuthenticAMD	SSE2: Yes	AVX2: Yes	NEON: No
Architecture:		Bits: 64bit	Linkage: WindowsPE

Python:			CPython 3.13.7 (tags/v3.13.7:bcee1c3, Aug 14 2025, 14:15:11) [MSC v.1944 64 bit (AMD64)]
GIL Enabled:		True
pygame version:		2.5.7
SDL versions:		Linked: 2.32.10	Compiled: 2.32.10
SDL Mixer versions:	Linked: 2.8.1	Compiled: 2.8.1
SDL Font versions:	Linked: 2.24.0	Compiled: 2.24.0
SDL Image versions:	Linked: 2.8.8	Compiled: 2.8.8
Freetype versions:	Linked: 2.11.1	Compiled: 2.11.1

Display Driver:		windows
Mixer Driver:		wasapi
Fatal Python error: pygame_parachute: (pygame parachute) Segmentation Fault
Python runtime state: initialized

Current thread 0x000006ec (most recent call first):
  File "[filepath removed for privacy]/Pygame Smoothscale Reproduction.py", line 7 in <module>

Extension modules: pygame.base, pygame.constants, pygame.rwobject, pygame.rect, pygame.bufferproxy, pygame.math, pygame.surflock, pygame.surface, pygame.window, pygame.display, pygame.draw, pygame.joystick, pygame.event, pygame.imageext, pygame.image, pygame.key, pygame.mouse, pygame.pixelcopy, pygame.mask, pygame.time, pygame.transform, pygame.font, pygame.mixer_music, pygame.mixer, pygame.scrap, pygame.system, pygame._freetype (total: 27)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugNot working as intendedsegfaultFor PRs that fix segfaults or issues containing segfaults, which have a higher priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions