# VOXL-MAVCAM-MANAGER crashes on MAV_CMD_VIDEO_START_CAPTURE mavlink command when trying to record video

Source: https://forum.modalai.com/topic/3666/voxl-mavcam-manager-crashes-on-mav_cmd_video_start_capture-mavlink-command-when-trying-to-record-video
Category: VOXL SDK and Software (https://forum.modalai.com/category/47/voxl-sdk-and-software)
Posted: 2024-07-23 17:29:24 UTC by AndriiHlyvko
Replies: 2 · Views: 1205

## AndriiHlyvko · 2024-07-23 17:29:24 UTC

Hi, I am trying to use the voxl-mavcam-manager to record videos on voxl by sending mavlink MAV_CMD_VIDEO_START_CAPTURE to it. I already successfully had sent MAV_CMD_IMAGE_START_CAPTURE commands and was able to capture snapshots. However, when I send the MAV_CMD_VIDEO_START_CAPTURE it crashes the voxl-mavcam-manager with a segfault. Has anyone experienced this before? 

Here is the debug output from voxl-mavcam-manager:

```
Connected to video pipe hires_large_encoded
ERROR channel 0 helper tried to read into NULL buffer
ERROR channel 0 helper tried to read into NULL buffer
ERROR channel 0 helper tried to read into NULL buffer
starting new video: /data/video/video_2024-05-14_19:33:14.h265
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 85 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: 3 of 3 packets failed
last magic number received was 128, expected MAVLINK_STX=253
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 1896 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 1734 bytes, but it should be a multiple of 44

ERROR: invalid metadata, magic number=-805240319, expected 1448040524
most likely client fell behind and pipe overflowed
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 1682 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 1494 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
........
read 832 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 731 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 705 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 682 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 656 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 681 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 650 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 687 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 675 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 642 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 889 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 813 bytes, but it should be a multiple of 44
lMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsg array is nullMsgERROR validating mavlink_message_t data received through pipe: read partial packet
read 781 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 774 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 769 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 805 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 740 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 679 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 615 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 634 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 667 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 561 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 635 bytes, but it should be a multiple of 44
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 4570 bytes, but it should be a multiple of 44

ERROR: invalid metadata, magic number=-1912241965, expected 1448040524
most likely client fell behind and pipe overflowed
ERROR validating mavlink_message_t data received through pipe: read partial packet
read 192 bytes, but it should be a multiple of 44

Segmentation fault:
Fault thread: voxl-mavcam-man(tid: 2626)
Fault address: 0x4fd00000399
Address not mapped.
Segmentation fault
```

## Reply by Eric Katzfey (ModalAI staff) · 2024-07-24 15:40:26 UTC

@AndriiHlyvko What drone are you using? What SDK version are you using?

## Reply by AndriiHlyvko · 2024-07-24 17:03:28 UTC (in reply to Eric Katzfey)

@Eric-Katzfey I figured out the problem. I changed the mavlink pipe to mavlink_onboard keeping the channel number as 1. Setting the channel number as 2 seems to fix the problem. I haven't looked into the implementation of modal-pipe architecture but I thought that the channel number is just used by the client of the pipe (kind of like an open file descriptor number?). Basically it looks like having the channel number as 1 breaks the mavlink pipe somehow.
