BUG: C21: Wrong or misleading diagnostics in 10 filters
I maintainer di solito rispondono entro 6 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 20/100
Direzione di ricerca
Start by reading the ten referenced filter implementations and their associated tests; the checklist links identify each finding and location. Reproduce each finding with a failing test, then run the relevant tests for both Direct and Scanline paths where masks are involved. Done means all ten diagnostics or mask behaviors match the stated rules, tests pass, and the AlignSectionsMutualInformation mask behavior decision is resolved.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Some filters give diagnostics that are wrong. Two sub-patterns occur:
- Masked cells validated before the mask test. A per-cell loop validates a value (for example a Phase) or grows a feature before it tests the mask. A cell that the mask excludes can then fail execute or join a feature.
- Diagnostic message wrong, swapped or misleading. An error, warning or help text formats the wrong variable, swaps arguments or messages, fires on the wrong condition, adds counts across arrays, or gives advice that the user cannot follow.
As of develop 419f9db35 (2026-10-21), there are 10 open findings in 10 filters: 0 CRASH, 0 WRONG_DATA, 10 MINOR. All findings are candidates. They were found and re-checked by reading the code. Nobody ran the code to confirm them.
Mechanism
Most messages are written by hand at each call site. No test asserts on the message text, so a wrong argument or a swapped message is not detected. Example: ReadEnsembleInfo gives the group name where the key name must go, and the key name where the group name must go:
if(inputIni[group].count(k_CrystalStructure) == 0)
{
return MakeErrorResult(-13005, fmt::format("Could not find the key {} in phase group {} from the input file '{}'", group, k_CrystalStructure, m_InputValues->InputFile));
}
if(inputIni[group].count(k_PhaseType) == 0)
{
return MakeErrorResult(-13006, fmt::format("Could not find the key {} in phase group {} from the input file '{}'", group, k_PhaseType, m_InputValues->InputFile));
}
For the mask sub-pattern, the loop counts a bad value before it reads the mask. In ComputeFZQuaternions the count of out-of-range phases includes cells that the mask excludes. Execute then fails with -49008, although those cells produce no output (ComputeFZQuaternions.cpp#L181-L186).
No filter of this class was fixed on develop or in an open pull request.
Rule
- In each per-cell loop, test the mask first. Validate, count or grow only the cells that the mask enables. Apply this in every algorithm path (Direct and Scanline).
- Each diagnostic must name the correct values, in the correct order, and must fire only on the condition that its text describes. Advice in a message must be possible to follow.
- Each distinct condition gets its own error code and message.
- Decision needed for
AlignSectionsMutualInformationFilter#3. DREAM3D 6.5.171 also lets masked cells join features during neighbor growth, but the filter documentation says that masked cells are excluded. Options:- Add the mask test to neighbor growth (behavior changes from 6.5.171).
- Keep the 6.5.171 behavior and correct the documentation (masked cells are only excluded as seeds).
How to fix
- Write the failing test first (see "How to test").
- For a mask finding, move the mask test before the validation or the counting step. Do this in each algorithm path that has the loop.
- For a message finding, correct the
fmt::formatarguments, the condition, or the text. Keep the existing error code when the condition stays the same. - When you add a new error code, use the range of that filter. Filter error codes are more negative than -10000, and each filter uses one range of 100 codes (first code -47500 gives -47500..-47599). Check that the code is unique with
git grep -nE -- "-NNNN([^0-9]|$)". Do not use\b, becausegit grep -Eignores it. Also check the open pull request branches. - For a help-text-only change (
ExtractVertexGeometryFilter#1), a unit test cannot fail on develop. Write this in the pull request.
How to test
- Write a unit test that fails on develop before you change the code.
- Message findings: write an error-path test. Assert the error code (or warning code). Also assert that the message contains the correct values, for example the key name and the group name in the correct positions.
- Mask findings: write an execute test with a masked-out cell that holds a bad value (for example Phase 5 with 2 Crystal Structures tuples). The test must pass, and the output values of the enabled cells must match an independent expected result. Run Direct and Scanline both through the existing algorithm-selection test scope.
- Warning findings: assert that the warning appears for the condition that it describes and does not appear for the other condition.
- If you cannot reproduce a finding, write this with the reason in the pull request and on this issue. Do not force a fix.
Conventions
- Make one pull request for the whole class, with one commit for each filter.
- Start each commit message with
BUG:and add aSigned-off-byline. Do not add AI attribution. - Start each fix with a unit test that fails on develop.
- Value checks need an independent expected result (oracle), not the output of the code under test.
- Run ctest serially. Never use
-j, because the tests depend on each other. - Format with clang-format 19.1.1 and the repository
.clang-format. - Do not add sentences about input requirements to the filter documentation. The generated parameter table documents them.
- If a fix touches a filter that has a V&V report (
src/Plugins/<Plugin>/vv/<Filter>.md), update every file of its V&V package (report, deviations, provenance, test tables). V&V documents reference DREAM3D 6.5.171 only. - Rebase on develop. Do not merge develop into the branch.
Checklist
- MINOR · ReadImageStackFilter · ReadImageStackFilter.cpp:390 — RGB uint8 slices with Set Image Data Type = true and Output Data Type = uint16: error -23506 tells the user to turn on Convert To GrayScale, but then error -23504 rejects the non-uint8 data, so the advice cannot be followed.
ReadImageStackFilter#9 - MINOR · AlignSectionsMutualInformationFilter · AlignSectionsMutualInformation.cpp:125 — With Use Mask Array = true, neighbor growth tests only Feature Ids and Phases, so a masked-out cell joins a feature, or fails with -53703 if its Phase is out of range. Matches 6.5.171; see "Decision needed".
AlignSectionsMutualInformationFilter#3 -
MINOR · ComputeBoundaryStrengthsFilter · ComputeBoundaryStrengths.cpp:88 — The Laue class warning fires when the phase index is not 1, not when the crystal structure is not Cubic m-3m. It fires for a cubic phase 2 and is missing for a hexagonal phase 1. Output values are correct.— moved to #1861 C01b.ComputeBoundaryStrengthsFilter#3 - MINOR · ComputeFZQuaternionsFilter · ComputeFZQuaternions.cpp:183 — With Apply to Good Elements Only = true, a masked-out cell with Phase 5 and 2 Crystal Structures tuples is counted as out of range, so execute fails with -49008. Fix every algorithm path.
ComputeFZQuaternionsFilter#1 - MINOR · CreateEnsembleInfoFilter · CreateEnsembleInfo.cpp:82 — Errors -10006 and -10007 print the looked-up number (for example 999) instead of the crystal structure or phase type text that the user typed, and do not give the row number.
CreateEnsembleInfoFilter#2 - MINOR · ReadEnsembleInfoFilter · ReadEnsembleInfo.cpp:105 — An INI group without a CrystalStructure or PhaseType key gives error -13005 or -13006 with the key name and group name swapped.
ReadEnsembleInfoFilter#3 - MINOR · ComputeArrayHistogramByFeatureFilter · ComputeArrayHistogramByFeature.cpp:1393 — The
overflowcounter is declared once outside the per-array loop and never reset, so the message for array B also counts the out-of-range values of array A.ComputeArrayHistogramByFeatureFilter#10 - MINOR · ComputeFeatureRectFilter · ComputeFeatureRect.cpp:93 — A Feature Id of -1 gives error -31000, which says that the Feature Attribute Matrix has too few tuples. Negative Feature Ids need their own code and message.
ComputeFeatureRectFilter#2 - MINOR · CreateColorMapFilter · ColorTableUtilities.cpp:251 — Errors -36782 and -36783 are swapped: an unknown preset says "Found ... but no 'RGBPoints'", and a preset without RGBPoints (for example 'KAAMS') says "Unable to find".
CreateColorMapFilter#3 - MINOR · ExtractVertexGeometryFilter · ExtractVertexGeometryFilter.cpp:71 — The Array Handling help text says "[0] Move or [1] Copy", but the choices and
ArrayHandlingTypeuse 0 = Copy and 1 = Move. A Python or pipeline user who sets 0 gets Copy.ExtractVertexGeometryFilter#1
Out of scope
- Findings of this class in filters that have a V&V report are not in this issue. There is 1 such finding, in
ComputeIPFColorsFilter. It is handled on a separate V&V branch.
- Lingua principale
- C++
- Stelle
- 18
- Fork
- 15
- Merge medio
- 4g 23h
- PR unite (30g)
- 42
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di BlueQuartzSoftware/simplnx
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
BlueQuartzSoftware/simplnx#1987 ·
I maintainer di solito rispondono entro 6 giorni
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
BlueQuartzSoftware/simplnx#1980 ·
I maintainer di solito rispondono entro 6 giorni
-
Testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
BlueQuartzSoftware/simplnx#1979 ·
I maintainer di solito rispondono entro 6 giorni
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
BlueQuartzSoftware/simplnx#1978 ·
I maintainer di solito rispondono entro 6 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
BlueQuartzSoftware/simplnx#1945 ·
I maintainer di solito rispondono entro 6 giorni
Tutte le issue di BlueQuartzSoftware/simplnx
Issue simili
-
bug triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
26.04 bug dark-mode Easy Hack impress symptom: visual
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
CollaboraOnline/online#16421 · 1 commento ·
-
area/cs bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ydb-platform/ydb#59881 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
documentation enhancement lua server
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100