Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
109.75k stars 10.55k forks source link

Latest 1.19 crashes (also older versions 1.12) #2658

Open eGit opened 3 years ago

eGit commented 3 years ago

Environment Linux Mint 19.3 scrcpy 1.12.1 and latest 1.19

Describe the bug I usually use 1.12.1 It works but crashes about every minute. Sometime more often sometimes it goes stable for 5min. INFO: scrcpy 1.12.1 https://github.com/Genymobile/scrcpy x/server/scrcpy-server: 1 file pushed,...pped. 5.9 MB/s (26238 bytes in 0.004s) INFO: Initial texture: 768x1280 WARN: Device disconnected

So I decided to upgrade to 1.19. But this crashes more frequently. Often directly when launched. Less stable then 1.12 [server] INFO: Device: LGE Nexus 4 (Android 8.1.0) INFO: Renderer: opengl INFO: OpenGL version: 3.0 Mesa 20.0.8 INFO: Trilinear filtering enabled INFO: Initial texture: 768x1280 WARN: Device disconnected WARN: Killing the server...

eGit commented 3 years ago

That's how a crash looks like in verbose mode:

VERBOSE: input: touch [id=mouse] down position=375,761 pressure=1 buttons=000001 VERBOSE: input: touch [id=mouse] up position=375,761 pressure=0 buttons=000001 VERBOSE: input: touch [id=mouse] down position=394,1211 pressure=1 buttons=000001 VERBOSE: input: touch [id=mouse] up position=394,1211 pressure=0 buttons=000001 VERBOSE: input: touch [id=mouse] down position=369,778 pressure=1 buttons=000001 VERBOSE: input: touch [id=mouse] up position=369,778 pressure=0 buttons=000001 VERBOSE: input: touch [id=mouse] down position=369,778 pressure=1 buttons=000001 VERBOSE: input: touch [id=mouse] up position=369,778 pressure=0 buttons=000001 VERBOSE: input: touch [id=mouse] down position=369,778 pressure=1 buttons=000001 VERBOSE: input: touch [id=mouse] up position=369,778 pressure=0 buttons=000001 VERBOSE: input: touch [id=mouse] down position=369,778 pressure=1 buttons=000001 VERBOSE: input: touch [id=mouse] up position=369,778 pressure=0 buttons=000001 VERBOSE: input: scroll position=389,1076 hscroll=0 vscroll=-1 VERBOSE: input: scroll position=405,651 hscroll=0 vscroll=1 VERBOSE: input: scroll position=402,637 hscroll=0 vscroll=-1 VERBOSE: input: scroll position=402,637 hscroll=0 vscroll=1 VERBOSE: input: scroll position=402,637 hscroll=0 vscroll=1 VERBOSE: input: scroll position=402,642 hscroll=0 vscroll=1 VERBOSE: input: scroll position=408,663 hscroll=0 vscroll=-1 VERBOSE: input: scroll position=410,668 hscroll=0 vscroll=-1 VERBOSE: input: scroll position=410,671 hscroll=0 vscroll=-1 DEBUG: End of frames DEBUG: Receiver stopped DEBUG: Server terminated DEBUG: Video stream stopped WARN: Device disconnected DEBUG: quit... WARN: Killing the server...

rom1v commented 3 years ago

WARN: Device disconnected

This happens when the adb connection is closed.

For example, if you run in a separate terminal adb shell or adb logcat, this connection will also be closed at the same time as scrcpy.

This can be caused for example by a USB cable/port issue (FAQ), or when the "USB" is reconfigured (on enabling/disabling MTP/PTP, etc., see https://github.com/Genymobile/scrcpy/issues/1914#issuecomment-729532525 https://github.com/Genymobile/scrcpy/issues/1382).

eGit commented 3 years ago

I only run scrcpy. No other adb shell or logcat. I tried different USB cables already and I never use MTP/PTP or change anything while running it.

I will try another USB port.

rom1v commented 3 years ago

I only run scrcpy. No other adb shell or logcat.

Yes, I understand. What I suggested is to run adb shell or adb logcat in a separate terminal while scrcpy is running, and you'll observe that they will be closed at the same time as scrcpy when you get WARN: Device disconnected.

I never use MTP/PTP or change anything while running it.

OK (sometimes it changes automatically on lock/unlock).

Also on some devices/ROM, the adb server sometimes crashes on the device (so all adb connections get closed).

eGit commented 3 years ago

Thanks for clarifying.