-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
Native crash in app_process : signal 11 (SIGSEGV) on Pixel Fold Android 14 #4624
Comments
Are you sure this backtrace appears with scrcpy v2.3.1 (i.e. that it was not generated from a version earlier than v2.2)? It should not crash that way since v2.2, see discussion: #4456 (comment) Clean your logs ( |
Hi @rom1v, thanks for responding! I checkend again and the version is indeed 2.3.1. I just rebuilt it:
In the issue that you linked the problem seems slightly different (not being able to turn off the display). In my case I can use scrcpy just fine for how long as I need. The problem appears after I disconnect it. |
|
The issue, yes, but the comment I pointed to is exactly your problem: a native crash on cleanup (when scrcpy disconnects). However, in my case, it had no other impact than this stacktrace in logcat.
My bad, I checked the wrong commit. The fix is 1beec99, which is only on |
Thanks! When is the fix planned to be merged to main? |
Probably when #4473 is complete (it might take some time). Meanwhile, you can build the |
I updated to |
Trying to pull relevant logs from the logcat. I'm trying to avoid uploading it here to not leak any private data. Let me know what may help investigate this.
|
OK the the reboot was probably not directly related to this native crash. Please test |
Issue does not reproduce with |
OK, then another test:
Does the device reboot few minutes later? |
Issue is reproducible with the above steps. |
Probably stating the obvious: this phone has 2 screens. Not sure how that impacts the functionality. |
Some actions may be performed when scrcpy exits, currently: - disable "show touches" - restore "stay on while plugged in" - power off screen - restore "power mode" (to disable "turn screen off") They are performed from a separate process so that they can be executed even when scrcpy-server is killed (e.g. if the device is unplugged). The clean up actions to perform were configured when scrcpy started. Given that there is no method to read the current "power mode" in Android, and that "turn screen off" can be applied at any time using an scrcpy shortcut, there was no way to determine if "power mode" had to be restored on exit. Therefore, it was always restored to "normal", even when not necessary. However, setting the "power mode" is quite fragile on some devices, and may cause some issues, so it is preferable to call it only when necessary (when "turn screen off" has actually been called). For that purpose, make the scrcpy-server main process and the clean up process communicate the actions to perform over the stdout/stdin, so that they can be changed dynamically. In particular, when the power mode is changed at runtime, notify the clean up process. Refs 1beec99 Refs #4456 <#4456> Refs #4624 <#4624>
This does not solve the underlying issue, but at least not setting the "power mode" when not necessary will limit the problem: #4649. |
Some actions may be performed when scrcpy exits, currently: - disable "show touches" - restore "stay on while plugged in" - power off screen - restore "power mode" (to disable "turn screen off") They are performed from a separate process so that they can be executed even when scrcpy-server is killed (e.g. if the device is unplugged). The clean up actions to perform were configured when scrcpy started. Given that there is no method to read the current "power mode" in Android, and that "turn screen off" can be applied at any time using an scrcpy shortcut, there was no way to determine if "power mode" had to be restored on exit. Therefore, it was always restored to "normal", even when not necessary. However, setting the "power mode" is quite fragile on some devices, and may cause some issues, so it is preferable to call it only when necessary (when "turn screen off" has actually been called). For that purpose, make the scrcpy-server main process and the clean up process communicate the actions to perform over the stdout/stdin, so that they can be changed dynamically. In particular, when the power mode is changed at runtime, notify the clean up process. Refs 1beec99 Refs #4456 <#4456> Refs #4624 <#4624> PR #4649 <#4649>
I haven't noticed any issues or disadvantages in mitigating the issue with |
Some actions may be performed when scrcpy exits, currently: - disable "show touches" - restore "stay on while plugged in" - power off screen - restore "power mode" (to disable "turn screen off") They are performed from a separate process so that they can be executed even when scrcpy-server is killed (e.g. if the device is unplugged). The clean up actions to perform were configured when scrcpy started. Given that there is no method to read the current "power mode" in Android, and that "turn screen off" can be applied at any time using an scrcpy shortcut, there was no way to determine if "power mode" had to be restored on exit. Therefore, it was always restored to "normal", even when not necessary. However, setting the "power mode" is quite fragile on some devices, and may cause some issues, so it is preferable to call it only when necessary (when "turn screen off" has actually been called). For that purpose, make the scrcpy-server main process and the clean up process communicate the actions to perform over a pipe (stdin/stdout), so that they can be changed dynamically. In particular, when the power mode is changed at runtime, notify the clean up process. Refs 1beec99 Refs #4456 <#4456> Refs #4624 <#4624> PR #4649 <#4649>
Environment
Describe the bug
I am able to connect to the phone using scrcpy and everything works ok while the connection is kept.
The problem appears after I interrupt scrcpy and disconnect the phone. After a period of time, the phone freezes and reboots after a few minutes.
The text was updated successfully, but these errors were encountered: