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

Fix incorrect error code in equeue #2093

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kalaposfos13
Copy link
Contributor

According to the system library, the out parameter being null should not warrant returning an error code. This fixes LBP3's input handling (and probably games with a similar issue), as it was stuck in a loop due to it thinking the function timed out because of this.

@StevenMiller123
Copy link
Contributor

Unsurprisingly, this breaks The Last of Us Remastered. The game uses equeues to check for trophies, using a while loop that loops until sceKernelWaitEqueue returns an error.
I think you should take a closer look at the current implementation for this function, as it seems like you've misunderstood the purpose of that ETIMEDOUT return. It's there to properly handle cases where no events are triggered during the wait.
shad_log.txt

@kalaposfos13
Copy link
Contributor Author

@GHU7924 In this comment you mentioned that CUSA30992 also has unresponsive controls. Can you test if this PR also solves that issue?

@GHU7924
Copy link

GHU7924 commented Jan 12, 2025

I have created a separate installation folder for this game for your build.
I have separate folders for the game, patch, and DLC.

I decided to proceed in stages, so first I installed version 1.00, it gives an error:

[Debug] memory.cpp:operator():394: Assertion Failed!
Existing mapping does not contain requested unmap range

shad_log.txt

Next, I selected patch 1.08, clicked install, and my emulator closed.
I restarted the emulator and saw that the game was marked as version 1.08, although the patch itself was not installed.
I ran the patch installation again, but it crashed again.
The third time, it also crashed, but on the 4th time, the patch was installed with a message confirming the installation success, I clicked ok and the emulator closed again.
Just in case, I decided to check and install the patch again, but it closed the emulator again, a few attempts later I managed to install the patch with a success message, but after a few seconds the emulator closed.

I started the game, and it crashed, the video didn't have time to start. I've tried it a few times, but it's always the same.

shad_log_2.txt

TMNT2

I decided to proceed in reverse order. I have removed the patch, but I have lost the game from the list. I clicked refresh and the game was displayed again, already version 1.00.
There are no changes, the same error.


Next, I decided to test the Main build (I recently deleted this game, so I had to reinstall it), on version 1.00 there is a similar error, but a little different.

[Debug] memory.cpp:operator():396: Assertion Failed!
Existing mapping does not contain requested unmap range

shad_log_main_100.txt

And I also had problems installing the patch. But when the patch was installed, the game started and the video clip started. The game does not respond to button clicks.

shad_log_main_108.txt

TMNT

P.S. The game was tested on builds shadps4 v0.5.1 WIP equeue-fix 702beff and shadps4 v0.5.1 WIP main 8a309c3 (this can be seen from the screenshots), but I can't tell you where the problems with the emulator come from.

@kalaposfos13
Copy link
Contributor Author

@GHU7924 It seems there has been a change with memory unmapping in the last few days that weren't in this PR yet, that directly address the issue you are seeing here. I updated the PR to include it, can you try again?

@StevenMiller123
Copy link
Contributor

@kalaposfos13 The memory issue they're seeing will still occur on current main builds. That particular issue is fixed in #1822, which isn't merged into main yet.

@GHU7924
Copy link

GHU7924 commented Jan 12, 2025

shadPS4 v0 5 1 WIP equeue-fix cf0e6af _ CUSA30992 - Teenage Mutant Ninja Turtles_ Shredder's Revenge 01 08 Вс, 12 января 2025 г  23_27_38

shad_log.txt

Now everything is as in Main, but there is still no reaction to clicks.

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.

3 participants