From bf626d68e4b181101062eff7f0ff41c37c263b9e Mon Sep 17 00:00:00 2001 From: DarthArgus Date: Fri, 19 Feb 2016 19:16:07 -0600 Subject: [PATCH] default trap script errors to false as they tend to crash the newer javas at the moment --- .../library/serverGame/src/shared/core/ConfigServerGame.cpp | 2 +- .../server/library/serverScript/src/shared/JavaLibrary.cpp | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/engine/server/library/serverGame/src/shared/core/ConfigServerGame.cpp b/engine/server/library/serverGame/src/shared/core/ConfigServerGame.cpp index 255af0e3..42400ead 100755 --- a/engine/server/library/serverGame/src/shared/core/ConfigServerGame.cpp +++ b/engine/server/library/serverGame/src/shared/core/ConfigServerGame.cpp @@ -67,7 +67,7 @@ void ConfigServerGame::install(void) KEY_BOOL (profileScripts, false); KEY_BOOL (crashOnScriptError, false); KEY_BOOL (compileScripts, false); - KEY_BOOL (trapScriptCrashes, true); + KEY_BOOL (trapScriptCrashes, false); //this seems to horrifyingly crash java 7/8 sometimes if not always KEY_INT (scriptWatcherWarnTime, 5000); KEY_INT (scriptWatcherInterruptTime, 5000); KEY_INT (scriptStackErrorLimit, 35); diff --git a/engine/server/library/serverScript/src/shared/JavaLibrary.cpp b/engine/server/library/serverScript/src/shared/JavaLibrary.cpp index f93d99b6..67e9ee34 100755 --- a/engine/server/library/serverScript/src/shared/JavaLibrary.cpp +++ b/engine/server/library/serverScript/src/shared/JavaLibrary.cpp @@ -1331,7 +1331,6 @@ void JavaLibrary::initializeJavaThread() } ms_loaded = 1; -#if !defined(JNI_VERSION_1_9) && !defined(JNI_VERSION_1_8) && !defined(JNI_VERSION_1_7) && defined(linux) if (ConfigServerGame::getTrapScriptCrashes()) { //set up signal handler for fatals in linux @@ -1340,7 +1339,6 @@ void JavaLibrary::initializeJavaThread() OurSa.sa_flags = 0; IGNORE_RETURN(sigaction(SIGSEGV, &OurSa, &JavaSa)); } -#endif // wait until the main thread tells us to shutdown ms_shutdownJava->wait(); @@ -1349,15 +1347,11 @@ void JavaLibrary::initializeJavaThread() IGNORE_RETURN(ms_jvm->DestroyJavaVM()); ms_jvm = nullptr; -#if !defined(JNI_VERSION_1_9) && !defined(JNI_VERSION_1_8) && !defined(JNI_VERSION_1_7) && defined(linux) if (ConfigServerGame::getTrapScriptCrashes()) { // restore the default signal handler IGNORE_RETURN(sigaction(SIGSEGV, &OrgSa, NULL)); } -#endif - - #if defined(_WIN32) IGNORE_RETURN(FreeLibrary(static_cast(libHandle)));