viarotel-org / escrcpy

📱 Graphical Scrcpy to display and control Android, devices powered by Electron.
https://github.com/viarotel-org/escrcpy
Apache License 2.0
2.48k stars 185 forks source link

连接一段时间后就断开连接自动退出,是什么原因? #164

Open lwokf opened 6 months ago

funthing commented 6 months ago

我的也是,这个是详细的错误日志: [2024-04-06 17:43:43.964] [error] scrcpyProcess.stderr.data: WARN: Device disconnected

[2024-04-06 17:43:44.469] [error] mirror.args [2024-04-06 17:43:44.470] [error] mirror.error Error: [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state

,[server] ERROR: Encoding error: java.lang.IllegalStateException: Pending dequeue output buffer request cancelled

,[server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state

,[server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state

,[server] ERROR: Encoding error: java.lang.IllegalStateException: Invalid to call at Released state; only valid in executing state

,[server] ERROR: Encoding error: java.lang.IllegalStateException: Pending dequeue output buffer request cancelled

,[server] ERROR: Exception on thread Thread[video,5,main] java.lang.IllegalStateException: Pending dequeue output buffer request cancelled

at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:3741)
at com.genymobile.scrcpy.SurfaceEncoder.encode(SurfaceEncoder.java:157)
at com.genymobile.scrcpy.SurfaceEncoder.streamScreen(SurfaceEncoder.java:76)
at com.genymobile.scrcpy.SurfaceEncoder.lambda$start$0$com-genymobile-scrcpy-SurfaceEncoder(SurfaceEncoder.java:253)
at com.genymobile.scrcpy.SurfaceEncoder$$ExternalSyntheticLambda0.run(Unknown Source:4)
at java.lang.Thread.run(Thread.java:1012)

,WARN: Device disconnected

at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
viarotel commented 6 months ago

请尝试直接使用 scrcpy 命令行方式运行查看有无此问题。

funthing commented 6 months ago

请尝试直接使用 scrcpy 命令行方式运行查看有无此问题。

使用命令行方式也发现有这个错误,只是scrcpy 命令行不会直接退出连接,看着好像是立即重连了 [server] INFO: Retrying... [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state

[server] INFO: Retrying... ERROR: [FFmpeg] error while decoding MB 66 193, bytestream -6 INFO: [FFmpeg] concealing 613 DC, 613 AC, 613 MV errors in P frame [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state

[server] INFO: Retrying... [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state

[server] INFO: Retrying... ERROR: [FFmpeg] error while decoding MB 42 197, bytestream -5 INFO: [FFmpeg] concealing 277 DC, 277 AC, 277 MV errors in P frame [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state

[server] INFO: Retrying...

viarotel commented 6 months ago

请尝试直接使用 scrcpy 命令行方式运行查看有无此问题。

使用命令行方式也发现有这个错误,只是scrcpy 命令行不会直接退出连接,看着好像是立即重连了 [server] INFO: Retrying... [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state

[server] INFO: Retrying... ERROR: [FFmpeg] error while decoding MB 66 193, bytestream -6 INFO: [FFmpeg] concealing 613 DC, 613 AC, 613 MV errors in P frame [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state

[server] INFO: Retrying... [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state

[server] INFO: Retrying... ERROR: [FFmpeg] error while decoding MB 42 197, bytestream -5 INFO: [FFmpeg] concealing 277 DC, 277 AC, 277 MV errors in P frame [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state

[server] INFO: Retrying...

感谢你详细的回答,我有了一些思路,我会在近期尝试解决这个问题,请问你有什么任意机型必现的方法吗,还是说只有部分机型有这个问题,否则后续我可能需要你的帮助来测试该问题是否确认被修复

funthing commented 6 months ago

请尝试直接使用 scrcpy 命令行方式运行查看有无此问题。

使用命令行方式也发现有这个错误,只是scrcpy 命令行不会直接退出连接,看着好像是立即重连了 [server] INFO: Retrying... [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state [server] INFO: Retrying... ERROR: [FFmpeg] error while decoding MB 66 193, bytestream -6 INFO: [FFmpeg] concealing 613 DC, 613 AC, 613 MV errors in P frame [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state [server] INFO: Retrying... [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state [server] INFO: Retrying... ERROR: [FFmpeg] error while decoding MB 42 197, bytestream -5 INFO: [FFmpeg] concealing 277 DC, 277 AC, 277 MV errors in P frame [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state [server] INFO: Retrying...

感谢你详细的回答,我有了一些思路,我会在近期尝试解决这个问题,请问你有什么任意机型必现的方法吗,还是说只有部分机型有这个问题,否则后续我可能需要你的帮助来测试该问题是否确认被修复

我的手机是红米K60Pro,有可能和问题相关的配置是2K的分辨率、120hz的刷新率、12GB运行内存、256GB的存储,电脑内存是16GB,基本上都会在30分钟内断联,如果有需要我也可以协助测试

viarotel commented 6 months ago

请尝试直接使用 scrcpy 命令行方式运行查看有无此问题。

使用命令行方式也发现有这个错误,只是scrcpy 命令行不会直接退出连接,看着好像是立即重连了 [server] INFO: Retrying... [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state [server] INFO: Retrying... ERROR: [FFmpeg] error while decoding MB 66 193, bytestream -6 INFO: [FFmpeg] concealing 613 DC, 613 AC, 613 MV errors in P frame [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state [server] INFO: Retrying... [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state [server] INFO: Retrying... ERROR: [FFmpeg] error while decoding MB 42 197, bytestream -5 INFO: [FFmpeg] concealing 277 DC, 277 AC, 277 MV errors in P frame [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state [server] INFO: Retrying...

感谢你详细的回答,我有了一些思路,我会在近期尝试解决这个问题,请问你有什么任意机型必现的方法吗,还是说只有部分机型有这个问题,否则后续我可能需要你的帮助来测试该问题是否确认被修复

我的手机是红米K60Pro,有可能和问题相关的配置是2K的分辨率、120hz的刷新率、12GB运行内存、256GB的存储,电脑内存是16GB,基本上都会在30分钟内断联,如果有需要我也可以协助测试

你是否更改了默认的编码方式?连接方式是什么? 有线还是无线? 我这边测试我的一加5 lineageos21 即使是无线连接情况下 3个小时了 没有出现你所说的问题

funthing commented 6 months ago

请尝试直接使用 scrcpy 命令行方式运行查看有无此问题。

使用命令行方式也发现有这个错误,只是scrcpy 命令行不会直接退出连接,看着好像是立即重连了 [server] INFO: Retrying... [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state [server] INFO: Retrying... ERROR: [FFmpeg] error while decoding MB 66 193, bytestream -6 INFO: [FFmpeg] concealing 613 DC, 613 AC, 613 MV errors in P frame [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state [server] INFO: Retrying... [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state [server] INFO: Retrying... ERROR: [FFmpeg] error while decoding MB 42 197, bytestream -5 INFO: [FFmpeg] concealing 277 DC, 277 AC, 277 MV errors in P frame [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state [server] INFO: Retrying...

感谢你详细的回答,我有了一些思路,我会在近期尝试解决这个问题,请问你有什么任意机型必现的方法吗,还是说只有部分机型有这个问题,否则后续我可能需要你的帮助来测试该问题是否确认被修复

我的手机是红米K60Pro,有可能和问题相关的配置是2K的分辨率、120hz的刷新率、12GB运行内存、256GB的存储,电脑内存是16GB,基本上都会在30分钟内断联,如果有需要我也可以协助测试

你是否更改了默认的编码方式?连接方式是什么? 有线还是无线? 我这边测试我的一加5 lineageos21 即使是无线连接情况下 3个小时了 没有出现你所说的问题

无线连接,没有修改设置,保持默认

lwokf commented 6 months ago

请尝试直接使用 scrcpy 命令行方式运行查看有无此问题。

使用命令行方式也发现有这个错误,只是scrcpy 命令行不会直接退出连接,看着好像是立即重连了 [server] INFO: Retrying... [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state [server] INFO: Retrying... ERROR: [FFmpeg] error while decoding MB 66 193, bytestream -6 INFO: [FFmpeg] concealing 613 DC, 613 AC, 613 MV errors in P frame [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state [server] INFO: Retrying... [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state [server] INFO: Retrying... ERROR: [FFmpeg] error while decoding MB 42 197, bytestream -5 INFO: [FFmpeg] concealing 277 DC, 277 AC, 277 MV errors in P frame [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state [server] INFO: Retrying...

感谢你详细的回答,我有了一些思路,我会在近期尝试解决这个问题,请问你有什么任意机型必现的方法吗,还是说只有部分机型有这个问题,否则后续我可能需要你的帮助来测试该问题是否确认被修复

我的手机是红米K60Pro,有可能和问题相关的配置是2K的分辨率、120hz的刷新率、12GB运行内存、256GB的存储,电脑内存是16GB,基本上都会在30分钟内断联,如果有需要我也可以协助测试

你是否更改了默认的编码方式?连接方式是什么? 有线还是无线? 我这边测试我的一加5 lineageos21 即使是无线连接情况下 3个小时了 没有出现你所说的问题

无线连接,没有修改设置,保持默认

我的是K40,也是默认设置,小米的锅吗?🙄

funthing commented 6 months ago

请尝试直接使用 scrcpy 命令行方式运行查看有无此问题。

使用命令行方式也发现有这个错误,只是scrcpy 命令行不会直接退出连接,看着好像是立即重连了 [server] INFO: Retrying... [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state [server] INFO: Retrying... ERROR: [FFmpeg] error while decoding MB 66 193, bytestream -6 INFO: [FFmpeg] concealing 613 DC, 613 AC, 613 MV errors in P frame [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state [server] INFO: Retrying... [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state [server] INFO: Retrying... ERROR: [FFmpeg] error while decoding MB 42 197, bytestream -5 INFO: [FFmpeg] concealing 277 DC, 277 AC, 277 MV errors in P frame [server] ERROR: Encoding error: java.lang.IllegalStateException: releaseOutputBuffer() is valid only at Executing states; currently at Released state [server] INFO: Retrying...

感谢你详细的回答,我有了一些思路,我会在近期尝试解决这个问题,请问你有什么任意机型必现的方法吗,还是说只有部分机型有这个问题,否则后续我可能需要你的帮助来测试该问题是否确认被修复

我的手机是红米K60Pro,有可能和问题相关的配置是2K的分辨率、120hz的刷新率、12GB运行内存、256GB的存储,电脑内存是16GB,基本上都会在30分钟内断联,如果有需要我也可以协助测试

你是否更改了默认的编码方式?连接方式是什么? 有线还是无线? 我这边测试我的一加5 lineageos21 即使是无线连接情况下 3个小时了 没有出现你所说的问题

无线连接,没有修改设置,保持默认

我的是K40,也是默认设置,小米的锅吗?🙄

说不好,听说MIUI对安卓魔改挺多的