-
-
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
Segmentation Fault while recording video ! #707
Comments
What does it do if you just draw the pattern with your mouse (left click hold)? |
I am unable to drag the screen to reveal the pattern screen ... accidentally when i land the pattern lock screen ... then when i try to draw the pattern with the left click held down ... nothing seems to happen ... after a while the screen timesout ... and i am back to my struggle !!! 😢 |
@rom1v ... turns out the mouse cursor actions on the mobile screen is very very slow ... as a result it seems mostly unresponsive ... swiping the screen on wake is quite a challenge ... If i have to give u an idea of how slow and unresponsive it is ... The right click action on the phone window which supposedly wakes the phone(same as the physical power button action to wake) ... turns out it takes about 10-12 secs for the screen to show from a black screen(display off sleep state) to the lock screen FYI ... i am using the command PS : my laptop is loaded with 16GB of RAM with an i5 processor ... i don't think my machine is the reason for the sluggish(like how a sloth moves) response ... I am guessing it must be something that may have to do with the speed of communication between the system and the phone thanks. |
Wow, that's unexpected, it should be instantaneous. Maybe your device itself is lagging. What happens if you send the POWER event via:
(both while scrcpy is running and not running)? |
hmmmmm ... my device isn't lagging ... it is as responsive as a Google Nexus 5 with 2 Gb RAM is supposed to be ... unfortunately my device screen isn't consistent ... it doesn't wake or show anything ... its just a blackish-grey lit screen ...
no difference ... the screen wakes up pretty slow even with the command (with scrcpy running)
unfortunately i can't test it with scrcpy not running as the screen is bust !!! |
Maybe the video is lagging (you press POWER, it wakes up immediately but you don't see it until the frames are received and decoded). To determine if this is the case, record the video:
Press power to switch off and switch on (it takes times in your scrcpy window). Then close the scrcpy window, and open file.mkv in a video player (like VLC), where you will see what happened in "real time" (the frame timestamps are generated on the device side for recording). |
I tried the above command ... the window showed for a split second and closed ... giving the following error ...
Yeah ... even i feel the process(receive and decoded) communication between the devices(phone and laptop) is what is slow and sluggish ... takes away the whole experience of accessing your phone on your system ... 😭 ... |
😱 This is a serious bug. Does it also happen in mp4?
If it still crashes, could you test with v1.9 instead of v1.10, please (a lot of things have changed about parsing and recording)? I cannot reproduce (also on a Nexus 5). What is your operating system / distribution on the computer? I'm very interested in tracking down the cause. Could you compile and run with:
We need to determine where the lag come from. Typically, controlling the device and get a feedback should be near-instantaneous (few dozens of milliseconds). |
I am on Linux Deepin latest version ...
rebuilt and installed with v1.9 following the below directions ...
I am glad to help you grab whatever info from my machine facing this bug ... 😄
the command hasn't terminated yet ... I opened another terminal tab and tried running the 3rd command ...
please check if i am running the above commands from inside the right directories(folders) ... |
In fact, it is building the server (the first time, gradle download the whole internet before it can compile), and meson doesn't print its output. I just changed that in 20b3f10 (but you use a version < 0.48 anyway).
The reason is that the build of the server is not complete. You must wait for your previous command to complete. Alternatively, you could use the prebuilt server. |
UPDATE : sorry the command did execute completely ... i took that command to be something that runs in the background so it can collect debug information ... anyways the following is the output of the command ...
after that i tried running this command and it runs successfully ...
I have a mkv file captured ... how do i share it with you ? anyways there is nothing in the video except that the screen is showing ... after a while it goes to sleep and i press Note : all the while when the screen was visible ... i have been left clicking and dragging the screen lock so i could enter the phone ... even after the screen woke up after it went to sleep ... obviously none of those attempts show up on the captured video. |
Arf, I hoped it crashed the same way with the stack trace. If you could make it crash like before, I'm interested :) Is your non-debug binary still crashing if you retry, or was it just a one-time crash?
I don't need it, it was just to know if you observed the very same delay on the recorded an in live. So it seems this is really a control problem. Since it also happen with |
Based on your directions i tested 1.9 ... as mentioned above ... when i tried running the normal command hoping to run the installed 1.9 version ... i got the following ...
I rebuilt the version 1.10 once again ... and the crash still exist on 1.10 ...
do you mean you wanted me to crash it the same way on 1.9 ? |
OK, do not compile from tag
That's great! But can you reproduce it with ASAN enabled (
No, I wanted to get the crash with the stacktrace from ASAN so that we can find the cause 😉 But testing if v1.9 crash could also "help". |
ok ... here you go ... is this what you were hoping to find ?
|
what about the 'Windows Effect' getting disturbed when |
Exactly, thank you 👍 I will investigate later. In addition, could you:
Thank you.
https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#kwin-compositor-crashes |
ok ... do i have to uninstall the 1.10 version and install 1.9 from scratch ? |
No, just:
|
@rom1v ... i am not a pro at this ... these are the following steps i followed before i tried the above commands
then i tried the following commands you wanted me to run ...
I tried running the following command both in the
with the above failing ... i guess the following command will give an error ...
|
You can always use the same source folder without recloning with From there, you can create several independant build directories, with different settings:
And you can build the app using the builddir you configured:
To test in debug with ASAN, you can just reuse the Once a version is build, you can run it directly in your builddir without installing with So from scratch, to build v1.9: git clone https://github.com/Genymobile/scrcpy
git checkout 53310a925a495f61d42dd90faa0a0748074d63c5
meson debug -Db_sanitize=address
ninja -Cdebug
./run debug -b1M -m600 -r file.mkv |
@rom1v ... thanks for explaining the build process ...
```ninja: Entering directory `debug'
|
Did your meson command work without errors? |
Sorry, it's |
@rom1v ... i was wondering the hash code or whatever code that is used here points to the Version 1.9 branch ? How do we locate this code for each release ... can i view it with a command or find it on the github website ? |
This hashcode is few commits after v1.9, to fix a build issue (see #583). Otherwise, you could just You can get a graph:
|
oh ... ok so basically we could compile to that particular point on any commits ? so is this the place where you grab the hashcode ? thanks for the information ... didn't know one could checkout at that point and compile a package ... exactly after a particular commit ... git never ceases to amaze me !!! |
GitHub displays the hash, but typically you get it from
If you are interested in git, I would recommend to read the 3 first chapters of git-scm.
Thank you, this is helpful. If you could If you don't know how to do, could you just test recording to mkv for these specific commits (likely to introduce the issue): Thank you for your help. |
can you show me how you get the hash through commandline ?
great ... thank you for the resource ...
you are welcome.
ok ... it might be a while until i pick up git ... i'll test the commits you've pointed for this particular issue ... |
@rom1v ... tested the following commit hashes manually ... please find the test results below ... Procedure i followed ...
|
The AVPacket fields side_data and side_data_elems were not initialized by av_packet_ref() in old FFmpeg versions (prior to [1]). As a consequence, on av_packet_unref(), side_data was freed, causing a segfault. Fixes <#707> [1]: <http://git.videolan.org/gitweb.cgi/ffmpeg.git/?p=ffmpeg.git;a=commitdiff;h=3b4026e15110547892d5d770b6b43c9e34df458f>
The AVPacket fields side_data and side_data_elems were not initialized by av_packet_ref() in old FFmpeg versions (prior to [1]). As a consequence, on av_packet_unref(), side_data was freed, causing a segfault. Fixes <#707> [1]: <http://git.videolan.org/gitweb.cgi/ffmpeg.git/?p=ffmpeg.git;a=commitdiff;h=3b4026e15110547892d5d770b6b43c9e34df458f>
I just investigated from the stack traces you provided (without being able to reproduce). I found a possible explanation: before this commit in FFmpeg (libavcodec < 58.12.100), the Please test with this fix: a9c8fa3 git fetch
git checkout fix707
# then build as usual Thank you. |
Thank you. 👍 I merge it. |
I guess you can only install the last packaged version from snap. cc @sisco311 Anyway, if your FFmpeg version is recent enough, this segfault should not occur. |
I was wondering if you'd package your app as a flatpak ? Also i am a free lance designer ... i would like to contribute towards your GUI plans to incorporate the functions of shortcuts ... just let me know if you'd be interested ... and i'll try and work a UI that'll complement the current simplistic elegance of your package ... you can find me on https://t.me/deepin with the same username as github. |
See #486.
Thank you for your proposal. Adding a control bar is cumbersome in SDL. It would be easier in Qt. A (long-term) path I have in mind to add a control bar is:
|
have posted on the flatpak thread ... that's a nice implementation by barry ... so do drop in a word when you finally implement libsccpy ... will be glad to help . |
Hi @rom1v |
It is something I'd like to do. But I probably won't work on libscrcpy in the short term. |
Hi,
Its a great android mirroring package you have going ...
My Nexus has some hardware issue with the screen ... the screen does not display the contents instead it shows a black/grey lit screen ... So i set out to see how i could access my nexus 5 device in this state from a PC so i can backup my stuff (messages(sms's), internal storage, etc ...) ... i came across you package i have built it using your instructions on my system running linux ... and my android screen is visible too ... My problem is that i have a pattern lock ... for the life of me i am not able to figure out how do i unlock the same from my PC ... or if that is even possible to do with your packae ... any / all help appreciated to help open my Nexus 5 via the PC and run backups for my stuff.
thanks.
The text was updated successfully, but these errors were encountered: