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 matched polygon region approximation crash #1386

Merged
merged 6 commits into from
Jul 18, 2024
Merged

Conversation

pford
Copy link
Collaborator

@pford pford commented Jul 16, 2024

Description

  • What is implemented or fixed? Mention the linked issue(s), if any.
    Fixes Backend segmentation fault crash when working with high resolution region, cube and image #1383 and duplicate issue Segmentation fault backend crash with two cubes and high resolution region #1384

  • How does this PR solve the issue? Give a brief summary.
    To approximate a polygon region in a matched region, the polygon is reinvented with many points between the original polygon points to prevent distortion in the conversion. But when the original polygon has a very short segment, the matched segment may not add any points and consists of just the starting point. The segmentation fault resulted due to invalid indexing which assumed at least two points when checking for "kinks" introduced in a matched horizontal segment. In this fix, these one-point segments are no longer checked. Added a RegionMatchedTest which causes a seg fault in dev but passes in this branch.

  • Are there any companion PRs (frontend, protobuf)?
    No

  • Is there anything else that testers should know (e.g. exactly how to reproduce the issue)?
    Try to get stats or spectral profile for a matched polygon with a very short segment between points, < 1/1000th of the original polygon length (the new backend test uses a polygon with only 5 points). The analysis should complete successfully and not crash the backend.

Checklist

  • changelog updated / no changelog update needed
  • e2e test passing / corresponding fix added / new e2e test created
  • ICD test passing / corresponding fix added / new ICD test created
  • protobuf updated to the latest dev commit / no protobuf update needed
  • protobuf version bumped / protobuf version not bumped
  • added reviewers and assignee
  • GitHub Project estimate added

Copy link
Contributor

@kswang1029 kswang1029 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. no regression from e2e tests.

Copy link

Code Coverage

Package Line Rate Health
src.Cache 72%
src.DataStream 44%
src.FileList 67%
src.Frame 36%
src.HttpServer 42%
src.ImageData 28%
src.ImageFitter 83%
src.ImageGenerators 44%
src.ImageStats 75%
src.Logger 37%
src.Main 52%
src.Region 69%
src.Session 4%
src.Table 52%
src.ThreadingManager 67%
src.Timer 85%
src.Util 40%
Summary 46% (8634 / 18830)

@confluence confluence merged commit 8224075 into dev Jul 18, 2024
14 checks passed
@confluence confluence deleted the pam/1383_polygon_crash branch July 18, 2024 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backend segmentation fault crash when working with high resolution region, cube and image
3 participants