Error, failed to query crop capabilities /dev/video0
Posted: Fri Dec 31, 2010 12:00 pm
Distribution: Centos 5.5 Trixbox
I have been trying to track down the cause of this error above. I have a Logitech QuickCam 4000 which works with ffstream/ffmpeg but wont work in ZoneMinder directly or via ffstream/ffmpeg.
I see some previous posts such as http://www.zoneminder.com/forums/viewtopic.php?p=59472 but no solution.
I downloaded from svn 2 days ago and using the following config directives built the packages;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=asterisk --with-webgroup=asterisk ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=xxxx --with-mysql=/usr/lib/mysql --with-extralibs="-L/usr/lib -L/usr/lib/mysql" CPPFLAGS="-D__STDC_CONSTANT_MACROS"
(The webuser and webgroup are set to asterisk as this is being built on a Trixbox machine)
The build and installation went without any (major) errors. However when I run zm
~]#service zm start
I defined a camera using ffmpeg and create a Group to view the camera. 1) There is no video
2) there is no option in the web console to view the video
and when I look at the system log I get the following;
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Failed to capture image from monitor 2 (0/1)]Dec 29 16:33:50 hans *** glibc detected *** /usr/local/bin/zmc: double free or corruption (!prev): 0x0e87e280 ***
Dec 29 16:33:50 hans ======= Backtrace: =========
Dec 29 16:33:50 hans /lib/libc.so.6[0x8f65a5]
Dec 29 16:33:50 hans /lib/libc.so.6(cfree+0x59)[0x8f69e9]
Dec 29 16:33:50 hans /usr/lib/libavformat.so.52(av_close_input_stream+0x7f)[0x492aaf]
Dec 29 16:33:50 hans /usr/lib/libavformat.so.52(av_close_input_file+0x1c)[0x492c9c]
Dec 29 16:33:50 hans /usr/local/bin/zmc[0x805d238]
Dec 29 16:33:50 hans /usr/local/bin/zmc[0x806ef16]
Dec 29 16:33:50 hans /usr/local/bin/zmc[0x804c9dc]
Dec 29 16:33:50 hans /lib/libc.so.6(__libc_start_main+0xdc)[0x8a2e9c]
Dec 29 16:33:50 hans /usr/local/bin/zmc(__gxx_personality_v0+0x3a9)[0x804c211]
Dec 29 16:33:50 hans ======= Memory map: ======== Dec 29 16:33:50 hans 00110000-00131000 r-xp 00000000 03:02 21115297 /usr/lib/libjpeg.so.62.0.0 00131000-00132000 rwxp 00020000 03:02 21115297 /usr/lib/libj
.
.
a lot of debug info
.
.
Dec 29 16:33:50 hans [stack]
Dec 29 16:33:50 hans zmc_m2[5776]: INF [Got signal 6 (Aborted), exiting and forcing backtrace]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Signal address is (nil), from 0xa4d402]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: [0xa4d402]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: [0xa4d402]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: /lib/libc.so.6(gsignal+0x50) [0x8b5df0]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: /lib/libc.so.6(abort+0x101) [0x8b7701]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: /lib/libc.so.6 [0x8ee28b]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: /lib/libc.so.6 [0x8f65a5]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: /lib/libc.so.6(cfree+0x59) [0x8f69e9]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: /usr/lib/libavformat.so.52(av_close_input_stream+0x7f) [0x492aaf]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: /usr/lib/libavformat.so.52(av_close_input_file+0x1c) [0x492c9c]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: /usr/local/bin/zmc [0x805d238]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: /usr/local/bin/zmc [0x806ef16]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: /usr/local/bin/zmc [0x804c9dc]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: /lib/libc.so.6(__libc_start_main+0xdc) [0x8a2e9c]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: /usr/local/bin/zmc(__gxx_personality_v0+0x3a9) [0x804c211]]
Dec 29 16:33:50 hans zmc_m2[5776]: INF [Backtrace complete, please execute the following command for more information]
Dec 29 16:33:50 hans zmc_m2[5776]: INF [addr2line -e /usr/local/bin/zmc(__gxx_personality_v0+0x3a9) 0xa4d402 0xa4d402 0x8b5df0 0x8b7701 0x8ee28b 0x8f65a5 0x8f69e9 0x492aaf 0x492c9c 0x805d238 0x806ef16 0x804c9dc 0x8a2e9c 0x804c211]
Dec 29 16:33:50 hans zmdc[5753]: ERR ['zmc -m 2' exited abnormally, exit status 6]
Dec 29 16:33:50 hans zmdc[5753]: INF [Starting pending process, zmc -m 2]
Dec 29 16:33:50 hans zmdc[6199]: INF ['zmc -m 2' started at 10/12/29 16:33:50]
Dec 29 16:33:50 hans zmdc[5753]: INF ['zmc -m 2' starting at 10/12/29 16:33:50, pid = 6199]
Dec 29 16:33:50 hans zmc_m2[6199]: INF [Debug Level = 0, Debug Log = <none>]
So I ran the command;
~]# addr2line -e /usr/local/bin/zmc 0x58e402 0x58e402 0x71bdf0 0x71d701 0x75428b 0x75c5a5 0x75c9e9 0x492aaf 0x492c9c 0x805d6c8 0x806f3f8 0x804ca7c 0x708e9c 0x804c2b1
And the below was the result;
??:0
??:0
??:0
??:0
??:0
??:0
??:0
??:0
??:0
/root/Zoneminder-svn/zm/src/zm_ffmpeg_camera.cpp:52
/root/Zoneminder-svn/zm/src/zm_monitor.cpp:532
/root/Zoneminder-svn/zm/src/zmc.cpp:290
??:0
??:0
From what I understand the error is due to multiple memory deallocation calls to the same memory to glibc (av_free( mFormatContext );
) from the above code.
Any help on how to proceed would be appreciated.
Richard
I have been trying to track down the cause of this error above. I have a Logitech QuickCam 4000 which works with ffstream/ffmpeg but wont work in ZoneMinder directly or via ffstream/ffmpeg.
I see some previous posts such as http://www.zoneminder.com/forums/viewtopic.php?p=59472 but no solution.
I downloaded from svn 2 days ago and using the following config directives built the packages;
./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=asterisk --with-webgroup=asterisk ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=xxxx --with-mysql=/usr/lib/mysql --with-extralibs="-L/usr/lib -L/usr/lib/mysql" CPPFLAGS="-D__STDC_CONSTANT_MACROS"
(The webuser and webgroup are set to asterisk as this is being built on a Trixbox machine)
The build and installation went without any (major) errors. However when I run zm
~]#service zm start
I defined a camera using ffmpeg and create a Group to view the camera. 1) There is no video
2) there is no option in the web console to view the video
and when I look at the system log I get the following;
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Failed to capture image from monitor 2 (0/1)]Dec 29 16:33:50 hans *** glibc detected *** /usr/local/bin/zmc: double free or corruption (!prev): 0x0e87e280 ***
Dec 29 16:33:50 hans ======= Backtrace: =========
Dec 29 16:33:50 hans /lib/libc.so.6[0x8f65a5]
Dec 29 16:33:50 hans /lib/libc.so.6(cfree+0x59)[0x8f69e9]
Dec 29 16:33:50 hans /usr/lib/libavformat.so.52(av_close_input_stream+0x7f)[0x492aaf]
Dec 29 16:33:50 hans /usr/lib/libavformat.so.52(av_close_input_file+0x1c)[0x492c9c]
Dec 29 16:33:50 hans /usr/local/bin/zmc[0x805d238]
Dec 29 16:33:50 hans /usr/local/bin/zmc[0x806ef16]
Dec 29 16:33:50 hans /usr/local/bin/zmc[0x804c9dc]
Dec 29 16:33:50 hans /lib/libc.so.6(__libc_start_main+0xdc)[0x8a2e9c]
Dec 29 16:33:50 hans /usr/local/bin/zmc(__gxx_personality_v0+0x3a9)[0x804c211]
Dec 29 16:33:50 hans ======= Memory map: ======== Dec 29 16:33:50 hans 00110000-00131000 r-xp 00000000 03:02 21115297 /usr/lib/libjpeg.so.62.0.0 00131000-00132000 rwxp 00020000 03:02 21115297 /usr/lib/libj
.
.
a lot of debug info
.
.
Dec 29 16:33:50 hans [stack]
Dec 29 16:33:50 hans zmc_m2[5776]: INF [Got signal 6 (Aborted), exiting and forcing backtrace]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Signal address is (nil), from 0xa4d402]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: [0xa4d402]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: [0xa4d402]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: /lib/libc.so.6(gsignal+0x50) [0x8b5df0]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: /lib/libc.so.6(abort+0x101) [0x8b7701]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: /lib/libc.so.6 [0x8ee28b]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: /lib/libc.so.6 [0x8f65a5]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: /lib/libc.so.6(cfree+0x59) [0x8f69e9]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: /usr/lib/libavformat.so.52(av_close_input_stream+0x7f) [0x492aaf]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: /usr/lib/libavformat.so.52(av_close_input_file+0x1c) [0x492c9c]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: /usr/local/bin/zmc [0x805d238]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: /usr/local/bin/zmc [0x806ef16]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: /usr/local/bin/zmc [0x804c9dc]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: /lib/libc.so.6(__libc_start_main+0xdc) [0x8a2e9c]]
Dec 29 16:33:50 hans zmc_m2[5776]: ERR [Backtrace: /usr/local/bin/zmc(__gxx_personality_v0+0x3a9) [0x804c211]]
Dec 29 16:33:50 hans zmc_m2[5776]: INF [Backtrace complete, please execute the following command for more information]
Dec 29 16:33:50 hans zmc_m2[5776]: INF [addr2line -e /usr/local/bin/zmc(__gxx_personality_v0+0x3a9) 0xa4d402 0xa4d402 0x8b5df0 0x8b7701 0x8ee28b 0x8f65a5 0x8f69e9 0x492aaf 0x492c9c 0x805d238 0x806ef16 0x804c9dc 0x8a2e9c 0x804c211]
Dec 29 16:33:50 hans zmdc[5753]: ERR ['zmc -m 2' exited abnormally, exit status 6]
Dec 29 16:33:50 hans zmdc[5753]: INF [Starting pending process, zmc -m 2]
Dec 29 16:33:50 hans zmdc[6199]: INF ['zmc -m 2' started at 10/12/29 16:33:50]
Dec 29 16:33:50 hans zmdc[5753]: INF ['zmc -m 2' starting at 10/12/29 16:33:50, pid = 6199]
Dec 29 16:33:50 hans zmc_m2[6199]: INF [Debug Level = 0, Debug Log = <none>]
So I ran the command;
~]# addr2line -e /usr/local/bin/zmc 0x58e402 0x58e402 0x71bdf0 0x71d701 0x75428b 0x75c5a5 0x75c9e9 0x492aaf 0x492c9c 0x805d6c8 0x806f3f8 0x804ca7c 0x708e9c 0x804c2b1
And the below was the result;
??:0
??:0
??:0
??:0
??:0
??:0
??:0
??:0
??:0
/root/Zoneminder-svn/zm/src/zm_ffmpeg_camera.cpp:52
/root/Zoneminder-svn/zm/src/zm_monitor.cpp:532
/root/Zoneminder-svn/zm/src/zmc.cpp:290
??:0
??:0
From what I understand the error is due to multiple memory deallocation calls to the same memory to glibc (av_free( mFormatContext );
) from the above code.
Any help on how to proceed would be appreciated.
Richard