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

Trim Gouraud triangles that contain NaN #26767

Merged
merged 1 commit into from Sep 14, 2023

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Sep 13, 2023

PR summary

Agg enters an infinite loop if you give it points that are NaN, due to converting the values to fixed-point integers, and then oscillating between the large values that result from that conversion.

NaN values may be introduced after transforming the input, so we need to trim those after transformation. This matches what is done in normal paths.

The test itself is mostly a smoketest to ensure we don't crash.

Closes #26765

PR checklist

Agg enters an infinite loop if you give it points that are NaN, due to
converting the values to fixed-point integers, and then oscillating
between the large values that result from that conversion.

NaN values may be introduced after transforming the input, so we need to
trim those after transformation. This matches what is done in normal
paths.
@QuLogic QuLogic added this to the v3.8.0 milestone Sep 13, 2023
@greglucas greglucas merged commit 1b11a77 into matplotlib:main Sep 14, 2023
42 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Sep 14, 2023
@QuLogic QuLogic deleted the fix-gouraud-nan branch September 14, 2023 19:34
@ksunden ksunden mentioned this pull request Sep 15, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Crash in Windows 10 if polar axis lim is lower than lowest data point.
3 participants