• Bug#1108416: zbarcam: Invalid argument in zbar_processor_init()

    From Jochen Sprickerhof@1:229/2 to All on Thu Jul 3 15:20:01 2025
    From: [email protected]

    Control: severity -1 important

    * Kim Alvefur <[email protected]> [2025-07-03 14:56]:
    On Mon, Jun 30, 2025 at 08:13:31PM +0200, Jochen Sprickerhof wrote:
    I tried to reproduce your bug but for me zbarcam works without
    problem. Can you give some more information about the camera you
    used?

    It's one of the built-in cameras on a TravelMate Spin B311R-31

    $ sudo lshw
    (snip)
    *-usb:0
    description: Video
    product: 5MP World Facing
    vendor: Chicony Electronics Co.,Ltd.
    physical id: 2
    bus info: usb@1:2
    version: 62.27
    serial: 0001
    capabilities: usb-2.01
    configuration: driver=uvcvideo maxpower=500mA speed=480Mbit/s *-usb:1
    description: Video
    product: HD User Facing
    vendor: SunplusIT Inc
    physical id: 7
    bus info: usb@1:7
    version: 0.04
    capabilities: usb-2.01
    configuration: driver=uvcvideo maxpower=500mA speed=480Mbit/s
    (snip)

    Anything other information that may be relevant?

    Interesting, can you try with the other camera? Probably

    zbarcam /dev/video1

    I imagine this could also be something in the kernel rather than in zbar-tools >but I haven't looked into that yet.

    you can try:

    mpv av://v4l2:/dev/video0

    to test.

    Cheers Jochen

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCgAdFiEEc7KZy9TurdzAF+h6W//cwljmlDMFAmhmgyEACgkQW//cwljm lDPgABAAjPiBghIT6lTHvsTZwO77AGzaQf5BTX3kcX1rX5vUMAJ56j+bnTvoVKZX B71FogFbzFjEi8zoibqUfoZpj6UGZ821U0GWUt3lZfQLn3nLLNzXg/CkgikDl8yt u2Mxb94c/dhmFDKX3dfVk6Uht94+ac4y3raRDa8K4D5V3xdjCYIXeiWYiANX2U75 gl4xXB9YCIZIz7yn8x3RU3/GHJ6MQ2Mk1kMZTjnZ9ZrqoVFwKEhbMB1KMjdb+in4 DNZQgB5ab7VZfEE2oU/Vsqd6weBqVw7dj/8xTfl8u0QoqMj2bW+gqWdMVP6DUbHP Um+xWvDz2BAEWu6f7bYJ8Xms4cyQO4VLhh0jc1W/LXAG6WaaEeahq7L2AOpZmDbF HxSoO9jisKRC5CREkqPQrRCmW5hyF3yjuPcW7mxRhAe9O1JY9MNYGwWHfBsbp2Nz 1Rz7UZiW03AoJMz20YTyql5cEZTc/4kuPOXMqSRwcSvCrVw+pkf9UaA7qGqIzVgl SfjJAkr24ms9CYU2ElwtUfbxcqrT5pUBieW7Qm8HJoCQ+96KzhNWhU80r0Q6bMKn vXxaDvLj2TvRnRbTp7dexb1JGp3kFa6CoaKRMDC3ESCDSbigkhlBjji2dTmC8Gcs D0vIQuJeiYogFuWopPwKAL8xVGqPuBGG/mVfQDudQAna3/ZLbvU=
    =9fu1
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Kim Alvefur@1:229/2 to Jochen Sprickerhof on Thu Jul 3 15:00:01 2025
    From: [email protected]

    Hi Jochen,

    On Mon, Jun 30, 2025 at 08:13:31PM +0200, Jochen Sprickerhof wrote:
    I tried to reproduce your bug but for me zbarcam works without
    problem. Can you give some more information about the camera you used?

    It's one of the built-in cameras on a TravelMate Spin B311R-31

    $ sudo lshw
    (snip)
    *-usb:0
    description: Video
    product: 5MP World Facing
    vendor: Chicony Electronics Co.,Ltd.
    physical id: 2
    bus info: usb@1:2
    version: 62.27
    serial: 0001
    capabilities: usb-2.01
    configuration: driver=uvcvideo maxpower=500mA speed=480Mbit/s
    *-usb:1
    description: Video
    product: HD User Facing
    vendor: SunplusIT Inc
    physical id: 7
    bus info: usb@1:7
    version: 0.04
    capabilities: usb-2.01
    configuration: driver=uvcvideo maxpower=500mA speed=480Mbit/s
    (snip)

    Anything other information that may be relevant?


    Also:

    * Kim Alvefur <[email protected]> [2025-06-27 23:49]:
    Output of `strace -o zbar.trace zbarcam` below.

    This does not include threads, can you you run it again with -ff?

    See attached.

    * Kim Alvefur <[email protected]> [2025-06-28 00:18]:
    Output of `zbarcam --verbose`:

    _zbar_video_open: opened camera device /dev/video0 (fd=5)
    _zbar_v4l2_probe: 5MP World Facing: 5MP World Fac on usb-0000:00:15.0-2 driver uvcvideo (version 6.12.29)
    _zbar_v4l2_probe: capabilities: CAPTURE READWRITE STREAMING >>v4l2_reset_crop: crop bounds: 2560 x 1920 @ (0, 0)

    I wonder if this due to the image size.

    * Kim Alvefur <[email protected]> [2025-06-27 23:49]:
    Package: zbar-tools
    Version: 0.23.93-8
    Severity: grave

    Given that zbar-tools is more then zbarcam and that it works for me,
    would you be ok with downgrading this to important?

    Sure.

    I imagine this could also be something in the kernel rather than in zbar-tools but I haven't looked into that yet.

    --
    Cool Northern Regards,
    Kim "Zash" Alvefur

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Kim Alvefur@1:229/2 to Jochen Sprickerhof on Thu Jul 3 17:40:02 2025
    From: [email protected]

    On Thu, Jul 03, 2025 at 03:18:28PM +0200, Jochen Sprickerhof wrote: >Interesting, can you try with the other camera? Probably

    zbarcam /dev/video1

    $ for dev in /dev/video*; do echo == $dev ==; zbarcam $dev; done
    == /dev/video0 ==
    ERROR: zbar processor in zbar_processor_init():
    system error: spawning input thread: Invalid argument (22)
    == /dev/video1 ==
    WARNING: zbar processor in _zbar_v4l2_probe():
    unsupported request: v4l2 device does not support usable CAPTURE
    == /dev/video2 ==
    ERROR: zbar processor in zbar_processor_init():
    system error: spawning input thread: Invalid argument (22)
    == /dev/video3 ==
    WARNING: zbar processor in _zbar_v4l2_probe():
    unsupported request: v4l2 device does not support usable CAPTURE

    I imagine this could also be something in the kernel rather than in zbar-tools
    but I haven't looked into that yet.

    you can try:

    mpv av://v4l2:/dev/video0

    to test.

    mpv manages to show video from the even-numbered devices but the fps is *very* low

    (quit after a few seconds)

    $ mpv av://v4l2:/dev/video0
    client removed during hook handling
    ● Video --vid=1 (rawvideo 1600x1200 5 fps)
    [autoconvert] Converting yuyv422 -> yuv422p
    VO: [gpu] 1600x1200 yuv422p
    [ffmpeg/demuxer] video4linux2,v4l2: Some buffers are still owned by the
    caller on close.
    V: 00:00:03 / 00:00:04 (85%)
    Exiting... (Quit)
    ioctl(VIDIOC_QBUF): Bad file descriptor
    ~$ mpv av://v4l2:/dev/video2
    ● Video --vid=1 (rawvideo 1280x720 10 fps)
    [autoconvert] Converting yuyv422 -> yuv422p
    VO: [gpu] 1280x720 yuv422p
    [ffmpeg/demuxer] video4linux2,v4l2: Some buffers are still owned by the
    caller on close.
    V: 00:00:04 / 00:00:04 (84%)
    Exiting... (Quit)
    ioctl(VIDIOC_QBUF): Bad file descriptor
    ioctl(VIDIOC_QBUF): Bad file descriptor
    ioctl(VIDIOC_QBUF): Bad file descriptor
    ioctl(VIDIOC_QBUF): Bad file descriptor
    ioctl(VIDIOC_QBUF): Bad file descriptor
    ioctl(VIDIOC_QBUF): Bad file descriptor
    ioctl(VIDIOC_QBUF): Bad file descriptor
    ioctl(VIDIOC_QBUF): Bad file descriptor

    The odd-numbered devices...

    $ mpv av://v4l2:/dev/video1
    client removed during hook handling
    [ffmpeg/demuxer] video4linux2,v4l2: ioctl(VIDIOC_G_INPUT): Inappropriate ioctl for device
    [lavf] avformat_open_input() failed
    Failed to recognize file format.
    Exiting... (Errors when loading file)
    ~$ mpv av://v4l2:/dev/video3
    [ffmpeg/demuxer] video4linux2,v4l2: ioctl(VIDIOC_G_INPUT): Inappropriate ioctl for device
    [lavf] avformat_open_input() failed
    Failed to recognize file format.
    Exiting... (Errors when loading file)

    --
    Kim "Zash" Alvefur

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Jochen Sprickerhof@21:1/5 to All on Fri Jul 4 10:10:01 2025
    * Kim Alvefur <[email protected]> [2025-07-03 17:30]:
    I imagine this could also be something in the kernel rather than in zbar-tools
    but I haven't looked into that yet.

    you can try:

    mpv av://v4l2:/dev/video0

    to test.

    mpv manages to show video from the even-numbered devices but the fps is *very* low

    Given that, did you find any other program that worked with the video
    devices? Maybe it is a bug in the kernel driver after all.

    Cheers Jochen

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCgAdFiEEc7KZy9TurdzAF+h6W//cwljmlDMFAmhnitcACgkQW//cwljm lDMCtw//TZxex1A9ocP9KD/3WkTuE9LBJPUAd/jV3uVGCWK409VfRkuSZQfWzIdc ailka4rDZddtKOKXCLVD2+mzBmSw7BeFrMHVigSVfkPySdwyPN2PueZefGu34sfS Z2CzSAI3v7jrOpEaNgMzfsd4tq1tgMto955KwCQLqOjjFbT9VU9j/6Fq8HFWN/c2 yoVsnZ7ECWy5BhswyVUgu3u5+l5uiqNIf9/QauKN7byeqAJl9o1ibOEOW3rvUTnL VkkE3xSNMNW0ZgKvuxb+aVrgpxPkSMNB9C0bHqTEFH+eogFfk4GVnQX6rzyNQrw8 KrUUD871+sqJQyMP3/F2QtZdRFqYyqStH6IiLKnTVykglI8xE/L1w2E6vUKGNpNj h8bU59DdtUkh5iR2L7JOQJbAt6splLBCT+p/ivTDnWxCZw9HAGUv5yLpY5gPAB14 E1YwT3GKfSJRWJALNkw9659tJkjXbpJsm/puxTQ76PcveVOz8Ont5nWnWsLR3DtV u4neho5HX0mzjcRe8/jp+miNp5RJR99JePrs6qRL1s5KNNU5QgZPGMMON6qhAWNT c1XltxyS9eiZg9v/npNof/zVvujjqH27uGMHnM9CyuayRhpLDaR6Kw6c3qnTxJTh 3cJM8IFCfSlJgt62y+73EvbGjRqx4AY8p3T8y03Z1WdYbmn83oc=
    =F/6S
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kim Alvefur@21:1/5 to Jochen Sprickerhof on Tue Jul 8 13:10:01 2025
    On Fri, Jul 04, 2025 at 10:03:42AM +0200, Jochen Sprickerhof wrote:
    mpv manages to show video from the even-numbered devices but the fps is *very* low

    Given that, did you find any other program that worked with the video >devices? Maybe it is a bug in the kernel driver after all.

    Cheese seems to work just fine, as does Firefox.
    I will try downgrading the kernel.

    --
    Kim "Zash" Alvefur

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)