renpy / pygame_sdl2

Reimplementation of portions of the pygame API using SDL2.
GNU Lesser General Public License v2.1
325 stars 63 forks source link

Segmentation fault (something about fonts i guess) #112

Closed coresistantcanary closed 1 month ago

coresistantcanary commented 5 years ago

Hello, devs

I get "segmentation fault (core dumped)" while executing this script:

import pygame_sdl2 ; pygame_sdl2.import_as_pygame()
import pygame
pygame.init()
font = pygame.font.Font(None, 20)
pygame.quit()  # segfault

No segmentation faults happen if i do either one of these:

I'm using Python3.7 on Linux Mint 19. pygame_sdl2 installed via pip3.7 . I'm attaching core dump and Valgrind output if they can be useful. pgsdl2sf.zip

sheerluck commented 5 years ago

I stumbled upon the same problem and accidentally tried to add del font right before pygame.quit() and it helped — no segfault anymore