2.0.1 segfault on start if default /dev/video0 is not webcam
A simple v4l2 full-featured video grabber
Brought to you by:
assisp
Hi,
2.0.1 segfault on start if default /dev/video0 is not webcam.
Same bug as [#3] but for the 2.0.1 branch.
The device selection window does not appear, the application segfaults (see attached log). The webcam is on /dev/video1, /dev/video0 is a capture card.
This is a problem because I can't use the desktop launcher without altering it.
Output of LANG=C guvcview --verbosity=10 is attached.
Thanks.
Hi,
/dev/video0 is the standard default video device for all v4l2 video capture software out there.
Guvcview will print a list of all video devices it can find, if it fails to initialize any given device.
The problem here is the segfault, the capture card is for all effects a v4l2 device, so it responds to v4l2 ioctls pretty much the same way a webcam does, guvcview has no way of knowing the type of device, so if VIDIOC_TRY_FMT doesn't return an error guvcview thinks it all work as expected.
In your case at least, guvcview doesn't get a valid with or height, so I'll set a check for that and consider it as a failed initialization (although the driver should really just return an error code).
Regards,
Paulo
So this should be fixed in 2.0.3
If not please reopen the ticket again.
Diff:
Reopening. Same crash with 2.0.6.
Attached log with 2.0.6 and verbosity=10.
Thanks.
Last edit: Fab 2020-08-23