/dev/video4 always causes munmap_chunk(): Invalid Pointer error

Asked by Whizzzkid

I am trying to record 7 webcams simultaneously. All of these webcams are Logitech c920. No matter which device is mapped to /dev/video* the device connected to /dev/video4 always gives an error. The video that's recorded is blank. All other cameras are working fine. I am totally clueless as to what is happening here, here is the memory dump:

*** Error in `guvcview': munmap_chunk(): invalid pointer: 0x00007f38f6ef0010 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f390b9787e5]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x1a8)[0x7f390b984ae8]
/usr/lib/x86_64-linux-gnu/libgviewv4l2core-2.0.so.2(clean_v4l2_frames+0x6c)[0x7f390d9945bc]
/usr/lib/x86_64-linux-gnu/libgviewv4l2core-2.0.so.2(v4l2core_clean_buffers+0x3a)[0x7f390d98d60a]
/usr/lib/x86_64-linux-gnu/libgviewv4l2core-2.0.so.2(v4l2core_close_dev+0x1a)[0x7f390d98d70a]
guvcview[0x409610]
guvcview(main+0x4d6)[0x408b56]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f390b921830]
guvcview[0x409099]
======= Memory map: ========
00400000-00424000 r-xp 00000000 08:11 12069749 /usr/bin/guvcview
00623000-00624000 r--p 00023000 08:11 12069749 /usr/bin/guvcview
00624000-00626000 rw-p 00024000 08:11 12069749 /usr/bin/guvcview
01791000-01901000 rw-p 00000000 00:00 0 [heap]
7f38db542000-7f38db642000 rw-p 00000000 00:00 0
7f38e8000000-7f38e8021000 rw-p 00000000 00:00 0
7f38e8021000-7f38ec000000 ---p 00000000 00:00 0
7f38ec02b000-7f38ec4aa000 rw-p 00000000 00:00 0
7f38f0000000-7f38f00a2000 rw-p 00000000 00:00 0
7f38f00a2000-7f38f4000000 ---p 00000000 00:00 0
7f38f4009000-7f38f433a000 rw-p 00000000 00:00 0
7f38f4a27000-7f38f4a28000 ---p 00000000 00:00 0
7f38f4a28000-7f38f5228000 rw-p 00000000 00:00 0
7f38f5228000-7f38f5229000 ---p 00000000 00:00 0
7f38f5229000-7f38f5a29000 rw-p 00000000 00:00 0
7f38f5a29000-7f38f5e1e000 rw-s 00bdf000 00:06 17915 /dev/video4
7f38f5e1e000-7f38f6213000 rw-s 007ea000 00:06 17915 /dev/video4
7f38f6213000-7f38f6608000 rw-s 003f5000 00:06 17915 /dev/video4
7f38f6608000-7f38f69fd000 rw-s 00000000 00:06 17915 /dev/video4
7f38f69fd000-7f38f70eb000 rw-p 00000000 00:00 0
7f38f70eb000-7f38f70ec000 ---p 00000000 00:00 0
7f38f70ec000-7f38f78ec000 rw-p 00000000 00:00 0
7f38f78ec000-7f38f7bb5000 r--p 00000000 08:11 12067426 /usr/lib/locale/locale-archive
7f38f7bb5000-7f38f7bc7000 r-xp 00000000 08:11 8655305 /lib/x86_64-linux-gnu/libgpg-error.so.0.17.0
7f38f7bc7000-7f38f7dc7000 ---p 00012000 08:11 8655305 /lib/x86_64-linux-gnu/libgpg-error.so.0.17.0
7f38f7dc7000-7f38f7dc8000 r--p 00012000 08:11 8655305 /lib/x86_64-linux-gnu/libgpg-error.so.0.17.0
7f38f7dc8000-7f38f7dc9000 rw-p 00013000 08:11 8655305 /lib/x86_64-linux-gnu/libgpg-error.so.0.17.0
....
....
....
7f390ddb2000-7f390ddb6000 rw-p 00000000 00:00 0
7f390ddc7000-7f390ddc8000 rw-p 00000000 00:00 0
7f390ddc8000-7f390ddcf000 r--s 00000000 08:11 12191447 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache
7f390ddcf000-7f390ddd1000 rw-p 00000000 00:00 0
7f390ddd1000-7f390ddd2000 r--p 00025000 08:11 8655237 /lib/x86_64-linux-gnu/ld-2.23.so
7f390ddd2000-7f390ddd3000 rw-p 00026000 08:11 8655237 /lib/x86_64-linux-gnu/ld-2.23.so
7f390ddd3000-7f390ddd4000 rw-p 00000000 00:00 0
7ffea3510000-7ffea3531000 rw-p 00000000 00:00 0 [stack]
7ffea35a2000-7ffea35a4000 r--p 00000000 00:00 0 [vvar]
7ffea35a4000-7ffea35a6000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]

I am using guvcview something like this:
guvcview \
        --device=$i \
        --verbosity=2 \
        --audio=none \
        --resolution=1920x1080 \
        --format=H264 \
        --fps=30 \
        --video_codec=RAW \
        --video=$OUT/$FILE.mp4 \
        --video_timer=30 \
        --render=none \
        --render_window=none \
        --gui=none \
        --exit_on_term \
        >> $OUT/$FILE.log 2>&1

Question information

Language:
English Edit question
Status:
Expired
For:
guvcview Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
Whizzzkid (whizzzkid) said :
#1

The problem lies with the profiles created for each /dev/video* device in ~/.config/guvcview2/ if anyone one of this config file has a setting which prevents the video being recorded e.g. I had "pieces" filter enabled in the profile for /dev/video4 and this prevented recording in the requested format. I think guvcview should overwrite these configs every time it launches or map these configs by device serial id instead of mount points.

for me a simple solution was to delete these configs every time I started recording.

Revision history for this message
Whizzzkid (whizzzkid) said :
#2

The problem lies with the profiles created for each /dev/video* device in ~/.config/guvcview2/ if anyone one of this config file has a setting which prevents the video being recorded e.g. I had "pieces" filter enabled in the profile for /dev/video4 and this prevented recording in the requested format. I think guvcview should overwrite these configs every time it launches or map these configs by device serial id instead of mount points.

for me a simple solution was to delete these configs every time I started recording.

Revision history for this message
Launchpad Janitor (janitor) said :
#3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.