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

Fixups #7734

Merged
merged 2 commits into from
Mar 8, 2020
Merged

Fixups #7734

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions rpcs3/Emu/CPU/CPUThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ void cpu_thread::operator()()
if (!g_cpu_array_sema.try_inc(sizeof(g_cpu_array_bits) * 8))
{
sys_log.fatal("Too many threads.");
Emu.Pause();
return;
}

Expand Down Expand Up @@ -389,7 +388,6 @@ void cpu_thread::operator()()
}
catch (const std::exception& e)
{
Emu.Pause();
sys_log.fatal("%s thrown: %s", typeid(e).name(), e.what());
sys_log.notice("\n%s", dump());
break;
Expand Down
2 changes: 0 additions & 2 deletions rpcs3/Emu/Cell/SPURecompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,6 @@ void spu_recompiler_base::dispatch(spu_thread& spu, void*, u8* rip)
if (!func)
{
spu_log.fatal("[0x%05x] Compilation failed.", spu.pc);
Emu.Pause();
return;
}

Expand Down Expand Up @@ -1181,7 +1180,6 @@ void spu_recompiler_base::old_interpreter(spu_thread& spu, void* ls, u8* rip) tr
}
catch (const std::exception& e)
{
Emu.Pause();
spu_log.fatal("%s thrown: %s", typeid(e).name(), e.what());
spu_log.notice("\n%s", spu.dump());
}
Expand Down
2 changes: 1 addition & 1 deletion rpcs3/Emu/Cell/lv2/sys_fs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,7 @@ error_code sys_fs_fcntl(ppu_thread& ppu, u32 fd, u32 op, vm::ptr<void> _arg, u32
}
}

sys_fs.fatal("sys_fs_fcntl(): Unknown operation 0x%08x (fd=%d, arg=*0x%x, size=0x%x)", op, fd, _arg, _size);
sys_fs.error("sys_fs_fcntl(): Unknown operation 0x%08x (fd=%d, arg=*0x%x, size=0x%x)", op, fd, _arg, _size);
return CELL_OK;
}

Expand Down
1 change: 0 additions & 1 deletion rpcs3/Emu/RSX/Capture/rsx_replay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ namespace rsx
catch (const std::exception& e)
{
rsx_log.fatal("%s thrown: %s", typeid(e).name(), e.what());
Emu.Pause();
}
}
}
1 change: 0 additions & 1 deletion rpcs3/Emu/RSX/RSXThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,6 @@ namespace rsx
catch (const std::exception& e)
{
rsx_log.fatal("%s thrown: %s", typeid(e).name(), e.what());
Emu.Pause();
}

on_exit();
Expand Down
17 changes: 9 additions & 8 deletions rpcs3/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,14 @@ extern char **environ;
{
const bool local = s_qt_init.try_lock();

// Possibly created and assigned here
QScopedPointer<QCoreApplication> app;

if (local)
{
static int argc = 1;
static char arg1[] = {"ERROR"};
static char* argv[] = {arg1};
static QApplication app0{argc, argv};
static char* argv[] = {+s_argv0};
app.reset(new QApplication{argc, argv});
}

if (!local)
Expand All @@ -94,7 +96,6 @@ extern char **environ;
.arg(tr("Please, don't send incorrect reports. Thanks for understanding.")));
msg.layout()->setSizeConstraint(QLayout::SetFixedSize);
msg.exec();
std::exit(0);
};

#ifdef __APPLE__
Expand All @@ -109,7 +110,10 @@ extern char **environ;
// If Qt is already initialized, spawn a new RPCS3 process with an --error argument
if (local)
{
// Since we only show an error, we can hope for a graceful exit
show_report(text);
app.reset();
std::exit(0);
}
else
{
Expand Down Expand Up @@ -139,10 +143,7 @@ extern char **environ;
}
}

while (true)
{
std::this_thread::sleep_for(1s);
}
std::abort();
}

struct pause_on_fatal final : logs::listener
Expand Down