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

Camera NullPointerException on OnePlus LE2111 (Android 13) #4457

Closed
2 tasks done
AravAravind opened this issue Nov 24, 2023 · 1 comment
Closed
2 tasks done

Camera NullPointerException on OnePlus LE2111 (Android 13) #4457

AravAravind opened this issue Nov 24, 2023 · 1 comment

Comments

@AravAravind
Copy link

AravAravind commented Nov 24, 2023

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

Environment

  • OS: Windows 11 23H2
  • scrcpy version: 2.2
  • installation method: Manual Build
  • device model: OnePlus 9 LE2111
  • Android version: 13

Bug Description:
When attempting to use scrcpy with the camera source enabled (scrcpy --video-source=camera) on a OnePlus LE2111 device running Android 13, a NullPointerException occurs in the OplusCamera2StatisticsManager within the scrcpy code. Despite the microphone audio working, attempts to use the camera source result in errors.The issue persists with different camera ID's.

[server] INFO: Device: [OnePlus] OnePlus LE2111 (Android 13)
INFO: Renderer: direct3d
[server] INFO: Using camera '2'
INFO: Texture: 4096x3072
[server] ERROR: Exception on thread Thread[camera,5,main]
java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.app.Application.getApplicationContext()' on a null object reference
        at android.hardware.camera2.OplusCamera2StatisticsManager.addInfo(OplusCamera2StatisticsManager.java:69)
        at android.hardware.camera2.impl.CameraDeviceImplExtImpl.extendsetInfo(CameraDeviceImplExtImpl.java:47)
        at android.hardware.camera2.impl.CameraDeviceImpl$1.run(CameraDeviceImpl.java:190)
        at android.os.Handler.handleCallback(Handler.java:942)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loopOnce(Looper.java:240)
        at android.os.Looper.loop(Looper.java:351)
        at android.os.HandlerThread.run(HandlerThread.java:67)
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)              c4941f2a            device  LE2111
C:\adb\scrcpy\scrcpy-server: 1 file pushed, 0 skipped. 100.8 MB/s (64363 bytes in 0.001s)
[server] INFO: Device: [OnePlus] OnePlus LE2111 (Android 13)
[server] INFO: Using camera '0'
[server] ERROR: Exception on thread Thread[camera,5,main]
java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.app.Application.getApplicationContext()' on a null object reference
        at android.hardware.camera2.OplusCamera2StatisticsManager.addInfo(OplusCamera2StatisticsManager.java:69)
        at android.hardware.camera2.impl.CameraDeviceImplExtImpl.extendsetInfo(CameraDeviceImplExtImpl.java:47)
        at android.hardware.camera2.impl.CameraDeviceImpl$1.run(CameraDeviceImpl.java:190)
        at android.os.Handler.handleCallback(Handler.java:942)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loopOnce(Looper.java:240)
        at android.os.Looper.loop(Looper.java:351)
        at android.os.HandlerThread.run(HandlerThread.java:67)
INFO: Renderer: direct3d
INFO: Texture: 4000x3000
@rom1v
Copy link
Collaborator

rom1v commented Nov 24, 2023

See #4392

@AravAravind AravAravind closed this as not planned Won't fix, can't repro, duplicate, stale Nov 28, 2023
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