Repository navigation
BUG: Report an error when an ANG h5ebsd slice cannot be read - #72
Closed
imikejackson wants to merge 1 commit into
Closed
imikejackson wants to merge 1 commit into
imikejackson wants to merge 1 commit into
Conversation
* H5AngReader::readFile() returned a negative value without setting an error code or message when the slice path was empty, the file could not be opened, or the slice group did not exist. Header and data failures returned the file-close status instead of the error. * H5AngVolumeReader::loadData() returned the child's error code, which was 0, so a slice range that extends past the file succeeded and each missing slice was filled with zeros. * Each failure now sets a negative error code (-90040 to -90046) and a message that names the file and the HDF5 slice path, and the volume reader never returns 0 after a failed slice read. * Add the H5AngMissingSlice test: direct reader failures, a one-slice ANG and CTF volume, an ANG volume range past the file, and the existing CTF -77000 result. Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
This was referenced Nov 12, 2026
Collaborator
Author
|
Closed in favor of #86, which merges this branch (with its history) together with the other open EbsdLib fixes for the next release, so simplnx can build against one EbsdLib branch. The branch is kept. 🤖 Generated with Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reading an ANG-based
.h5ebsdvolume with a slice range that goes past the last slice in the file succeeded with no error. Each missing slice was filled with zeros. A CTF-based file with the same range fails with -77000.H5AngReader::readFile()returned a negative value without setting an error code or message when the slice path was empty, the file could not be opened, or the slice group did not exist. Header and data failures returned the file-close status instead of the error.H5AngVolumeReader::loadData()copied the child reader's error code, which was 0, so the failed slice was treated as a success.H5AngVolumeReadernever returns 0 after a failed slice read (also ingetPhases()).H5CtfVolumeReaderalready returns -77000 for a failed slice, so it is not changed.Test Plan
EbsdLib::ebsdlib::H5AngMissingSlice(inAngImportTest.cpp) fails ondevelopand passes with this change. It covers the direct reader failures, one-slice ANG and CTF volumes, an ANG volume range past the file, and the existing CTF -77000 result.ctestsuite passes, 430/430.Related Issue
Related to BlueQuartzSoftware/simplnx#1867 (item
ReadH5EbsdFilter#8). simplnx also rejects an out-of-range slice selection in preflight; this change fixes the reader so that other callers get an error too. The same defect was reported for DREAM.3D 6 in BlueQuartzSoftware/DREAM3D#952.