Skip to content

NaNs completely deadlock draw.line #3412

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

Open
Starbuck5 opened this issue Apr 26, 2025 · 2 comments
Open

NaNs completely deadlock draw.line #3412

Starbuck5 opened this issue Apr 26, 2025 · 2 comments
Labels
bug Not working as intended draw pygame.draw

Comments

@Starbuck5
Copy link
Member

import math
import pygame

pygame.init()

surf = pygame.Surface((500,500))

print("Starting")

pygame.draw.line(surf, "black", (0, 0), (math.nan, 100))

print("Done!")

This test script makes pygame-ce completely unresponsive, it can't even be CTRL-Ced.

I haven't looked into other draw functions.

@Starbuck5 Starbuck5 added draw pygame.draw bug Not working as intended labels Apr 26, 2025
@Starbuck5
Copy link
Member Author

Originally reported by lucy at https://discord.com/channels/772505616680878080/772940667231928360/1358118921626059112, but I also ran into it testing #3402

@damusss
Copy link
Member

damusss commented Apr 26, 2025

I noticed something similar in one of my recent apps, especially if all points of pygame.draw.lines are nan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as intended draw pygame.draw
Projects
None yet
Development

No branches or pull requests

2 participants