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

CameraAccessException / Error configuring streams: Broken pipe #17

Open
janusw opened this issue Mar 4, 2024 · 6 comments
Open

CameraAccessException / Error configuring streams: Broken pipe #17

janusw opened this issue Mar 4, 2024 · 6 comments
Labels
bug Something isn't working OS:Android

Comments

@janusw
Copy link
Owner

janusw commented Mar 4, 2024

Another exception that I see occasionally with v1.4.7 (apparently when turning off and on the camera too quickly) ...

Android.Hardware.Camera2.CameraAccessException: CAMERA_ERROR (3): endConfigure:766: Camera 0: Error configuring streams: Broken pipe (-32) ---> Java.Lang.RuntimeException: endConfigure:766: Camera 0: Error configuring streams: Broken pipe (-32)
  at android.os.ServiceSpecificException: endConfigure:766: Camera 0: Error configuring streams: Broken pipe (-32) (code 10)
  at at android.os.Parcel.createExceptionOrNull(Parcel.java:3083)
  at at android.os.Parcel.createException(Parcel.java:3053)
  at at android.os.Parcel.readException(Parcel.java:3036)
  at at android.os.Parcel.readException(Parcel.java:2978)
  at at android.hardware.camera2.ICameraDeviceUser$Stub$Proxy.endConfigure(ICameraDeviceUser.java:723)
  at at android.hardware.camera2.impl.ICameraDeviceUserWrapper.endConfigure(ICameraDeviceUserWrapper.java:116)
  at at android.hardware.camera2.impl.CameraDeviceImpl.configureStreamsChecked(CameraDeviceImpl.java:521)
  at at android.hardware.camera2.impl.CameraDeviceImpl.createCaptureSessionInternal(CameraDeviceImpl.java:736)
  at at android.hardware.camera2.impl.CameraDeviceImpl.createCaptureSession(CameraDeviceImpl.java:682)
  at at crc640214d1d92795583c.MauiCameraView_MyCameraStateCallback.n_onOpened(Native Method)
  at at crc640214d1d92795583c.MauiCameraView_MyCameraStateCallback.onOpened(MauiCameraView_MyCameraStateCallback.java:40)
  at at android.hardware.camera2.impl.CameraDeviceImpl$1.run(CameraDeviceImpl.java:173)
  at at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  at at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
  at at java.lang.Thread.run(Thread.java:1012)
  --- End of inner exception stack trace ---
  at Java.Interop.JniEnvironment.InstanceMethods.CallVoidMethod(JniObjectReference instance, JniMethodInfo method, JniArgumentValue* args) in /Users/runner/work/1/s/xamarin-android/external/Java.Interop/src/Java.Interop/obj/Release/net7.0/JniEnvironment.g.cs:20370
  at Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeVirtualVoidMethod(String encodedMember, IJavaPeerable self, JniArgumentValue* parameters) in /Users/runner/work/1/s/xamarin-android/external/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods_Invoke.cs:66
  at Android.Hardware.Camera2.CameraDevice.CreateCaptureSession(SessionConfiguration config) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net8.0/android-34/mcw/Android.Hardware.Camera2.CameraDevice.cs:470
  at at Camera.MAUI.Platforms.Android.MauiCameraView.StartPreview()
  at at Camera.MAUI.Platforms.Android.MauiCameraView.MyCameraStateCallback.OnOpened(CameraDevice camera)
  at Android.Hardware.Camera2.CameraDevice.StateCallback.n_OnOpened_Landroid_hardware_camera2_CameraDevice_(IntPtr jnienv, IntPtr native__this, IntPtr native_camera) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net8.0/android-34/mcw/Android.Hardware.Camera2.CameraDevice.cs:174
  at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPL_V(_JniMarshal_PPL_V callback, IntPtr jnienv, IntPtr klazz, IntPtr p0) in /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:125
  at android.hardware.camera2.CameraAccessException: CAMERA_ERROR (3): endConfigure:766: Camera 0: Error configuring streams: Broken pipe (-32)
  at at android.hardware.camera2.CameraManager.throwAsPublicException(CameraManager.java:2022)
  at at android.hardware.camera2.impl.ICameraDeviceUserWrapper.endConfigure(ICameraDeviceUserWrapper.java:119)
  at at android.hardware.camera2.impl.CameraDeviceImpl.configureStreamsChecked(CameraDeviceImpl.java:521)
  at at android.hardware.camera2.impl.CameraDeviceImpl.createCaptureSessionInternal(CameraDeviceImpl.java:736)
  at at android.hardware.camera2.impl.CameraDeviceImpl.createCaptureSession(CameraDeviceImpl.java:682)
  at at crc640214d1d92795583c.MauiCameraView_MyCameraStateCallback.n_onOpened(Native Method)
  at at crc640214d1d92795583c.MauiCameraView_MyCameraStateCallback.onOpened(MauiCameraView_MyCameraStateCallback.java:40)
  at at android.hardware.camera2.impl.CameraDeviceImpl$1.run(CameraDeviceImpl.java:173)
  at at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  at at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
  at at java.lang.Thread.run(Thread.java:1012)
  at Caused by: android.os.ServiceSpecificException: endConfigure:766: Camera 0: Error configuring streams: Broken pipe (-32) (code 10)
  at at android.os.Parcel.createExceptionOrNull(Parcel.java:3083)
  at at android.os.Parcel.createException(Parcel.java:3053)
  at at android.os.Parcel.readException(Parcel.java:3036)
  at at android.os.Parcel.readException(Parcel.java:2978)
  at at android.hardware.camera2.ICameraDeviceUser$Stub$Proxy.endConfigure(ICameraDeviceUser.java:723)
  at at android.hardware.camera2.impl.ICameraDeviceUserWrapper.endConfigure(ICameraDeviceUserWrapper.java:116)
  at ... 9 more

@andreea-buzuriu
Copy link

I can also reproduce this issue. Did you find any workaround?

@walnut-co
Copy link

any update on this ?

@janusw
Copy link
Owner Author

janusw commented Nov 15, 2024

any update on this ?

Unfortunately not. Do you still see this with v1.4.9? And do you have a reproduction procedure to trigger this error?

@janusw janusw added the bug Something isn't working label Nov 15, 2024
@walnut-co
Copy link

still happens i believe

image

@mlyrstad
Copy link

We have the same problem in a production app.
Here's a link to a discussion I found while googling the problem, apparently a couple of causes for the problem listed - who knows how reliable this info is though.
https://stackoverflow.com/questions/62070987/cameraaccessexception-broken-pipe-while-starting-camera-session

@mlyrstad
Copy link

Add.: There is a claim by our support team that this seems to happen only with Pixel or OnePlus phones. How does this claim match up to any of you guys' experience?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working OS:Android
Projects
None yet
Development

No branches or pull requests

4 participants