Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix crash dialog dismiss behavior #2360

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions SystemInformer/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -732,12 +732,12 @@ ULONG CALLBACK PhpUnhandledExceptionCallback(
TASKDIALOGCONFIG config = { sizeof(TASKDIALOGCONFIG) };
TASKDIALOG_BUTTON buttons[6] =
{
{ 1, L"Full\nA complete dump of the process, rarely needed most of the time." },
{ 2, L"Normal\nFor most purposes, this dump file is the most useful." },
{ 3, L"Minimal\nA very limited dump with limited data." },
{ 4, L"Restart\nRestart the application." }, // and hope it doesn't crash again.";
{ 5, L"Ignore" }, // \nTry ignore the exception and continue.";
{ 6, L"Exit" }, // \nTerminate the program.";
{ 101, L"Full\nA complete dump of the process, rarely needed most of the time." },
{ 102, L"Normal\nFor most purposes, this dump file is the most useful." },
{ 103, L"Minimal\nA very limited dump with limited data." },
{ 104, L"Restart\nRestart the application." }, // and hope it doesn't crash again.";
{ 105, L"Ignore" }, // \nTry ignore the exception and continue.";
{ 106, L"Exit" }, // \nTerminate the program.";
};

if (NT_NTWIN32(ExceptionInfo->ExceptionRecord->ExceptionCode))
Expand All @@ -757,7 +757,7 @@ ULONG CALLBACK PhpUnhandledExceptionCallback(
config.pszMainInstruction = L"System Informer has crashed :(";
config.cButtons = RTL_NUMBER_OF(buttons);
config.pButtons = buttons;
config.nDefaultButton = 6;
config.nDefaultButton = 106;
config.cxWidth = 250;
config.pszContent = PhGetString(message);
#ifdef DEBUG
Expand All @@ -768,16 +768,16 @@ ULONG CALLBACK PhpUnhandledExceptionCallback(
{
switch (result)
{
case 1:
case 101:
PhpCreateUnhandledExceptionCrashDump(ExceptionInfo, PhTriageDumpTypeFull);
break;
case 2:
case 102:
PhpCreateUnhandledExceptionCrashDump(ExceptionInfo, PhTriageDumpTypeNormal);
break;
case 3:
case 103:
PhpCreateUnhandledExceptionCrashDump(ExceptionInfo, PhTriageDumpTypeMinimal);
break;
case 4:
case 104:
{
PhShellProcessHacker(
NULL,
Expand All @@ -790,7 +790,7 @@ ULONG CALLBACK PhpUnhandledExceptionCallback(
);
}
break;
case 5:
case 105:
{
return EXCEPTION_CONTINUE_EXECUTION;
}
Expand All @@ -806,7 +806,7 @@ ULONG CALLBACK PhpUnhandledExceptionCallback(
L"Do you want to create a minidump on the Desktop?"
) == IDYES)
{
PhpCreateUnhandledExceptionCrashDump(ExceptionInfo, FALSE);
PhpCreateUnhandledExceptionCrashDump(ExceptionInfo, PhTriageDumpTypeMinimal);
}
}
}
Expand Down
Loading