You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that savestates_save_m64p() is further queueing savestates_save_m64p_work(), and yet the callback in savestates_save() happens immediately once savestates_save_m64p() exits, without waiting for the work function to finish.
So if you, say, immediately shut down the core after that callback, it will break.
This only happens with savestates_type_m64p savestates, the pj64 ones are fine, since they aren't async.
And of course since without M64P_PARALLEL there's no work queue and it just calls the function instead, the bug disappears in that case
The simplest solution would be to just do the StateChanged() call in savestates_save_m64p_work(), savestates_save_pj64_zip() or savestates_save_pj64_unc(). (or savestates_save_m64p() too if it exits immediately), instead of savestates_save(). If it's fine, I'll open a PR, not sure if there are implications I'm not aware of.
The text was updated successfully, but these errors were encountered:
The problem is that
savestates_save_m64p()
is further queueingsavestates_save_m64p_work()
, and yet the callback insavestates_save()
happens immediately oncesavestates_save_m64p()
exits, without waiting for the work function to finish.So if you, say, immediately shut down the core after that callback, it will break.
This only happens with
savestates_type_m64p
savestates, the pj64 ones are fine, since they aren't async.And of course since without
M64P_PARALLEL
there's no work queue and it just calls the function instead, the bug disappears in that caseThe simplest solution would be to just do the
StateChanged()
call insavestates_save_m64p_work()
,savestates_save_pj64_zip()
orsavestates_save_pj64_unc()
. (orsavestates_save_m64p()
too if it exits immediately), instead ofsavestates_save()
. If it's fine, I'll open a PR, not sure if there are implications I'm not aware of.The text was updated successfully, but these errors were encountered: