-
Notifications
You must be signed in to change notification settings - Fork 28
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 crashes when closing host before RemotePlay #3
Comments
Hi, I'm testing the latest commit of PS4Macro right now (which uses the latest version of the interceptor) and I don't have the problems you mentioned. I tested both with and without controllers and on both InjectionMode (auto and compatibility). The only known problem I can think of is this error message from EasyHook: This error has been in the interceptor since the first version, but as far as I know, this error occurs when you're executing the injection from different paths (or exe file) on the same instance of RemotePlay (which is why restarting it fixes the problem). The issue on EasyHook's bountysource has just been resolved recently but it doesn't seems to help much, I'll have to look more into it. Not sure if this is the error you saw or not, but if you can note the error message and send it to me that would be great. Thanks! |
Okay strange, I do not use the PS4Macro I just use the newest PS4RemotePlayInterceptor. My application is slightly different then yours but I never got the
If you just download the PS4RemotePlayInterceptor and run the PS4RemotePlayInterceptorConsole app and you close it after you successfully injected the controller emulation part what happens on your PC? |
That is strange indeed. I tried running the console demo app. Tried both closing it by pressing any key and force closing it. When I tried to inject again (and again) it still works correctly. What are your results from running the console app? |
Things I did.
Results are:
I did not modify your Source code. In my application I can successfully dispose the hook but as soon as this happens the PS4 RemotePlay program crashes and I guess it is because of the _dummyHandle gets destroyed. I've made a video which you can watch at |
Thanks a lot for the video. However, I tried to to replicate your results but I could not make PS4 RemotePlay a zombie process like it did in your video. As you said, it might be possible that remote play thinks that the handle is still active and waiting for the I/O close. Perhaps there are native function calls to something like CloseHandle that needs to be intercept. I'll try to find a way to trigger this problem (maybe on other machines). Please let me know if you have any updates on this issue. PS. I fixed the crashing issue by surrounding every hook with try/catch block. This might fix the crashes in your application. |
No problem, I will try to use another PC to reproduce the issue but as I can reproduce the problem on my laptop every time it might also occur on other PCs as well. Yes, you are right, I was already playing around with the CloseHandle function and I have already intercepted it. But so far I could not made any progress. By the way the the program API Monitor v2 helps me a lot to figure out what is going on under the hood of the PS4RemotePlay program. Let me know what are your results on other machines.
Yes, I saw this but unfortunately it it did not have any effect. |
I tried it now on two other PCs. |
Thanks again for the results! Right now I don't have access to other PCs (except for my macbook). I'll let you know the results when I have a chance to test it. Hopefully it will trigger the zombie process so that I can inspect it in details. |
Hi, can i get example code for press X button 1 time, and hold X button for 5s? |
@hapile299 Press(new DualShockState() { Cross = true }); Holding X for 5 seconds Press(new DualShockState() { Cross = true }, 5000); |
@Tustin |
Hello, has this problem been solved? |
Hi,
I'm currently try to fix the problem that the RemotePlay program crashes when you exit the Intercepting program. I read that you solved the problem but I checked and it seems that the RemotePlay program is not crashing anymore but the hooks get not disposed correctly. This leads to the effect that you can't hook into the running RemotePlay application again until you restart it which is far from ideal.
Nevertheless, the problem is the _dummyHandle which gets passed to the RemotePlay process I guess. Because when you look at the RemotePlay program, it still believes that a Dualshock gamepad is connected. The _dummyHandle is just a virtual Hid device which does not really exists but I guess we should somehow make the RemotePlay process believe that it is disconnected now. I found now solution so far and I don't now if it is possible anyway.
The text was updated successfully, but these errors were encountered: