Boost Thread Access Violation in Boost Log on shutdown

两盒软妹~` 提交于 2019-12-05 15:29:17

This problem might be with locale object set by the boost system. Similarly in your case this locale might be getting destroyed before Boost.Log is deinitialized, which results in a crash.

As per boost docs particularly log file rotation module. They have provided a workaround for similar case Boost known issues

Solution would be to initialize locale in main loop so that boost will have enough cycles to make cleanup at the end.

int main(int argc, char* argv[])
{
    boost::filesystem::path::imbue(std::locale("C"));
    initialize_log();

    // ...
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!