Skip to content

Commit

Permalink
init logs before filesystem (#42), try explictly initializing logmutex?
Browse files Browse the repository at this point in the history
  • Loading branch information
surepy committed Aug 29, 2024
1 parent f50e188 commit ef92fb0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tf2_bot_detector/DLLMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ TF2_BOT_DETECTOR_EXPORT int tf2_bot_detector::RunProgram(int argc, const char**
OutputDebugStringA("Hello from RunProgram (pre-log!)");
#endif
{
IFilesystem::Get().Init();
ILogManager::GetInstance().Init();
IFilesystem::Get().Init();

DebugLog("Hello from RunProgram!");

Expand Down
2 changes: 1 addition & 1 deletion tf2_bot_detector/Log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace
std::filesystem::path m_FileName;
std::optional<std::stringstream> m_TempLogs = std::stringstream(); // Logs before we have been initialized
std::optional<std::ofstream> m_File;
mutable std::recursive_mutex m_LogMutex;
mutable std::recursive_mutex m_LogMutex = std::recursive_mutex(); // crash on #42
std::deque<LogMessage> m_LogMessages;
size_t m_VisibleLogMessagesStart = 0;

Expand Down

0 comments on commit ef92fb0

Please sign in to comment.