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

fix: crash with a bline containing only 2 points that are too close #2855

Merged
merged 1 commit into from
May 5, 2023

Conversation

rodolforg
Copy link
Contributor

@rodolforg rodolforg commented Oct 18, 2022

prevent crash due to NaN with a bline containing only 2 points that are too close

distance[n-1] would be zero, and make the WidthPoint position to be NaN

That problem is propagated, affects synfig::hom_to_std() and a crash happens

How to reproduce: with Draw Tool and a drawing tablet, quickly tap twice (or more in a row) at the same point. Synfig Studio crashes.

@ice0 ice0 added the Crash label Oct 18, 2022
@ice0
Copy link
Collaborator

ice0 commented Oct 18, 2022

Possible issue fixed: #2276

@ice0 ice0 changed the title fix: prevent crash due to NaN with a bline containing only too close … fix: prevent crash with a bline containing only 2 points that are too close Oct 18, 2022
@ice0 ice0 changed the title fix: prevent crash with a bline containing only 2 points that are too close fix: crash with a bline containing only 2 points that are too close Oct 18, 2022
@rodolforg
Copy link
Contributor Author

Possible issue fixed: #2276

I don't know :)

ice0
ice0 previously approved these changes Oct 20, 2022
distance[n-1] would be zero, and make the WidthPoint position to be NaN

That problem is propagated, affects synfig::hom_to_std() and a crash happens

How to reproduce: with Draw Tool and a drawing tablet, quickly tap twice
(or more in a row) at the same point. Synfig Studio crashes.
@ice0 ice0 merged commit 3e130dc into synfig:master May 5, 2023
@ice0
Copy link
Collaborator

ice0 commented May 5, 2023

Merged. Thank you!

@rodolforg rodolforg deleted the avoid-crash-nan branch May 5, 2023 01:10
morevnaproject pushed a commit that referenced this pull request Apr 14, 2024
…2855)

distance[n-1] would be zero, and make the WidthPoint position to be NaN

That problem is propagated, affects synfig::hom_to_std() and a crash happens

How to reproduce: with Draw Tool and a drawing tablet, quickly tap twice
(or more in a row) at the same point. Synfig Studio crashes.
@rodolforg rodolforg mentioned this pull request Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backported
Development

Successfully merging this pull request may close these issues.

3 participants