mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 18:53:28 +01:00
Savestates: Fix crash when savestating before PPU/SPU compilation finishes
Unintentional concurrent access to m_ar ptr itself.
This commit is contained in:
parent
24fddf1ded
commit
4e3d58f75a
@ -1974,10 +1974,11 @@ void Emulator::FixGuestTime()
|
||||
initialize_timebased_time(m_ar->operator u64());
|
||||
|
||||
g_cfg.savestate.state_inspection_mode.set(m_state_inspection_savestate);
|
||||
m_ar.reset();
|
||||
|
||||
CallFromMainThread([this]
|
||||
{
|
||||
m_ar.reset();
|
||||
|
||||
g_tls_log_prefix = []()
|
||||
{
|
||||
return std::string();
|
||||
@ -2265,13 +2266,6 @@ void Emulator::Kill(bool allow_autoexit, bool savestate)
|
||||
}
|
||||
}
|
||||
|
||||
m_ar.reset();
|
||||
|
||||
if (savestate)
|
||||
{
|
||||
m_ar = std::make_unique<utils::serial>();
|
||||
}
|
||||
|
||||
named_thread stop_watchdog("Stop Watchdog", [&]()
|
||||
{
|
||||
for (uint i = 0; thread_ctrl::state() != thread_state::aborting;)
|
||||
@ -2357,6 +2351,8 @@ void Emulator::Kill(bool allow_autoexit, bool savestate)
|
||||
|
||||
if (savestate)
|
||||
{
|
||||
m_ar = std::make_unique<utils::serial>();
|
||||
|
||||
// Savestate thread
|
||||
named_thread emu_state_cap_thread("Emu State Capture Thread", [&]()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user