mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-17 03:25:14 -04:00
For unhandled access violation exception on windows, also include address we were trying to access in crash logs
This commit is contained in:
parent
eb4c9e093b
commit
c2fbfca0d3
@ -1546,7 +1546,7 @@ static void UpdatesScreen_Layout(struct LScreen* s_) {
|
|||||||
LWidget_SetLocation(&s->lblRel, ANCHOR_CENTRE, ANCHOR_CENTRE, -20, -75);
|
LWidget_SetLocation(&s->lblRel, ANCHOR_CENTRE, ANCHOR_CENTRE, -20, -75);
|
||||||
LWidget_SetLocation(&s->btnRel[0], ANCHOR_CENTRE, ANCHOR_CENTRE, -80, -40);
|
LWidget_SetLocation(&s->btnRel[0], ANCHOR_CENTRE, ANCHOR_CENTRE, -80, -40);
|
||||||
|
|
||||||
if (Updater_D3D9)
|
if (Updater_D3D9) {
|
||||||
LWidget_SetLocation(&s->btnRel[1], ANCHOR_CENTRE, ANCHOR_CENTRE, 80, -40);
|
LWidget_SetLocation(&s->btnRel[1], ANCHOR_CENTRE, ANCHOR_CENTRE, 80, -40);
|
||||||
} else {
|
} else {
|
||||||
LWidget_SetLocation(&s->btnRel[1], ANCHOR_CENTRE, ANCHOR_CENTRE, 0, -40);
|
LWidget_SetLocation(&s->btnRel[1], ANCHOR_CENTRE, ANCHOR_CENTRE, 0, -40);
|
||||||
|
14
src/Logger.c
14
src/Logger.c
@ -695,14 +695,26 @@ static LONG WINAPI Logger_UnhandledFilter(struct _EXCEPTION_POINTERS* pInfo) {
|
|||||||
String msg; char msgBuffer[128 + 1];
|
String msg; char msgBuffer[128 + 1];
|
||||||
cc_uint32 code;
|
cc_uint32 code;
|
||||||
cc_uintptr addr;
|
cc_uintptr addr;
|
||||||
|
DWORD i, numArgs;
|
||||||
|
|
||||||
code = (cc_uint32)pInfo->ExceptionRecord->ExceptionCode;
|
code = (cc_uint32)pInfo->ExceptionRecord->ExceptionCode;
|
||||||
addr = (cc_uintptr)pInfo->ExceptionRecord->ExceptionAddress;
|
addr = (cc_uintptr)pInfo->ExceptionRecord->ExceptionAddress;
|
||||||
|
|
||||||
String_InitArray_NT(msg, msgBuffer);
|
String_InitArray_NT(msg, msgBuffer);
|
||||||
String_Format2(&msg, "Unhandled exception 0x%h at 0x%x", &code, &addr);
|
String_Format2(&msg, "Unhandled exception 0x%h at 0x%x", &code, &addr);
|
||||||
msg.buffer[msg.length] = '\0';
|
|
||||||
|
|
||||||
|
numArgs = pInfo->ExceptionRecord->NumberParameters;
|
||||||
|
if (numArgs) {
|
||||||
|
numArgs = min(numArgs, EXCEPTION_MAXIMUM_PARAMETERS);
|
||||||
|
String_AppendConst(&msg, " [");
|
||||||
|
|
||||||
|
for (i = 0; i < numArgs; i++) {
|
||||||
|
String_Format1(&msg, "0x%x,", &pInfo->ExceptionRecord->ExceptionInformation[i]);
|
||||||
|
}
|
||||||
|
String_Append(&msg, ']');
|
||||||
|
}
|
||||||
|
|
||||||
|
msg.buffer[msg.length] = '\0';
|
||||||
Logger_AbortCommon(0, msg.buffer, pInfo->ContextRecord);
|
Logger_AbortCommon(0, msg.buffer, pInfo->ContextRecord);
|
||||||
return EXCEPTION_EXECUTE_HANDLER; /* TODO: different flag */
|
return EXCEPTION_EXECUTE_HANDLER; /* TODO: different flag */
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user