Skip to content

Conversation

cipherxof
Copy link
Contributor

@cipherxof cipherxof commented Feb 17, 2025

The emulator was crashing when accessing bb.target[0] of an empty vector. This code previously used std::basic_string which probably just returned some garbage value or zero without throwing an exception.

Addresses: #16715 (and probably #16654)

@elad335 elad335 self-requested a review February 17, 2025 06:18
@elad335
Copy link
Contributor

elad335 commented Feb 17, 2025

Please upload a log with this build.
I have a suspicion as to why it happens.
The bug was there, before #16261, was just hidden because string allows to access the element at size().

@elad335
Copy link
Contributor

elad335 commented Feb 17, 2025

Test with #16723 too

@cipherxof
Copy link
Contributor Author

Test with #16723 too

This PR: RPCS3.log
PR 16723: RPCS3.log (still crashes)

@digant73
Copy link
Contributor

digant73 commented Feb 19, 2025

if you are able to compile RPCS3 in DEBUG mode (I use VS 2022 on Win 11), you should get an out of bound error message when booting a game during the PPU compilation. Probably there are other issues not yet fixed caused by PR #16261 or the following PRs. In the past this issue was not present

@cipherxof
Copy link
Contributor Author

cipherxof commented Feb 19, 2025

if you are able to compile RPCS3 in DEBUG mode (I use VS 2022 on Win 11), you should get an out of bound error message when booting a game during the PPU compilation. Probably there are other issues not yet fixed caused by PR #16261 or the following PRs. In the past this issue was not present

I do not get any errors while compiling PPU modules. It probably only triggers under certain circumstances like with giga spu. I can look for potential areas later, although this PR is likely not fixing the root cause as the previous code with basic_string was masking some underlying issue. Still, it probably makes sense to have some bounds checking.

@digant73
Copy link
Contributor

if you are able to compile RPCS3 in DEBUG mode (I use VS 2022 on Win 11), you should get an out of bound error message when booting a game during the PPU compilation. Probably there are other issues not yet fixed caused by PR #16261 or the following PRs. In the past this issue was not present

I do not get any errors while compiling PPU modules. It probably only triggers under certain circumstances like with giga spu. I can look for potential areas later, although this PR is likely not fixing the root cause as the previous code with basic_string was masking some underlying issue. Still, it probably makes sense to have some bounds checking.

I tested on Resistance 3 and got the error. SPU (on CPU tab) set to Mega. As I said the error is reported with RPCS3 compiled in DEBUG mode. In RELEASE mode there is no popup error displayed.

@elad335 elad335 merged commit 1dc3ebf into RPCS3:master Mar 2, 2025
11 checks passed
@Augusto7743
Copy link

SPU Giga block works ?
I remember an comment from an RPCS3 dev saying SPU Giga mode are broken so I had avoided to use.
SPU Giga mode was fixed ? Giga works without problems with that PR ?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants