Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault in pygame.transform.rotate #2464

Closed
BirdLogics opened this issue Jan 31, 2021 · 1 comment · Fixed by #2725
Closed

Segfault in pygame.transform.rotate #2464

BirdLogics opened this issue Jan 31, 2021 · 1 comment · Fixed by #2725
Assignees
Labels
bug reproducible confirmed that the issue can be replicated and there are instructions to reproduce the issue transform pygame.transform

Comments

@BirdLogics
Copy link

Environment:

  • Operating system: Windows 10
  • Python version: 3.8.3
  • SDL version: 1.2.16, 2.0.14
  • PyGame version: 1.9.6, 2.0.1

Description
When attempting to rotate a surface which has a size of 0 in either dimension, Pygame throws a segmentation fault.

Test code

import pygame

pygame.init() # Optional

surface = pygame.Surface((0, 0))

surface = pygame.transform.rotate(surface, 45)

print("Success!") # This never runs

Stack trace

pygame 2.0.1 (SDL 2.0.14, Python 3.8.3)
Hello from the pygame community. https://www.pygame.org/contribute.html
Fatal Python error: (pygame parachute) Segmentation Fault
Python runtime state: initialized

Current thread 0x000003b0 (most recent call first):
  File ".\test_rotation.py", line 7 in <module>
@BirdLogics BirdLogics added the bug label Jan 31, 2021
@robertpfeiffer
Copy link
Contributor

I could have sworn that was fixed at some point, but it looks like it was only fixed for 90° rotations!

@robertpfeiffer robertpfeiffer added reproducible confirmed that the issue can be replicated and there are instructions to reproduce the issue transform pygame.transform labels Jan 31, 2021
@MightyJosip MightyJosip self-assigned this Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug reproducible confirmed that the issue can be replicated and there are instructions to reproduce the issue transform pygame.transform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants