DVL companion latest update camera and webui problem

Hi.

After the last update 0.0.28 DVL version we have had some problems with the camera and webgui.

Current git: revert-point-5-g6abbfbe

The error from video script is:

Additional debug info:
gstv4l2bufferpool.c(1058): gst_v4l2_buffer_pool_poll (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
poll error 1: Invalid argument (22)
Execution ended after 0:00:02.312464647
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

It repeating the same over and over again. The camere feed is on and off in QGC.

The webui stopped also seems to be related to the camera problem.

When i started it:

2021-09-17T12:35:58+0000 <log> index.js:13 (Object.<anonymous>) COMPANION_DIR /home/pi/companion
2021-09-17T12:35:58+0000 <log> index.js:14 (Object.<anonymous>) HOME_DIR /home/pi
2021-09-17T12:35:59+0000 <log> index.js:114 (Object.<anonymous>) error loading video profiles from file { [Error: ENOENT: no such file or directory, open '/home/pi/camera-profiles']
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/pi/camera-profiles' }
2021-09-17T12:35:59+0000 <log> index.js:125 (Object.<anonymous>) error loading file { [Error: ENOENT: no such file or directory, open '/home/pi/camera-settings']
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/pi/camera-settings' }

And when it crashed.

2021-09-17T12:37:37+0000 <log> index.js:1275 (Socket.<anonymous>) get companion version
2021-09-17T12:37:37+0000 <log> index.js:1277 () nullrevert-point-5-g6abbfbe

2021-09-17T12:37:37+0000 <log> index.js:1487 () The file was loaded!
2021-09-17T12:37:37+0000 <log> index.js:823 (Socket.<anonymous>) get v4l2 cameras
2021-09-17T12:37:37+0000 <log> index.js:830 () getting control: Brightness int
/home/pi/companion/br-webui/index.js:831
                                                control.value = cam.controlGet(control.id);
                                                                    ^

Error: CAMERA ERROR [VIDIOC_G_CTRL] 19 No such device
    at Error (native)
    at /home/pi/companion/br-webui/index.js:831:27
    at Array.forEach (native)
    at /home/pi/companion/br-webui/index.js:828:17
    at Array.forEach (native)
    at Socket.<anonymous> (/home/pi/companion/br-webui/index.js:826:12)
    at emitNone (events.js:80:13)
    at Socket.emit (events.js:179:7)
    at /home/pi/companion/br-webui/node_modules/socket.io/lib/socket.js:503:12
    at nextTickCallbackWith0Args (node.js:453:9)

I just tried updating to the dvl branch (from 0.0.28), and mine comes up in the header as “Companion Version: 0.0.28-23-g6abbfbe” - the video stream and webui both seem to work fine. Willian also thought it was odd that yours is mentioning a revert-point, so perhaps the updating process wasn’t fully successful?

There have been some weird issues lately where various installation servers (of all sorts) seem to be randomly going down in different parts of the world, which has been giving us grief even when trying to update/install a bunch of general software/packages on our normal computers.

For the relation to companion, it’s possible that our updater may not always correctly identify that part of an update that’s making use of a (normally highly reliable) package manager has failed, in which case it could think it’s completed an update that actually only partially succeeded. Unfortunately the only real options for dealing with that are either flashing a known working image, or trying the update again and hoping it finds and fixes the problem (that should at least be quick to try, since the ‘already-installed’ components won’t need to install again).

We’re currently working on a major rewrite of companion that’s more modular, and should be more robust to update, but understandably that can’t be made available until it’s feature-complete.

On the actual error,

from a quick search this seems difficult to find much meaningful information on, and is reasonably deep into gstreamer land, which gets complicated really fast. If you’re not using an unusual camera then I’d expect this is some odd version mismatch that’s causing an unexpected compatibility bug, that seems to be repeatedly crashing/disconnecting the camera.

If it’s relevant, the camera-settings and camera-profiles files don’t get created until you actually change the settings or create a profile.

Given the repeated camera disconnects, not too surprising that the webui ended up in an unhappy state - presumably it connected to the camera, then later tried to use that connection (to get the settings controls it seems), and by then the camera connection had failed so the request didn’t get to anywhere meaningful.

The image on ardusub.com, is that the latest? A date on when the link has been updated and git version have been great information to have on the ardusub.com.

It seems like the problem was a faulty SD card. It failed when I flashed the latest version of ardusub in Etcher. The speed was around 0.70 mb/s - 2 mb/s.

A new SD card did the job :slight_smile:

1 Like