Genymobile / Genymobile/scrcpy
ERROR
- Dominant language
- C
- Stars
- 150k
- Forks
- 13.7k
- Avg merge
- 4d 13h
- Merged PRs (30d)
- 2
Description
scrcpy 2.0
D:\scrcpy-win64-v2.0\scrcpy-win64-v2.0\scrcpy-server: 1 file pushed, 0 skipped. 27.7 MB/s (52867 bytes in 0.002s)
[server] INFO: Device: OnePlus IN2023 (Android 12)
INFO: Renderer: direct3d
INFO: Initial texture: 1080x2400
[server] INFO: newMaxSize = 1920
[server] INFO: Retrying with -m1920...
[server] INFO: Retrying...
[server] ERROR: Encoding error: java.lang.IllegalStateException: null
[server] ERROR: Encoding error: java.lang.IllegalStateException: null
[server] INFO: newMaxSize = 1600
[server] INFO: Retrying with -m1600...
[server] INFO: Retrying...
[server] INFO: newMaxSize = 1280
[server] INFO: Retrying with -m1280...
[server] INFO: Retrying...
[server] ERROR: Encoding error: java.lang.IllegalStateException: null
[server] ERROR: Encoding error: java.lang.IllegalStateException: null
[server] INFO: newMaxSize = 1024
[server] INFO: Retrying with -m1024...
[server] INFO: Retrying...
[server] ERROR: Encoding error: java.lang.IllegalStateException: null
[server] INFO: newMaxSize = 800
[server] INFO: Retrying with -m800...
[server] INFO: Retrying...
[server] ERROR: Encoding error: java.lang.IllegalStateException: null
[server] INFO: newMaxSize = 0
WARN: Device disconnected
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.IllegalStateException
at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:3535)
at com.genymobile.scrcpy.ScreenEncoder.encode(ScreenEncoder.java:169)
at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:95)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:133)
at com.genymobile.scrcpy.Server.main(Server.java:381)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:357)
WARN: Killing the server...
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the Android server stack trace in ScreenEncoder.java, especially encode() at line 169 and streamScreen() at line 95, then inspect how MediaCodec output is dequeued. Reproduce with the reported OnePlus IN2023 on Android 12 and the shown max-size retries. Done means the encoding failure is handled or diagnosed without the server crashing, with a regression test if the existing test structure supports it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, c, java
- Domain
- audio-video-rtc, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100