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

BufferUnderflowException #1245

Closed
BigDogBoy opened this issue Mar 26, 2020 · 4 comments
Closed

BufferUnderflowException #1245

BigDogBoy opened this issue Mar 26, 2020 · 4 comments
Labels

Comments

@BigDogBoy
Copy link

BigDogBoy commented Mar 26, 2020

I was just casually using the app this morning; to play Miniclip's 8-ball pool, because when my phone is in landscape mode, the SCRCPY window takes up practically my entire screen, and the phones display almost perfectly scales to match it; when the oddest anomaly occurred. This:
image

/usr/local/share/scrcpy/scrcpy-server: ...ushed. 0.3 MB/s (26196 bytes in 0.084s)
INFO: Initial texture: 1440x720
INFO: New texture: 720x1440
[server] INFO: Device screen turned off
[server] ERROR: Exception on thread Thread[Thread-1,5,main]
jana.nio.BufferUnderflowException
        at java.nio.Buffer.nextGetIndex(Buffer.java:521)
        at java.nio.HeapByteBuffer.getInt(HeapByteBuffer.java:319)
        at com.genymobile.scrcpy.ControlMessageReader.parseInjectTouchEvent(ControlMessageReader.java:137)
        at com.genymobile.scrcpy.ControlMessageReader.next(ControlMessageReader.java:64)
        at com.genymobile.scrcpy.DesktopConnection.receiveControlMessage(DesktopConnection.java:108)
        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:764)

happened, which has never happened before; oddly enough, when I un, and re plugged my phone back in, SCRCPY worked like a charm.

@rom1v
Copy link
Collaborator

rom1v commented Mar 26, 2020

Thank you for the report. Which version exactly? How was it installed?

What did you do when this happened (a lot of clicks)?

(a text version of the error would be preferable, because it could be searched)

@rom1v rom1v changed the title potential bug to be aware of BufferUnderflowException Mar 26, 2020
@rom1v rom1v added the bug label Mar 26, 2020
rom1v added a commit that referenced this issue Mar 26, 2020
The expected length for a touch event control message was incorrect. As
a consequence, a BufferUnderflowException could occur.

Fixes #1245 <#1245>
rom1v added a commit that referenced this issue Mar 26, 2020
This will avoid regressions for #1245.

<#1245>
@rom1v
Copy link
Collaborator

rom1v commented Mar 26, 2020

Thank you, fixed by 89d1602 and tests added by 3504c00.

@rom1v rom1v closed this as completed Mar 26, 2020
@BigDogBoy
Copy link
Author

BigDogBoy commented Mar 26, 2020 via email

@rom1v
Copy link
Collaborator

rom1v commented Apr 29, 2020

Released in v1.13.

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