pygame_sdl2 icon indicating copy to clipboard operation
pygame_sdl2 copied to clipboard

Segmentation fault (something about fonts i guess)

Open coresistantcanary opened this issue 7 years ago • 1 comments

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:

  • comment out the line with font = ...
  • comment out pygame.quit()
  • just use pygame instead of pygame_sdl2

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

coresistantcanary avatar Aug 29 '18 16:08 coresistantcanary

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

sheerluck avatar Jan 16 '19 18:01 sheerluck