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 for hard crash if guiceCurves node is present but empty in wing segment #984

Merged
merged 2 commits into from
Jan 2, 2024

Conversation

joergbrech
Copy link
Contributor

Fixes #962

Description

This PR adds an internal check if an std::vector is empty before trying to access elements. As a consequence, the wing loft and segment loft will be build just as if there were no guide curves defined.

Note that CPACS 3.3 requires the guideCurves node to be nonempty. We are less restrictive here.

How Has This Been Tested?

A new test has been added

Screenshots, that help to understand the changes(if applicable):

Not applicable

Checklist:

  • A test for the new functionality was added.
  • All tests run without failure.
  • The new code complies with the TiGL style guide.
  • [ ] New classes have been added to the Python interface. Not applicable
  • [ ] API changes were documented properly in tigl.h. Not applicable

@joergbrech joergbrech marked this pull request as ready for review December 15, 2023 14:10
@joergbrech joergbrech marked this pull request as draft December 15, 2023 14:21
@joergbrech joergbrech force-pushed the 962-bug-hard-crash-with-no-guidecurves branch from 96e4816 to 9ff831a Compare December 15, 2023 14:26
@joergbrech joergbrech marked this pull request as ready for review December 15, 2023 14:26
Copy link

codecov bot commented Dec 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7671d7e) 68.90% compared to head (5c645fc) 68.91%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #984   +/-   ##
=======================================
  Coverage   68.90%   68.91%           
=======================================
  Files         298      299    +1     
  Lines       26479    26483    +4     
=======================================
+ Hits        18246    18250    +4     
  Misses       8233     8233           
Files Coverage Δ
src/guide_curves/CCPACSGuideCurves.cpp 62.96% <100.00%> (+1.42%) ⬆️

... and 1 file with indirect coverage changes

@joergbrech joergbrech force-pushed the 962-bug-hard-crash-with-no-guidecurves branch from 9ff831a to 5c645fc Compare December 22, 2023 09:37
@joergbrech
Copy link
Contributor Author

@AntonReiswich, I just rebased this on master, so that hopefully the MacOS tests will succeed as well.

@joergbrech
Copy link
Contributor Author

joergbrech commented Dec 22, 2023

💩 Some linker error on linux now...I will investigate...

EDIT: This happens on master as well ☹️

@joergbrech
Copy link
Contributor Author

joergbrech commented Dec 22, 2023

💩 Some linker error on linux now...I will investigate...

EDIT: This happens on master as well ☹️

I wonder if the PR DLR-SC/tigl-conda#29 is responsible? This is the only change yesterday that I can make out which could potentially influence the build job here.

tigl-conda uses ubuntu-latest, aka Ubuntu 22.04. Maybe the newly built packages introduce a glibc incompatibility?

See also

EDIT 2:

Let's see if this helps: DLR-SC/tigl-conda#35

@joergbrech
Copy link
Contributor Author

Fixed with DLR-SC/tigl-conda#36. This is ready for review again

@AntonReiswich AntonReiswich merged commit ec63eee into master Jan 2, 2024
18 of 19 checks passed
@AntonReiswich AntonReiswich deleted the 962-bug-hard-crash-with-no-guidecurves branch January 2, 2024 09: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.

TiGL crashes when <guidecurves> node has no children nodes.
2 participants