id summary reporter owner description type status milestone component version severity resolution keywords cc 11963 "Boost function ""boost::property_tree::ini_parser::read_ini"" causing ""EXC_BAD_ACCESS (code=EXC_I386_GPFLT)""" giovacchini.andrea@… Sebastian Redl "I have a simple source like this that build and executes correctly under Windows 10 with Visual Studio 2015 but throws ""EXC_BAD_ACCESS (code=EXC_I386_GPFLT)"" under OsX 10.11.3 with Xcode 7.2.1: {{{ #include #include #include #include using namespace std; int main(int argc, char* argv[]) { if (argc != 3) { std::cerr << ""Usage: program rootPath iniFileName"" << std::endl ; return 1; } string mainPath(argv[1]) ; string iniFileName(argv[2]) ; boost::property_tree::ptree pt; try { boost::property_tree::ini_parser::read_ini(mainPath + iniFileName, pt); } catch(const boost::property_tree::ptree_error &e) { cout << e.what() << endl; } return 0; } }}} This is the stack trace: Thread 1Queue : com.apple.main-thread (serial) #0 0x00000001000a10c0 in std::__1::basic_streambuf >::pubimbue(std::__1::locale const&) [inlined] at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/streambuf:227 #1 0x00000001000a10c0 in std::__1::basic_ios >::imbue(std::__1::locale const&) [inlined] at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:717 #2 0x00000001000a100b in void boost::property_tree::ini_parser::read_ini, std::__1::allocator >, std::__1::basic_string, std::__1::allocator >, std::__1::less, std::__1::allocator > > > >(std::__1::basic_string, std::__1::allocator > const&, boost::property_tree::basic_ptree, std::__1::allocator >, std::__1::basic_string, std::__1::allocator >, std::__1::less, std::__1::allocator > > >&, std::__1::locale const&) at /Users/andreagiovacchini/Documents/Sviluppo/boost_1_60_0/boost/property_tree/ini_parser.hpp:167 #3 0x0000000100124a36 in main at /Users/andreagiovacchini/Documents/Sviluppo/Test/Test/main.cpp:21 #4 0x00007fff857245ad in start () Problem comes from ""stream.imbue(loc);"" line in ini_parser.php from this function: {{{ template void read_ini(const std::string &filename, Ptree &pt, const std::locale &loc = std::locale()) { std::basic_ifstream stream(filename.c_str()); if (!stream) BOOST_PROPERTY_TREE_THROW(ini_parser_error( ""cannot open file"", filename, 0)); stream.imbue(loc); try { read_ini(stream, pt); } catch (ini_parser_error &e) { BOOST_PROPERTY_TREE_THROW(ini_parser_error( e.message(), filename, e.line())); } } }}} Since I can't see how my code can generate this kind of problem I think it is a Boost bug Andrea " Bugs new To Be Determined property_tree Boost 1.60.0 Problem