{"action":"created","issue":{"url":"https://api.github.com/repos/jbeder/yaml-cpp/issues/299","labels_url":"https://api.github.com/repos/jbeder/yaml-cpp/issues/299/labels{/name}","comments_url":"https://api.github.com/repos/jbeder/yaml-cpp/issues/299/comments","events_url":"https://api.github.com/repos/jbeder/yaml-cpp/issues/299/events","html_url":"https://github.com/jbeder/yaml-cpp/issues/299","id":66198836,"number":299,"title":"segfault on access","user":{"login":"tmladek","id":5217341,"avatar_url":"https://avatars.githubusercontent.com/u/5217341?v=3","gravatar_id":"","url":"https://api.github.com/users/tmladek","html_url":"https://github.com/tmladek","followers_url":"https://api.github.com/users/tmladek/followers","following_url":"https://api.github.com/users/tmladek/following{/other_user}","gists_url":"https://api.github.com/users/tmladek/gists{/gist_id}","starred_url":"https://api.github.com/users/tmladek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmladek/subscriptions","organizations_url":"https://api.github.com/users/tmladek/orgs","repos_url":"https://api.github.com/users/tmladek/repos","events_url":"https://api.github.com/users/tmladek/events{/privacy}","received_events_url":"https://api.github.com/users/tmladek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-03T17:56:46Z","updated_at":"2015-04-03T18:03:53Z","closed_at":null,"body":"Relevant portion of the code:\r\n\r\n    ...\r\n\tYAML::Node fluff = YAML::LoadFile(\"fluff.yaml\");\r\n\tfor (auto name : fluff[\"names\"][\"places\"]){          // <- segfault here\r\n\t\tstd::string strname = name.as<std::string>();\r\n\t\tnames.push_back(strname);\r\n\t}\r\n    ...\r\n\r\nBacktrace:\r\n\r\n    Program received signal SIGSEGV, Segmentation fault.\r\n    0x00007ffff6db9b64 in std::string::assign(std::string const&) () from /usr/lib/libstdc++.so.6\r\n    (gdb) bt\r\n    #0  0x00007ffff6db9b64 in std::string::assign(std::string const&) () from /usr/lib/libstdc++.so.6\r\n    #1  0x0000000000518805 in operator= (__str=..., this=0x7fffffffd8a0) at /usr/include/c++/4.9.2/bits/basic_string.h:555\r\n    #2  decode (rhs=\"\", node=...) at /usr/local/include/yaml-cpp/node/convert.h:45\r\n    #3  equals<std::basic_string<char> > (pMemory=..., rhs=\"names\", node=...) at /usr/local/include/yaml-cpp/node/detail/impl.h:147\r\n    #4  YAML::detail::node_data::get<std::string> (this=0xab6c70, key=\"names\", pMemory=...) at /usr/local/include/yaml-cpp/node/detail/impl.h:96\r\n    #5  0x00000000005191ed in get<std::basic_string<char> > (pMemory=..., key=\"names\", this=<optimized out>)\r\n        at /usr/local/include/yaml-cpp/node/detail/node_ref.h:52\r\n    #6  get<std::basic_string<char> > (pMemory=..., key=\"names\", this=0xab6840) at /usr/local/include/yaml-cpp/node/detail/node.h:103\r\n    #7  YAML::Node::operator[]<char [6]> (this=this@entry=0x7fffffffdb30, key=...) at /usr/local/include/yaml-cpp/node/impl.h:392\r\n    #8  0x00000000005125ca in Game::Game (this=0x7fffffffde50, gui=<optimized out>) at /home/foo/bar/Game.cpp:11\r\n    #9  0x00000000004752ca in main (argc=1, args=0x7fffffffe3f8) at /home/foo/bar/main.cpp:84\r\n\r\nAnd the YAML file:\r\n\r\n    ---\r\n    names:\r\n      places:\r\n        - Berlin\r\n        - London\r\n        - Paris\r\n    ...\r\n\r\nI'd be glad to post more details, but the problem absolutely escapes me. I'm using `yaml-cpp` 0.5.2-2 from Archlinux community repos and it used to work for some time; then, without any changes to the code, it started segfaulting when built on one machine, then on the other as well. It's very much possible that this is just an issue on my side, but I've ran out of troubleshooting options, so any help is appreciated!"},"comment":{"url":"https://api.github.com/repos/jbeder/yaml-cpp/issues/comments/89377322","html_url":"https://github.com/jbeder/yaml-cpp/issues/299#issuecomment-89377322","issue_url":"https://api.github.com/repos/jbeder/yaml-cpp/issues/299","id":89377322,"user":{"login":"tmladek","id":5217341,"avatar_url":"https://avatars.githubusercontent.com/u/5217341?v=3","gravatar_id":"","url":"https://api.github.com/users/tmladek","html_url":"https://github.com/tmladek","followers_url":"https://api.github.com/users/tmladek/followers","following_url":"https://api.github.com/users/tmladek/following{/other_user}","gists_url":"https://api.github.com/users/tmladek/gists{/gist_id}","starred_url":"https://api.github.com/users/tmladek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmladek/subscriptions","organizations_url":"https://api.github.com/users/tmladek/orgs","repos_url":"https://api.github.com/users/tmladek/repos","events_url":"https://api.github.com/users/tmladek/events{/privacy}","received_events_url":"https://api.github.com/users/tmladek/received_events","type":"User","site_admin":false},"created_at":"2015-04-03T18:03:53Z","updated_at":"2015-04-03T18:03:53Z","body":"How would I go about that?"}}