Menu

#754 OpenCamera crashes on external cameras

1.0
closed
Mark
None
2020-11-10
2020-08-12
Anonymous
No

Hi,

I have been experimenting with external cameras (e.g. USB Video), which are supported by some devices.

External camera devices are not required to support the LENS_INFO_AVAILABLE_FOCAL_LENGTHS, SENSOR_AVAILABLE_TEST_PATTERN_MODES and SENSOR_INFO_PHYSICAL_SIZE characteristics; Google's Compatibility Test Suite specifically excludes testing for these (see https://android.googlesource.com/platform/cts/+/refs/heads/master/tests/camera/src/android/hardware/camera2/cts/ExtendedCameraCharacteristicsTest.java#1015).

When OpenCamera (version 1.48.2) hits such an external camera, it will crash with a NullPointerException in CameraControllerManager2::computeViewAngles() in line 128. The stack trace is attached.

Best Regards,
Sebastian

1 Attachments

Discussion

  • Anonymous

    Anonymous - 2020-08-17

    I can also add that when adding these fields exist in the camera HAL, then OpenCamera works okay with external cameras. However, it does not handle removal/reinsert situations well.

    (I don't have a Sourceforge account.)

    Best Regards,
    Sebastian

     
  • Mark

    Mark - 2020-08-31
    • status: open --> closed
     
  • Mark

    Mark - 2020-08-31

    Have fixed the crash for the next version - obviously it won't be possible to get view angles for the camera so will affect things reliant on that (on-screen view angles, panorama), but should at least not crash.

    It's true that it won't work very well when adding/removing such devices without restarting Open Camera. Unfortunately I don't yet have a device to test this with.

     
  • Anonymous

    Anonymous - 2020-09-22

    Thank you for the fix. I will check every once in a while and I'll test when the next binary is uploaded. Unfortunately, I don't know any public devices with external camera support.

    Best Regards,
    Sebastian

     
  • Anonymous

    Anonymous - 2020-11-05

    Hello again,

    sorry for bringing this issue up again.

    I cannot seem to find the crash fix anywhere in the source code. Did you upload it to the repository? If not, when do you intend to release a version with this fix applied?

    Best Regards,
    Sebastian

     
    • Mark

      Mark - 2020-11-08

      Sorry for the delay, I tend to only update the repository with releases now. But the next release should be soon, hopefully the next couple of weeks or so.

       
  • Anonymous

    Anonymous - 2020-11-10

    Okay, thank you.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB