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

Mirroring of camera is not working getting java.lang.NullPointerException #4430

Closed
2 tasks done
alenpaulvarghese opened this issue Nov 17, 2023 · 2 comments
Closed
2 tasks done

Comments

@alenpaulvarghese
Copy link

  • I have read the FAQ.
  • I have searched in existing issues.

Environment

  • OS: WIndows
  • scrcpy version: [e.g. 1.12.1]
    scrcpy v2.2
    Dependencies (compiled / linked):
    - SDL: 2.28.4 / 2.28.4
    - libavcodec: 60.3.100 / 60.3.100
    - libavformat: 60.3.100 / 60.3.100
    - libavutil: 58.2.100 / 58.2.100
    - libusb: - / 1.0.26
  • installation method: unzipped the window release, copy all files to the path.
  • device model: Nothing Phone 2
  • Android version: 13

Describe the bug
I've attempted to use USB to mirror the camera on my smartphone to the Windows 11 laptop.
scrcpy --video-source=camera
Regretfully, after running the command, I am receiving the given error.

The command scrcpy --list-cameras also outputs the same error.

scrcpy v2.2 <https://github.com/Genymobile/scrcpy>
INFO: Camera video source: control disabled
INFO: Camera video source: microphone audio source selected
INFO: ADB device found:
INFO:     -->   (usb)              a70a6736            device  AIN065
C:\Tools\bin\scrcpy-server: 1 file pushed, 0 skipped. 72.6 MB/s (64363 bytes in 0.001s)
[server] INFO: Device: [Nothing] Nothing AIN065 (Android 13)
[server] ERROR: Exception on thread Thread[video,5,main]
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
        at android.hardware.camera2.CameraManager$CameraManagerGlobal.onStatusChangedLocked(CameraManager.java:2252)
        at android.hardware.camera2.CameraManager$CameraManagerGlobal.connectCameraServiceLocked(CameraManager.java:1613)
        at android.hardware.camera2.CameraManager$CameraManagerGlobal.getCameraIdList(CameraManager.java:1846)
        at android.hardware.camera2.CameraManager.getCameraIdList(CameraManager.java:220)
        at com.genymobile.scrcpy.CameraCapture.selectCamera(CameraCapture.java:99)
        at com.genymobile.scrcpy.CameraCapture.init(CameraCapture.java:75)
        at com.genymobile.scrcpy.SurfaceEncoder.streamScreen(SurfaceEncoder.java:55)
        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)
INFO: Renderer: direct3d
ERROR: Demuxer 'video': stream disabled due to connection error
ERROR: Demuxer 'audio': stream disabled due to connection error
ERROR: Demuxer error

Please do not post screenshots of your terminal, just post the content as text instead.

@rom1v
Copy link
Collaborator

rom1v commented Nov 17, 2023

#4392

@alenpaulvarghese
Copy link
Author

It seems that my search for issues on Github wasn't very successful. Thank you, the scrcpy-server build functions perfectly for me.

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

2 participants