gabime/spdlog

When the initialize_logger function is called, a crash occurs in the function while accessing the member variable logger_map_mutex_

Closed this issue · 1 comments

I encountered a strange bug that I can't quite figure out. I used the splog::rotating_logger_mt interface to create a logger object, and after successfully creating it, I assigned it to a global smart pointer for management. When I compile the plugin using VS2019, it can be called and executed normally by the project program. However, if I compile the plugin using VS2022, no matter whether the project program is compiled with VS2019 or VS2022, the program execution will always result in the following dump.

Image

tt4g commented

May be duplicate #3145 (comment) (microsoft/STL#4730)

This is caused by a difference in the versions of Visual Studio IDE and Visual Studio Runtime. If the runtime version is old, install the new version.

See also windows - First std::mutex::lock() crashes in application built with latest Visual Studio 2022 - Stack Overflow