mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-09 15:28:21 -04:00
Change crash message if possibly due to a third party plugin
This commit is contained in:
parent
273f249ec4
commit
7c5229096f
@ -38,7 +38,7 @@ include $(DEVKITPRO)/libnx/switch_rules
|
|||||||
# NACP building is skipped as well.
|
# NACP building is skipped as well.
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
TARGET := ClassiCube-switch
|
TARGET := ClassiCube-switch
|
||||||
BUILD := build/switch
|
BUILD := build-switch
|
||||||
SOURCES := src misc/switch third_party/bearssl/src
|
SOURCES := src misc/switch third_party/bearssl/src
|
||||||
DATA := data
|
DATA := data
|
||||||
INCLUDES := third_party/bearssl/inc
|
INCLUDES := third_party/bearssl/inc
|
||||||
|
14
src/Logger.c
14
src/Logger.c
@ -52,9 +52,10 @@
|
|||||||
/* Need this to detect macOS < 10.4, and switch to NS* api instead if so */
|
/* Need this to detect macOS < 10.4, and switch to NS* api instead if so */
|
||||||
#include <AvailabilityMacros.h>
|
#include <AvailabilityMacros.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Only show up to 50 frames in backtrace */
|
/* Only show up to 50 frames in backtrace */
|
||||||
#define MAX_BACKTRACE_FRAMES 50
|
#define MAX_BACKTRACE_FRAMES 50
|
||||||
|
static cc_bool cefCrash;
|
||||||
|
|
||||||
/*########################################################################################################################*
|
/*########################################################################################################################*
|
||||||
*----------------------------------------------------------Warning--------------------------------------------------------*
|
*----------------------------------------------------------Warning--------------------------------------------------------*
|
||||||
@ -212,6 +213,9 @@ static void PrintFrame(cc_string* str, cc_uintptr addr,
|
|||||||
} else {
|
} else {
|
||||||
String_AppendConst(str, _NL);
|
String_AppendConst(str, _NL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Check if crash is most likely caused by third party plugins */
|
||||||
|
cefCrash |= String_ContainsConst(&module, "classicube_cef");
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined CC_BUILD_UWP
|
#if defined CC_BUILD_UWP
|
||||||
@ -1209,8 +1213,12 @@ void Logger_DoAbort(cc_result result, const char* raw_msg, void* ctx) {
|
|||||||
LogCrashHeader();
|
LogCrashHeader();
|
||||||
Logger_Log(&msg);
|
Logger_Log(&msg);
|
||||||
|
|
||||||
String_AppendConst(&msg, "Full details of the crash have been logged to 'client.log'.\n");
|
String_AppendConst(&msg, "Full details of the crash have been logged to 'client.log'.\n\n");
|
||||||
String_AppendConst(&msg, "Please report this on the ClassiCube forums or Discord.\n\n");
|
if (cefCrash) {
|
||||||
|
String_AppendConst(&msg, "The crash may have been caused by the CEF plugin.\nYou may want to try completely reinstalling it.\n\n");
|
||||||
|
} else {
|
||||||
|
String_AppendConst(&msg, "Please report this on the ClassiCube forums or Discord.\n\n");
|
||||||
|
}
|
||||||
if (ctx) DumpRegisters(ctx);
|
if (ctx) DumpRegisters(ctx);
|
||||||
|
|
||||||
/* These two function calls used to be in a separate DumpBacktrace function */
|
/* These two function calls used to be in a separate DumpBacktrace function */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user