summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-11-30 11:10:28 +0100
committerMattes D <github@xoft.cz>2014-11-30 11:10:28 +0100
commitd8e6931fe69a337d35fd7ee6cd9febe6d6d73d77 (patch)
tree62f795395e2b5fa42922b784e7da85b6de122eb5 /src/main.cpp
parentMerge pull request #1622 from M10360/master (diff)
parentFixed MCADefrag compilation. (diff)
downloadcuberite-d8e6931fe69a337d35fd7ee6cd9febe6d6d73d77.tar
cuberite-d8e6931fe69a337d35fd7ee6cd9febe6d6d73d77.tar.gz
cuberite-d8e6931fe69a337d35fd7ee6cd9febe6d6d73d77.tar.bz2
cuberite-d8e6931fe69a337d35fd7ee6cd9febe6d6d73d77.tar.lz
cuberite-d8e6931fe69a337d35fd7ee6cd9febe6d6d73d77.tar.xz
cuberite-d8e6931fe69a337d35fd7ee6cd9febe6d6d73d77.tar.zst
cuberite-d8e6931fe69a337d35fd7ee6cd9febe6d6d73d77.zip
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index c60e13a8c..fe4b360a5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -61,6 +61,7 @@ void NonCtrlHandler(int a_Signal)
std::signal(SIGSEGV, SIG_DFL);
LOGERROR(" D: | MCServer has encountered an error and needs to close");
LOGERROR("Details | SIGSEGV: Segmentation fault");
+ PrintStackTrace();
abort();
}
case SIGABRT:
@@ -71,6 +72,7 @@ void NonCtrlHandler(int a_Signal)
std::signal(a_Signal, SIG_DFL);
LOGERROR(" D: | MCServer has encountered an error and needs to close");
LOGERROR("Details | SIGABRT: Server self-terminated due to an internal fault");
+ PrintStackTrace();
abort();
}
case SIGINT:
@@ -137,6 +139,9 @@ LONG WINAPI LastChanceExceptionFilter(__in struct _EXCEPTION_POINTERS * a_Except
g_WriteMiniDump(GetCurrentProcess(), GetCurrentProcessId(), dumpFile, g_DumpFlags, (a_ExceptionInfo) ? &ExcInformation : nullptr, nullptr, nullptr);
CloseHandle(dumpFile);
+ // Print the stack trace for the basic debugging:
+ PrintStackTrace();
+
// Revert to old stack:
_asm
{