mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-23 15:40:34 +00: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());
|
initialize_timebased_time(m_ar->operator u64());
|
||||||
|
|
||||||
g_cfg.savestate.state_inspection_mode.set(m_state_inspection_savestate);
|
g_cfg.savestate.state_inspection_mode.set(m_state_inspection_savestate);
|
||||||
m_ar.reset();
|
|
||||||
|
|
||||||
CallFromMainThread([this]
|
CallFromMainThread([this]
|
||||||
{
|
{
|
||||||
|
m_ar.reset();
|
||||||
|
|
||||||
g_tls_log_prefix = []()
|
g_tls_log_prefix = []()
|
||||||
{
|
{
|
||||||
return std::string();
|
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", [&]()
|
named_thread stop_watchdog("Stop Watchdog", [&]()
|
||||||
{
|
{
|
||||||
for (uint i = 0; thread_ctrl::state() != thread_state::aborting;)
|
for (uint i = 0; thread_ctrl::state() != thread_state::aborting;)
|
||||||
@ -2357,6 +2351,8 @@ void Emulator::Kill(bool allow_autoexit, bool savestate)
|
|||||||
|
|
||||||
if (savestate)
|
if (savestate)
|
||||||
{
|
{
|
||||||
|
m_ar = std::make_unique<utils::serial>();
|
||||||
|
|
||||||
// Savestate thread
|
// Savestate thread
|
||||||
named_thread emu_state_cap_thread("Emu State Capture Thread", [&]()
|
named_thread emu_state_cap_thread("Emu State Capture Thread", [&]()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user