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

IllegalStateException on MediaCodec.native_dequeueOutputBuffer() #757

Closed
brandoFS opened this issue Aug 27, 2019 · 3 comments
Closed

IllegalStateException on MediaCodec.native_dequeueOutputBuffer() #757

brandoFS opened this issue Aug 27, 2019 · 3 comments

Comments

@brandoFS
Copy link

brandoFS commented Aug 27, 2019

Scrcpy recently stopped working for me, I'm getting an error that there are multiple devices but when I run "adb devices" there is only one listed

 $ scrcpy -b2M -m800
2019-08-27 14:20:12.101 scrcpy[59628:611984] INFO: scrcpy 1.10 <https://github.com/Genymobile/scrcpy>
/usr/local/Cellar/scrcpy/1.10/share/scrcpy/scrcpy-server.jar: 1 file pushed. 0.5 MB/s (22662 bytes in 0.045s)
adb: error: more than one device and emulator
2019-08-27 14:20:12.237 scrcpy[59628:611984] ERROR: "adb reverse" returned with value 1
2019-08-27 14:20:12.237 scrcpy[59628:611984] WARN: 'adb reverse' failed, fallback to 'adb forward'
27183
2019-08-27 14:20:12.881 scrcpy[59628:611984] INFO: Initial texture: 800x448
[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:1055)
	at com.genymobile.scrcpy.ScreenEncoder.encode(ScreenEncoder.java:91)
	at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:72)
	at com.genymobile.scrcpy.Server.scrcpy(Server.java:32)
	at com.genymobile.scrcpy.Server.main(Server.java:133)
	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:256)

 $ adb devices
List of devices attached
192.168.1.34:5555	device
@Plandercozeron
Copy link

Plandercozeron commented Aug 28, 2019

Restarting adb daemon did any help?
adb kill-server
adb start-server

@brandoFS
Copy link
Author

tried restarting adb multiple times... no change

@rom1v
Copy link
Collaborator

rom1v commented Aug 28, 2019

I'm getting an error that there are multiple devices but when I run "adb devices" there is only one listed

This is an error printed by adb on adb reverse over wifi on old devices, but _scrcpy fallbacks to adb forward, so this is not the reason of your error, everything is ok for this part:
https://issuetracker.google.com/issues/37066218
https://www.genymotion.com/blog/open-source-project-scrcpy-now-works-wirelessly/
See #5

java.lang.IllegalStateException
  at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)

This is the real error. And is the same as #465, so I'm closing as duplicate.

@rom1v rom1v closed this as completed Aug 28, 2019
@rom1v rom1v changed the title Error Multiple devices when only one is attached IllegalStateException on MediaCodec.native_dequeueOutputBuffer() Aug 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants