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

GSDumpFile::ReadFile prealloc #12012

Closed
wants to merge 6 commits into from

Conversation

JustinBraben
Copy link

Description of Changes

  • Pre-allocate m_packet_data.
  • Removes one-off #define's for GET_BYTE and GET_WORD

Rationale behind Changes

  • Work towards fixing the former TODO:.
  • Cleans up one-off #define's

Suggested Testing Steps

  • Ensure GSDumpFile::ReadFile still works, can add some test code for it.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting a contribution to PCSX2

As this is your first pull request, please be aware of the contributing guidelines.

Additionally, as per recent changes in GitHub Actions, your pull request will need to be approved by a maintainer before GitHub Actions can run against it. You can find more information about this change here.

Please be patient until this happens. In the meantime if you'd like to confirm the builds are passing, you have the option of opening a PR on your own fork, just make sure your fork's master branch is up to date!

@JordanTheToaster
Copy link
Member

Crashes when playing back this dump.

Dump Crash.zip

@JustinBraben
Copy link
Author

Crashes when playing back this dump.

Dump Crash.zip

Thanks for trying it, will take another look at it in the next few days.

@JustinBraben
Copy link
Author

This is all pretty new to me, so some direction/explanation would be appreciated.

I built the pcsx2-gsrunner, and ran this command against it

.\pcsx2-gsrunner\test_run_dumps.py -runner .\bin\pcsx2-gsrunner.exe -dumpdir build\DumpBaseline -gsdir build\DumpCrash -renderer auto

It ran the GSDump from the previous comment on my computer and output an emulog.txt. It states my computer specs, then says Reading File for the supplied GSDump file. It does successfully change to the correct disc. It runs through emulator commands but I don't see a crash on my end. Have a few questions:

  • Is this the correct thing to do with that GSDump file? If not how do I test these out?
  • @JordanTheToaster what OS and Rendering backend did you use to get the crash?

My output emulog: output_emulog.zip

@F0bes
Copy link
Member

F0bes commented Nov 28, 2024

This isn't going to work. You're querying the current file offset and size as if you are reading them as raw binary data, but that isn't the case. You're modifying the reader which might be reading compressed data.

The crash JordanTheToaster is getting is due to the fact that file_size and current_pos are equal because we've already read through the entire compressed file.
image

@F0bes
Copy link
Member

F0bes commented Nov 28, 2024

Also, you can just drag and drop the GS dumps on to the PCSX2 Qt interface to test if it works or not.

@JustinBraben
Copy link
Author

Right, I'll take this back to the drawing board then. Thanks for the help!

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

Successfully merging this pull request may close these issues.

4 participants