AcademySoftwareFoundation / AcademySoftwareFoundation/OpenColorIO

Invalid YAML in test_cpu suite rejected by yaml-cpp 0.9.0

Open Beginner friendly
#2,340 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.1k
Forks
503
PR merge metrics
No merged PRs in 30d

Description

https://github.com/NixOS/nixpkgs/pull/560590#issuecomment-5564165433

When built against yaml-cpp version 0.9.0, `test_cpu_exec` fails:

```
[ 129/1169] [Config / inactive_color_space_precedence ] - PASSED
/build/source/tests/cpu/Config_tests.cpp:6502:
FAILED: exception thrown from config = OCIO::Config::CreateFromStream(is): "Error: Loading the OCIO profile failed. yaml-cpp: error at line 25, column 1: plain value cannot start with flow indicator character"
Segmentation fault (core dumped) ./test_cpu_exec
```

https://github.com/AcademySoftwareFoundation/OpenColorIO/blob/c52966a6677723d5bd2dbef0ccec3fed9cbc3790/tests/cpu/Config_tests.cpp#L6492-L6502

If you want to continue using funky YAML in this test, then the continued lines of the array with more than just whitespace content must be indented. Example fix (without CLA signature): #2339

Contributor guide

Open the contributing guide

Research direction

Start with tests/cpu/Config_tests.cpp around lines 6492-6502 and run the test_cpu suite against yaml-cpp 0.9.0 to reproduce the failure. Inspect the YAML fixture used by the test; done means test_cpu_exec completes without the YAML parsing error or segmentation fault.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
84/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.