`difficult_xml_unknown_elements` test fails for Matrix
The difficult_xml_unknown_elements test fails with this output:
/data/builds/oi-userland/components/library/opencolorio/OpenColorIO-2.4.0/tests/cpu/fileformats/FileFormatCTF_tests.cpp:1436:
FAILED: std::string::npos != StringUtils::Find(parts[i], ErrorOutputs[i])
values were '18446744073709551615' and '18446744073709551615'
The difference is that the test expects this:
"(75): Unrecognized element 'Matrix' where its parent is 'LUT1D' (43): 'Matrix' not allowed in this element"
but it gets the following instead (please note 43 vs. 46):
"(75): Unrecognized element 'Matrix' where its parent is 'LUT1D' (46): 'Matrix' not allowed in this element"
And yes, the testing file contains the Matrix at line 46, not 43: https://github.com/AcademySoftwareFoundation/OpenColorIO/blob/ed0c9effaaabd2bf5ceac8e2470baccca4c49528/tests/data/files/difficult_test1_v1.ctf#L40-L48
@remia , is this the issue you mentioned in the working group meeting today?
Yes this is the one Doug.
I also hit this issue while trying to use expat v2.6.0 instead of OCIO recommended version v2.5.0.
But I think that the expected line number (43), which is the line number expat v2.5.0 reports, is the correct one as I think that second number in the parenthesis is the line number of the parent element 'LUT1D'. I think the error is triggered by the line 75 (first number in parenthesis in the error text) which is indeed a Matrix (not an array like the one in line 46).
https://github.com/AcademySoftwareFoundation/OpenColorIO/blob/ed0c9effaaabd2bf5ceac8e2470baccca4c49528/tests/data/files/difficult_test1_v1.ctf#L75-L82
I tested with latest version of expat 2.7.1 and it still reports line 46. If my interpretation is correct this may be an expat bug, though a minor one.
This is fixed by this PR: https://github.com/AcademySoftwareFoundation/OpenColorIO/pull/2192
Removing https://github.com/AcademySoftwareFoundation/OpenColorIO/labels/help%20wanted as it still shows up on CLOtributor despite being closed.