FIX: flush logs on crash
Change-Id: Ifc3a9c087dfe4d437b658e305db6f986fa181fab
This commit is contained in:
parent
fefd13a4ac
commit
8bc3a6df30
|
@ -8,6 +8,9 @@
|
||||||
#include <boost/filesystem/operations.hpp>
|
#include <boost/filesystem/operations.hpp>
|
||||||
#include <boost/log/trivial.hpp>
|
#include <boost/log/trivial.hpp>
|
||||||
#include <boost/format.hpp>
|
#include <boost/format.hpp>
|
||||||
|
#define slic3r_Semver_hpp_
|
||||||
|
#define _libslic3r_h_
|
||||||
|
#include <libslic3r/Utils.hpp>
|
||||||
|
|
||||||
static std::string g_log_folder;
|
static std::string g_log_folder;
|
||||||
static std::atomic<int> g_crash_log_count = 0;
|
static std::atomic<int> g_crash_log_count = 0;
|
||||||
|
@ -254,6 +257,7 @@ LONG WINAPI CBaseException::UnhandledExceptionFilter(PEXCEPTION_POINTERS pExcept
|
||||||
//BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << boost::format(": got an ExceptionCode %1%, skip it!") % pExceptionInfo->ExceptionRecord->ExceptionCode;
|
//BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << boost::format(": got an ExceptionCode %1%, skip it!") % pExceptionInfo->ExceptionRecord->ExceptionCode;
|
||||||
return EXCEPTION_CONTINUE_SEARCH;
|
return EXCEPTION_CONTINUE_SEARCH;
|
||||||
}
|
}
|
||||||
|
Slic3r::flush_logs();
|
||||||
g_dump_mutex.lock();
|
g_dump_mutex.lock();
|
||||||
CBaseException base(GetCurrentProcess(), GetCurrentProcessId(), NULL, pExceptionInfo);
|
CBaseException base(GetCurrentProcess(), GetCurrentProcessId(), NULL, pExceptionInfo);
|
||||||
base.ShowExceptionInformation();
|
base.ShowExceptionInformation();
|
||||||
|
|
Loading…
Reference in New Issue