jbeder / yaml-cpp

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

Segmentation Fault on yaml-cpp-0.5.3 #1257

Closed elaner1956 closed 6 months ago

elaner1956 commented 6 months ago

Need to use yaml-0.5.3 as platform does not have C++ 11.

I have a very simple config file named config.yml:

---
Networking:
  port: 3030

Code looks like this:

YAML::Node dsp;
dsp = YAML::LoadFile("config.yml");
cout << dsp << "\n";
cout << dsp["Networking"]["port"] << "\n";

Output is:

Networking:
  port: 3030
Segmentation fault

The second cout statement is giving a segmentation fault.

Any help is appreciated.

jbeder commented 6 months ago

Please ask on Stack Overflow.