Skip to content

Segfault when trying to draw to screen after calling pygame.quit (3679) #1810

@GalacticEmperor1

Description

@GalacticEmperor1

Issue №3679 opened by Martinus2004 at 2023-01-22 16:29:43

Environment:

  • PyGame version (pygame 2.1.3.dev8):

  • Python version (Python 3.10.0)

  • SDL version (SDL 2.0.22)

Current behavior:

If there's a pygame.draw.rect() line in the main game loop and pygame.quit() got called in e.g. "if event.type == pygame.QUIT" without the main loop stopping/breaking, there will be a pretty long segfault message printed to the user. (see screenshot below)

Screenshots

image

Getting the segfault


import pygame



screen = pygame.display.set_mode((500, 500))

pygame.quit()



pygame.draw.rect(screen, "blue", pygame.Rect(0, 0, 1, 1))



<hr>

# Comments

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugNot working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions