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 when we use large coordinates in pygame.draw.line #2961

Open
bilhox opened this issue Jun 30, 2024 · 1 comment · May be fixed by #2962
Open

segfault when we use large coordinates in pygame.draw.line #2961

bilhox opened this issue Jun 30, 2024 · 1 comment · May be fixed by #2962
Labels
bug Not working as intended segfault For PRs that fix segfaults or issues containing segfaults which have an higher priority

Comments

@bilhox
Copy link
Contributor

bilhox commented Jun 30, 2024

Originally reported here : pygame/pygame#4279

Environnement :

pygame-ce 2.5.0 (SDL 2.30.3, Python 3.12.0)
Platform:               Windows-11-10.0.22631-SP0
System:                 Windows
System Version:         10.0.22631
Processor:              AMD64 Family 23 Model 104 Stepping 1, AuthenticAMD
Architecture:           Bits: 64bit     Linkage: WindowsPE

Python:                 CPython 3.12.0 (tags/v3.12.0:0fb18b0, Oct  2 2023, 13:03:39) [MSC v.1935 64 bit (AMD64)]
pygame version:         2.5.0
SDL versions:           Linked: 2.30.3  Compiled: 2.30.3
SDL Mixer versions:     Linked: 2.8.0   Compiled: 2.8.0
SDL Font versions:      Linked: 2.22.0  Compiled: 2.22.0
SDL Image versions:     Linked: 2.8.2   Compiled: 2.8.2
Freetype versions:      Linked: 2.11.1  Compiled: 2.11.1

Display Driver:         Display Not Initialized
Mixer Driver:           Mixer Not Initialized

But also segfaults on other OS.

@bilhox bilhox added the bug Not working as intended label Jun 30, 2024
@oddbookworm oddbookworm linked a pull request Jun 30, 2024 that will close this issue
@bilhox
Copy link
Contributor Author

bilhox commented Jul 13, 2024

Additional thing to mention since this is just an issue, it's not normal that the line isn't clipped to the surface cliprect before drawing it. Like for example if you use an end position of pygame.Vector2(50, math.inf), it'll never finish. I'm aware that it's being fixed in this PR #2080 , it might be interesting to split this PR in different PRs as it tries to improve all drawing functions.

@bilhox bilhox added the segfault For PRs that fix segfaults or issues containing segfaults which have an higher priority label Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as intended 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.

1 participant