id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 11662,Parse Json,KigKrazy@…,Sebastian Redl,"use Boost to Parse Json on linux! when I use it with multithreading ,the Program crash!! my code: json_test.h {{{ #ifndef UNIT_JSON_BUGTEST_H #define UNIT_JSON_BUGTEST_H #include #include #include #include #include #include using namespace boost; using namespace boost::property_tree; using namespace std; #define JSON_BUG ""{\""onlineUser\"":[{\""username\"":\""131898@QQ.COM\"",\""framedipaddress\"":\""10.10.1.3\""},{\""username\"":\""a258055085@163.com\"",\""framedipaddress\"":\""10.10.1.4\""},{\""username\"":\""77476848@QQ.COM\"",\""framedipaddress\"":\""10.10.1.5\""},{\""username\"":\""tyws0001@163.com\"",\""framedipaddress\"":\""10.10.1.10\""},{\""username\"":\""zbr7066895@163.com\"",\""framedipaddress\"":\""10.10.1.9\""},{\""username\"":\""1733064835@qq.com\"",\""framedipaddress\"":\""10.10.1.12\""}]}"" typedef multimap onlineuser_map; onlineuser_map get_online_user_map(const string strJson); void unit_json_bugtest_main(); #endif }}} json_test.cpp {{{ #include ""unit_json_bugtest.h"" onlineuser_map get_online_user_map(const string strJson) { onlineuser_map mymap; // cout << strJson << endl; stringstream ssJson(strJson); ptree pt; try{ read_json(ssJson, pt); } catch(...) { cout << ""read json string error"" <(""username""), ptChild.get(""framedipaddress""))); } } catch(...) { mymap.clear(); cout << ""read json string error"" <