[*] Fix deadlock on enter, when dispatching the command results in a grug handler being executed, followed by a deadlock during flush

[*] also wtf is this
This commit is contained in:
Reece Wilson 2024-03-09 08:15:30 +00:00
parent c935b892c7
commit 3c4cece69d
2 changed files with 48 additions and 41 deletions

View File

@ -710,6 +710,9 @@ namespace Aurora::Console::ConsoleTTY
}
void TTYConsole::NoncanonicalOnEnter()
{
AuString line;
{
AU_LOCK_GUARD(this->historyLock->AsWritable());
@ -756,7 +759,7 @@ namespace Aurora::Console::ConsoleTTY
AuLogInfo("ConsoleTTY: use the command !t to scroll to the top, the command !b to lock-scroll to the bottom.");
}
AuConsole::DispatchRawLine(this->inputField.inputField);
line = this->inputField.inputField;
}
AuTryInsert(this->history, this->inputField.inputField);
@ -767,6 +770,9 @@ namespace Aurora::Console::ConsoleTTY
OnEnter();
}
AuConsole::DispatchRawLine(line);
}
void TTYConsole::NoncanonicalOnMenuLeft()
{

View File

@ -222,8 +222,9 @@ namespace Aurora::Debug
StackTrace ret;
EXCEPTION_RECORD ex {};
if (!bNoExit)
if (fatal && !bNoExit)
{
// TODO: why? remove?
if (!AuExchange(forceFail, true))
{
Exit::PostLevel(AuThreads::GetThread(), Exit::ETriggerLevel::eFatalException);