Skip to content
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

Ctrl+shift+v cause Buffer full #1425

Closed
x1y9 opened this issue May 24, 2020 · 1 comment
Closed

Ctrl+shift+v cause Buffer full #1425

x1y9 opened this issue May 24, 2020 · 1 comment
Labels

Comments

@x1y9
Copy link

x1y9 commented May 24, 2020

Environment

  • OS: windows 10
  • scrcpy version: 1.13
  • installation method: Windows release
  • device model: huawei honor v10
  • Android version: 10

Describe the bug
when do ctrl-shift-v to copy a large text (about 400 utf-8 characters) to device clipboard, get
java.lang.IllegalStateException: Buffer full, call next() to consume

java.lang.IllegalStateException: Buffer full, call next() to consume
        at com.genymobile.scrcpy.ControlMessageReader.readFrom(ControlMessageReader.java:36)
        at com.genymobile.scrcpy.DesktopConnection.receiveControlMessage(DesktopConnection.java:110)
        at com.genymobile.scrcpy.Controller.handleEvent(Controller.java:76)
        at com.genymobile.scrcpy.Controller.control(Controller.java:67)
        at com.genymobile.scrcpy.Server$1.run(Server.java:47)
        at java.lang.Thread.run(Thread.java:929)
@rom1v rom1v added the bug label May 24, 2020
rom1v added a commit that referenced this issue May 24, 2020
The buffer size must be greater than any event message.

Clipboard events may take up to 4096 bytes, so increase the buffer size.

Fixes #1425 <#1425>
rom1v added a commit that referenced this issue May 24, 2020
Add a unit test to avoid regressions.

Refs #1425 <#1425>
@rom1v
Copy link
Collaborator

rom1v commented May 24, 2020

Thank you for your report. 👍

Fixed by 517dbd9, tested by c7155a1.

@rom1v rom1v closed this as completed May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants