Your message dated Mon, 16 Oct 2017 20:32:44 +0200
with message-id <20171016183241.2mtvhcbqkzr6s...@mapreri.org>
and subject line Re: Bug#735528: opencv: segfault on reading some video
has caused the Debian Bug report #735528,
regarding opencv: segfault on reading some video
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
735528: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735528
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Source: opencv
Version: 2.4.6
Severity: important

With some video files, the following command leads to segfault:
python -c "import cv2; vid = cv2.VideoCapture('some_video ');
vid.read()"

It occurs from python, but also using C++ library.

Example of backtrace in gdb
        #0  0x00007fffeca1a814 in rgb32tobgr24_MMXEXT (src=0x7fffdf7ab080 
<Address 0x7fffdf7ab080 out of bounds>,    dst=0x7fffdf0eb010 "", 
src_size=<optimized out>) at 
/build/libav-RgBsVf/libav-9.10/libswscale/x86/rgb2rgb_template.c:155
        #1  0x00007fffeca13da3 in rgbToRgbWrapper (c=0x10ac0e0, src=<optimized 
out>, srcStride=0x7fffffffda80, srcSliceY=0, srcSliceH=500, dst=0x7fffffffdac0, 
dstStride=0x7fffffffda90) at 
/build/libav-RgBsVf/libav-9.10/libswscale/swscale_unscaled.c:592
        #2  0x00007fffeca1589d in sws_scale (c=<optimized out>, 
srcSlice=<optimized out>, srcStride=0xab2ba0, srcSliceY=0, srcSliceH=500, 
dst=<optimized out>, dstStride=0xa156a8) at 
/build/libav-RgBsVf/libav-9.10/libswscale/swscale_unscaled.c:1152
        #3  0x00007ffff526fefe in CvCapture_FFMPEG::retrieveFrame(int, unsigned 
char**, int*, int*, int*, int*) ()  from 
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4
        #4  0x00007ffff526ffab in cvRetrieveFrame_FFMPEG () from 
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4
        #5  0x00007ffff526f419 in CvCapture_FFMPEG_proxy::retrieveFrame(int) () 
from /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4
        #6  0x00007ffff526dcb9 in cv::VideoCapture::retrieve(cv::Mat&, int) () 
from /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4
        #7  0x00007ffff526daa7 in cv::VideoCapture::read(cv::Mat&) () from 
/usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4

Out of bounds address seems to be used in a call to a function from
libswscale.

Segfault occurs for at least for one uncompressed avi file
RIFF (little-endian) data, AVI, 944 x 500, 30.00 fps, video: uncompressed

but not for a compressed one
RIFF (little-endian) data, AVI, 592 x 320, 25.00 fps, video: XviD, audio:
MPEG-1 Layer 3 (stereo, 48000 Hz)

The former can be found at http://tinyurl.com/lv657fn (uncompressed,
almost 200Mo)



-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.12-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

--- End Message ---
--- Begin Message ---
On Thu, Jan 16, 2014 at 08:30:37AM +0100, Fabrice Silva wrote:
> Source: opencv
> Version: 2.4.6
> Severity: important
> 
> With some video files, the following command leads to segfault:
> python -c "import cv2; vid = cv2.VideoCapture('some_video ');
> vid.read()"

I don't know when, but this got fixed at some point.  Using the video
you linked, with the current opencv 3.2:


>>> import cv2
>>> vid = cv2.VideoCapture('Pc10000.avi')
>>> vid.read()
(True, array([[[255,   0,  22],
        [255,  16,  23],
        [255,   0,  24],
        ..., 
        [  0,  15,  18],
        [  0,   6,  20],
        [  0,  16,  20]],

       [[134,  23,  22],
        [134,  32,  23],
        [134,  23,  24],
        ..., 
        [  7,  25,  18],
        [  7,  20,  20],
        [  7,  27,  20]],

       [[ 14,  31,  22],
        [ 14,  31,  23],
        [ 14,  32,  24],
        ..., 
        [ 14,  25,  19],
        [ 14,  25,  20],
        [ 14,  26,  20]],

       ..., 
       [[ 15,  32,  23],
        [ 15,  32,  24],
        [ 15,  33,  25],
        ..., 
        [ 12,  26,  18],
        [ 11,  26,  18],
        [ 10,  26,  18]],

       [[ 15,  32,  23],
        [ 15,  32,  23],
        [ 15,  32,  24],
        ..., 
        [ 11,  24,  18],
        [ 11,  25,  17],
        [ 11,  25,  17]],

       [[ 15,  32,  23],
        [ 15,  32,  23],
        [ 15,  31,  24],
        ..., 
        [ 11,  23,  18],
        [ 11,  24,  17],
        [ 11,  25,  17]]], dtype=uint8))
>>> 



Closing.

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
more about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-

Attachment: signature.asc
Description: PGP signature


--- End Message ---
-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

Reply via email to