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

pygame.draw.aaline(⋯) segfault for 24-bit surfaces #3075

Open
geometrian opened this issue Aug 21, 2024 · 2 comments · May be fixed by #3008
Open

pygame.draw.aaline(⋯) segfault for 24-bit surfaces #3075

geometrian opened this issue Aug 21, 2024 · 2 comments · May be fixed by #3008
Labels
draw pygame.draw segfault For PRs that fix segfaults or issues containing segfaults which have an higher priority

Comments

@geometrian
Copy link

The following example causes a segfault (Python 3.12.5, pygame-ce 2.5.1):

import pygame

surf = pygame.Surface( (315,271), depth=24 )

#Crash on following line:
pygame.draw.aaline( surf, (255,0,255), (100,207),(20,229) )

Some coordinates can be passed safely, while others cannot. When it works, it seems to draw a line with the correct locations, but blended incorrectly. Meanwhile, 32-bit surfaces do not have this problem. This tells me that this function is not respecting the pixel stride.

@damusss damusss added draw pygame.draw segfault For PRs that fix segfaults or issues containing segfaults which have an higher priority labels Aug 21, 2024
@damusss
Copy link
Contributor

damusss commented Aug 21, 2024

I haven't looked at how or why, but I'm sure if you added the result of pygame.print_debug_info() to the PR description it would help contributors :)

@bilhox
Copy link
Contributor

bilhox commented Aug 21, 2024

Hello,

Thanks for the report ! This is something we're already aware and I'm currently working on a fix, which should be available in the next pygame-ce version.

The PR in question : #3008

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
draw pygame.draw segfault For PRs that fix segfaults or issues containing segfaults which have an higher priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants