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

[BUG]: TAS save state undo issue. #11454

Open
RRX-JP opened this issue Jun 24, 2024 · 12 comments
Open

[BUG]: TAS save state undo issue. #11454

RRX-JP opened this issue Jun 24, 2024 · 12 comments

Comments

@RRX-JP
Copy link

RRX-JP commented Jun 24, 2024

Describe the Bug

If a save state is performed during recording in TAS and the state is loaded,
undoing will corrupt the subsequent recording because of the frame gap that occurs at the timing of loading.

i7 10700K
GTX 1070

Game:SLPM-65719
Burnout 3 - Takedown

Reproduction Steps

  1. Record TAS.
  2. play and Save State.
  3. load Save State. (At this point, UndoCount is set to 1.)
  4. Complete the recording at any time.
  5. play TAS.(Select record file. File generated in 2.)
  6. The gap occurs at the timing of the load state.

Video
https://youtu.be/m1VNQpb81UU

Expected Behavior

No response

PCSX2 Revision

v1.7.5922

Operating System

Windows 11

If Linux - Specify Distro

No response

Logs & Dumps

No response

@RRX-JP RRX-JP added the Bug label Jun 24, 2024
@RRX-JP
Copy link
Author

RRX-JP commented Jun 24, 2024

Apparently not a blank,
It appears that a few frames were not recorded.

if (g_InputRecording.isActive())

I feel there is a problem here.

@sestain
Copy link
Contributor

sestain commented Jun 24, 2024

Can confirm this too from my own testing.

@kage2051
Copy link

Sounds like a data race between GS and EE threads, which this PR should fix: #10793

However, the generated builds for it lack of any fixes for .p2m2 playback (it does nothing after clicking on Tools > Input Recording > Play) so I am unable to properly test these changes.

@F0bes
Copy link
Member

F0bes commented Jun 27, 2024

Sounds like a data race between GS and EE threads, which this PR should fix: #10793

However, the generated builds for it lack of any fixes for .p2m2 playback (it does nothing after clicking on Tools > Input Recording > Play) so I am unable to properly test these changes.

I've rebased that PR. Once it builds you should be able to test it with the latest master changes.

@kage2051
Copy link

Looks like the PR does not fix the issue. The RNG in most titles seems to be really inconsistent between states.

@RRX-JP
Copy link
Author

RRX-JP commented Jun 27, 2024

test from 1.7.5936
If you can give me some hints.
Load state and when it is rewritten.
I deleted the front 2 frames (+18h+18h) and it improved.

image
Blue: Record before load state.
Black: Deleted from the record before the load state.
Pink: overwritten by load state.

@kage2051
Copy link

I should also mention emulation pausing also causes the frame dropping/removal in the recording file.

@RRX-JP
Copy link
Author

RRX-JP commented Jun 27, 2024

I should also mention emulation pausing also causes the frame dropping/removal in the recording file.

Yeah.
I confirmed it about 3 minutes ago.

@kage2051
Copy link

test from 1.7.5936 If you can give me some hints. Load state and when it is rewritten. I deleted the front 2 frames (+18h+18h) and it improved.

image Blue: Record before load state. Black: Deleted from the record before the load state. Pink: overwritten by load state.

How can I determine which frames are fine and which are not because of a state load?

@RRX-JP
Copy link
Author

RRX-JP commented Jun 29, 2024

test from 1.7.5936 If you can give me some hints. Load state and when it is rewritten. I deleted the front 2 frames (+18h+18h) and it improved.
image Blue: Record before load state. Black: Deleted from the record before the load state. Pink: overwritten by load state.

How can I determine which frames are fine and which are not because of a state load?

Perform a save state while holding down any key, and perform a load state with no key pressed.

@RRX-JP
Copy link
Author

RRX-JP commented Sep 19, 2024

@kage2051
Copy link

Real cause of the issue: #11607 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants