-
-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
SCRCPY Crashing Sometimes When the Screen is Rotated #3693
Comments
Thank you for your report. This is a codec error. When this happens, scrcpy should try to recover (it is not implemented yet, I added it to my TODOlist):
|
I refactored some code and attempted to recover on non-fatal errors: branch Here are binaries (to replace in your 1.25 release):
|
Thank you. I have not gotten the error on general use yet so I feel it is working. |
When there is a recovered error, there should be a line |
Back then I didn't see such output, but now I do get the error and it terminates the server subsequently.
Sometimes it would crash after I'd try to close an app that was in landscape mode (my launcher does not support landscape mode) and sometimes it would crash when I try to rotate an app; however if I had requested landscape mode or portrait mode and then it crashed, if I then restart the server, it retains the requested mode. To update the binaries, I deleted the previous ones, moved the new ones and renamed |
It seems that it almost only happens when it tries to switch from landscape to portrait. I have tried and received this several times now, and I think each time it was this case. |
OK, so the error is neither "recoverable" nor "transient" 😕 In that case, I will need an additional retry mechanism even if the error is not recoverable. I'll let you know. |
Here is a new version: branch Here are the binaries to replace in your 1.25 release:
|
Cloning the branch then compiling it on Kubuntu is giving out these errors, but if I compile the master branch it works as expected. I did
This is the output with the current master branch (
is this branch only meant to be used on Windows? I am sorry but I moved to Linux yesterday. |
Because Either you need to compile the server too, or take the prebuilt You can specify a prebuilt server by following these steps. |
It works fine now. Thank you so much. |
Thank you for your tests. Merged into |
Environment
Describing the Bug
Sometimes when I try to rotate the screen using
MOD + R
, SCRCPY crashes with an exception but when I restart the server the screen rotation is as I'd expect after triggering the hotkey.The following terminal output is the result of me rotating the screen several times on the same app and on the same app activity screen. I did find an open issue (#1700) also addressing server crashes sometimes when the screen is rotated, but that error is slightly different, the observer was emulating some device virtually (which may have contained unfinished encoders and decoders to enhance the performance), and collaborator's reply was that the device does not support quick encoding or something which causes the errors but in my case it happens even when I wouldn't rotate screen for several minutes before the error-causing attempt to rotate the screen.
If this isn't something that could be prevented by configurations or modifications of the code, is there some way to auto reconnect the device on error?
The text was updated successfully, but these errors were encountered: