Scrcpy: Error in Windows 10: Assertion len >= s->orig_buffer_size failed at src/libavformat/aviobuf.c:581

Created on 6 Nov 2018  路  6Comments  路  Source: Genymobile/scrcpy

I downloaded the prebuilt x64 version.
When I try to execute it, I get the following error:

PS D:\desc\scrcpy-win64> ./scrcpy.exe
scrcpy-server.jar: 1 file pushed. 1.2 MB/s (18802 bytes in 0.015s)
INFO: Initial texture: 536x960
Assertion len >= s->orig_buffer_size failed at src/libavformat/aviobuf.c:581
PS D:\desc\scrcpy-win64> ERROR: Exception on thread Thread[main,5,main]
java.io.IOException: android.system.ErrnoException: write failed: EPIPE (Broken pipe)
        at com.genymobile.scrcpy.IO.writeFully(IO.java:22)
        at com.genymobile.scrcpy.IO.writeFully(IO.java:29)
        at com.genymobile.scrcpy.DesktopConnection.send(DesktopConnection.java:81)
        at com.genymobile.scrcpy.DesktopConnection.open(DesktopConnection.java:58)
        at com.genymobile.scrcpy.Server.scrcpy(Server.java:16)
        at com.genymobile.scrcpy.Server.main(Server.java:102)
        at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
        at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:255)
Caused by: android.system.ErrnoException: write failed: EPIPE (Broken pipe)
        at libcore.io.Posix.writeBytes(Native Method)
        at libcore.io.Posix.write(Posix.java:218)
        at libcore.io.BlockGuardOs.write(BlockGuardOs.java:308)
        at android.system.Os.write(Os.java:528)
        at com.genymobile.scrcpy.IO.writeFully(IO.java:19)
        ... 7 more
connection

Most helpful comment

Yes, it did fix it! Thanks for the help.

All 6 comments

Every time?

It seems the connection is closed by the server. What is your Android version?

Yes, every time, even with the 32-bit version.
I have Android 5.0.2.

The server may not connect to the client (it fails only on write, not on connect, due to the adb tunnel). Maybe you have a firewall or something which blocks the connection?

LG-H778 Android 5.0.2 also had the error.

Ah but wait, could you test the master version, this could be the same issue as https://github.com/Genymobile/scrcpy/issues/291 on 5.0.1, which has been fixed by https://github.com/Genymobile/scrcpy/commit/b882322f7371b16acd53677c4a3adbaaed0aef77.

See https://github.com/Genymobile/scrcpy/issues/291#issuecomment-427906676.
(download the file, rename it scrcpy-server.jar and replace the existing one)

Yes, it did fix it! Thanks for the help.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tonyyang924 picture tonyyang924  路  4Comments

targor picture targor  路  3Comments

qymspace picture qymspace  路  3Comments

SuryaElavazhagan picture SuryaElavazhagan  路  4Comments

singleNeuron picture singleNeuron  路  3Comments