jbeder / yaml-cpp

A YAML parser and emitter in C++
MIT License
4.91k stars 1.77k forks source link

YAML::LoadFile issue #1261

Closed jackyvava closed 5 months ago

jackyvava commented 5 months ago

my code :

std::cout << "=============yaml=====================" << std::endl;
std::string config_file_path = "D:\\Desktop\\test\\meta.yaml";
YAML::Node config = YAML::LoadFile(config_file_path);
std::cout << "YAML Content:\n" << config << std::endl;

When I debug, I get error : Exception Unhandled Unhandled exception at 0x00007FFF731E3B19 in fluid euler.exe:Microsoft C++ exception: YAML::BadFile at memory location0x0000007AF38FECEO.

I use try... catch.... {e.what()} , and get "bad file". I believe that meta.yaml is right.

jackyvava commented 5 months ago

微信图片_20240114203919

jbeder commented 5 months ago

Please ask on Stack Overflow.

casl-pointlaz commented 5 months ago

I have the same problem here, does not seem like a usage problem but rather a memory allocation within the library at the destructor ~Node() when using the function LoadFile()

jbeder commented 5 months ago

If that's the case, I assume you can show details, either on Stack Overflow, or your own investigation, that demonstrates that. If so, feel free to open an issue.