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

Hotfix GLTF extras broke running tests in Debug #4597

Merged
merged 1 commit into from May 24, 2022

Conversation

jmarrec
Copy link
Collaborator

@jmarrec jmarrec commented May 24, 2022

Pull request overview

GLTF extras broke (#4571) running ctest in Debug (400 tests segfaulting)

This is an absolute minimal fix to have the tests passing, but I think we should refactor:

  • avoid all static storage objects
  • change the data layout and API in the classes that are in GltfForwardTranslator
    • just use T (eg double) instead of std::tuple<std::string, tinygltf::Value(T)>
    • provide a protected toGltfValue that will create the std::map<std::string, tinygltf::Value>
  • Move those to separate files (like the wrappers are)
  • Remove the wrappers (which are superflous now)

Pull Request Author

  • Model API Changes / Additions
  • Any new or modified fields have been implemented in the EnergyPlus ForwardTranslator (and ReverseTranslator as appropriate)
  • Model API methods are tested (in src/model/test)
  • EnergyPlus ForwardTranslator Tests (in src/energyplus/Test)
  • If a new object or method, added a test in NREL/OpenStudio-resources: Add Link
  • If needed, added VersionTranslation rules for the objects (src/osversion/VersionTranslator.cpp)
  • Verified that C# bindings built fine on Windows, partial classes used as needed, etc.
  • All new and existing tests passes
  • If methods have been deprecated, update rest of code to use the new methods

Labels:

  • If change to an IDD file, add the label IDDChange
  • If breaking existing API, add the label APIChange
  • If deemed ready, add label Pull Request - Ready for CI so that CI builds your PR

Review Checklist

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • Code Style, strip trailing whitespace, etc.
  • All related changes have been implemented: model changes, model tests, FT changes, FT tests, VersionTranslation, OS App
  • Labeling is ok
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified

This is an absolute minimal fix to have the tests passing, but I think we should refactor: 
* avoid all static storage objects
* change the data layout and API in the classes that are in GltfForwardTranslator
    * just use `T` (eg double) instead of std::tuple<std::string, tinygltf::Value(T)> 
    * provide a protected toGltfValue that will create the std::map<std::string, tinygltf::Value>
* Move those to separate files (like the wrappers are)
* Remove the wrappers (which are superflous now)The wrappers classes and superfluous, there's a lot of static storage objects throughout that should be deleting.
The data layouts of the classes in GltfForwardTranslator makes little sense to me (using a tuple<string, T> makes little sense to me).
cf #4571
@jmarrec jmarrec added Developer Issue component - Utilities Geometry component - Model Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. labels May 24, 2022
@jmarrec jmarrec requested a review from tijcolem May 24, 2022 16:16
@jmarrec jmarrec self-assigned this May 24, 2022
@tijcolem
Copy link
Collaborator

@jmarrec Thanks for the quick fix on this! I looked at the CI runner for code coverage and it's been set ignore the ctest failures as it was only looking at the code coverage. I changed this so it'll fail now if any of the debug tests fail. It looks like a couple of debug tests routinely fail so I added these to filter list. Going forward we should be able to catch these.

@tijcolem tijcolem merged commit 86470fe into develop May 24, 2022
@tijcolem tijcolem deleted the gltf_extra_minimum_fix_to_not_segfault branch May 24, 2022 22:21
@jmarrec jmarrec mentioned this pull request Jun 13, 2022
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component - Model component - Utilities Geometry Developer Issue Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants