-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Keyboard wont work after around 15 words typed in Messenger. #350
Comments
Thank you for your report. What is your Android version? I cannot reproduce the problem on my device. To help finding the root cause, could you please replace
It does not fix anything, but adds some interesting logs that might help to understand what goes wrong. Precisely, here is the diff: diff --git a/server/src/main/java/com/genymobile/scrcpy/ControlEventReader.java b/server/src/main/java/com/genymobile/scrcpy/ControlEventReader.java
index 83088b1..f3dcdef 100644
--- a/server/src/main/java/com/genymobile/scrcpy/ControlEventReader.java
+++ b/server/src/main/java/com/genymobile/scrcpy/ControlEventReader.java
@@ -29,18 +29,29 @@ public class ControlEventReader {
return buffer.remaining() == rawBuffer.length;
}
+ private void log(String msg) {
+ Ln.d(msg + ": " + buffer.position() + ", " + buffer.limit());
+ }
+
public void readFrom(InputStream input) throws IOException {
+ Ln.d("=============");
+ log("#0");
if (isFull()) {
throw new IllegalStateException("Buffer full, call next() to consume");
}
buffer.compact();
+ log("#1");
int head = buffer.position();
int r = input.read(rawBuffer, head, rawBuffer.length - head);
+ Ln.d("r = " + r);
+ log("#2");
if (r == -1) {
throw new EOFException("Event controller socket closed");
}
buffer.position(head + r);
+ log("#3");
buffer.flip();
+ log("#4");
}
public ControlEvent next() { |
hmm, replacing that file actually fixed the problem. Its not doing it anymore. Weird. Thank you for your help |
This is not expected. Could you recheck with the original |
I deleted it. Yeah it stopped. Haven't had a problem since. I really like being able to use my comp to type messages. Pain in the butt to get messages and do it on my phone. Hopefully it gets more support and is officially added to repositories |
It's in the official v1.5 release :) If you can reproduce it, I'm interested. |
Hi, I also have this problem the only differance being that after I click/drag with my mouse I get the exeption. Sadly unlike OP when I use v1.5 scrcpy-server.jar I get an error.
Reinstalling the v1.6 scrcpy-server.jar and running scrcpy I encounted the same error I was getting before
After the error I can still see my phone's screen and it continues to update but none of my clicks register after that point |
Commit fefb981 modified mouse events serialization. The server-side parsing was updated to correctly read the position, but the expected size of these events was not updated. As a result, the server might try to parse incomplete events, leading to BufferUnderflowException. Fixes <#350 (comment)>.
This is expected (current
OK, thank you for your report. This is not the same error. This bug has been introduced between v1.5 and v1.6, and should be fixed on The fix modifies the server, so you need not to use the prebuilt server to test. If you encounter problems, please tell me, I'll provide a new .jar. |
Does it still happen? |
Hello! I have the same It usually happens when I'm interacting with the mouse, or if I let the screen opened for some minutes. Android device: Xiaomi Mi A2 Lite Do you think it is related to this same issue? |
v1.6 is very old. Use the latest version (v1.16). |
My bad. I didn't realize that I was using a version that I built in my machine a while ago. |
After around 15 words sometimes less, the keyboard stops being able to type letters, i press the letter and the curser doesnt move, it just blinks. I have to send the message and then start a new message to write anymore.Sometimes i cant even send it after. I have to exit and enter again.
THis is the error that just showed up when it stopped working. I dunno what to do with it.
The text was updated successfully, but these errors were encountered: