Bug 51291

Summary: Segfault with mplayer -vo vdpau: vlVdpVideoSurfaceClear at surface.c:366
Product: Mesa Reporter: Maxim Britov <ungift-ed>
Component: Drivers/DRI/nouveauAssignee: Nouveau Project <nouveau>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: valgrind mplayer videofile -vo vdpau >& thisfile

Description Maxim Britov 2012-06-21 04:26:44 UTC
Program received signal SIGSEGV, Segmentation fault.
vlVdpVideoSurfaceClear (vlsurf=0xb21a90) at surface.c:366


(gdb) bt full
#0  vlVdpVideoSurfaceClear (vlsurf=0xb21a90) at surface.c:366
        c = {f = {0.5, 0.5, 0.5, 0.5}, i = {1056964608, 1056964608, 1056964608, 1056964608}, ui = {1056964608, 1056964608, 1056964608, 1056964608}}
        pipe = 0xb7a610
        surfaces = 0xb21ba8
#1  0x00007fffe9b1e722 in vlVdpVideoSurfaceCreate (device=<optimized out>, chroma_type=0, width=1280, height=692, surface=<optimized out>) at surface.c:95
        pipe = 0xb7a610
        p_surf = 0xb21a90
        ret = <optimized out>
        dev = 0xb529d0
#2  0x000000000045c0fe in ?? ()
No symbol table info available.
#3  0x000000000045dc11 in ?? ()
No symbol table info available.
#4  0x00000000004b7309 in ?? ()
No symbol table info available.
#5  0x000000000048a15f in filter_video ()
No symbol table info available.
#6  0x0000000000439edf in ?? ()
No symbol table info available.
#7  0x000000000042e69f in main ()
No symbol table info available.
Comment 1 Maxim Britov 2012-06-21 05:13:37 UTC
Updated (mplayer with debuginfo):

Program received signal SIGSEGV, Segmentation fault.
vlVdpVideoSurfaceClear (vlsurf=0xb21a90) at surface.c:366
366	surface.c: Нет такого файла или каталога.
(gdb) bt full
#0  vlVdpVideoSurfaceClear (vlsurf=0xb21a90) at surface.c:366
        c = {f = {0.5, 0.5, 0.5, 0.5}, i = {1056964608, 1056964608, 1056964608, 1056964608}, ui = {1056964608, 1056964608, 1056964608, 1056964608}}
        pipe = 0xb7a610
        surfaces = 0xb21ba8
#1  0x00007fffe9b1e722 in vlVdpVideoSurfaceCreate (device=<optimized out>, chroma_type=0, width=1280, height=692, surface=<optimized out>) at surface.c:95
        pipe = 0xb7a610
        p_surf = 0xb21a90
        ret = <optimized out>
        dev = 0xb529d0
#2  0x000000000045c0fe in get_surface (number=0) at libvo/vo_vdpau.c:1012
        vdp_st = <optimized out>
#3  0x000000000045dc11 in draw_image (mpi=0xb219f0) at libvo/vo_vdpau.c:1049
        vdp_st = <optimized out>
        destdata = {0xf7caf0, 0x10a0578, 0x10653c8}
        rndr = <optimized out>
#4  control (request=13, data=0xb219f0) at libvo/vo_vdpau.c:1354
No locals.
#5  0x00000000004b7309 in put_image (vf=0xc089c0, mpi=0xb219f0, pts=<optimized out>) at libmpcodecs/vf_vo.c:168
No locals.
#6  0x000000000048a15f in filter_video (sh_video=<optimized out>, frame=<optimized out>, pts=<optimized out>) at libmpcodecs/dec_video.c:479
        mpi = <optimized out>
        t2 = 1653419733
        vf = 0xc089c0
        ret = <optimized out>
#7  0x0000000000439edf in generate_video_frame (d_video=0x8ec790, sh_video=0xb5dfa0) at mplayer.c:1812
        drop_frame = 0
        decoded_frame = 0xb219f0
        start = 0xb5e1b0 ""
        in_size = <optimized out>
        hit_eof = 0
        pts = 0.042000000000000003
#8  update_video (blit_frame=0x7fffffffd698) at mplayer.c:2487
        sh_video = 0xb5dfa0
        frame_time = <optimized out>
#9  0x000000000042e69f in main (argc=<optimized out>, argv=<optimized out>) at mplayer.c:3759
        frame_time = <optimized out>
        frame_time_remaining = 0
        blit_frame = 0
        skip_timing = 1
        aq_sleep_time = 0
        opt_exit = <optimized out>
        i = <optimized out>
Comment 2 Maxim Britov 2012-06-21 05:25:02 UTC
Created attachment 63292 [details]
valgrind mplayer videofile -vo vdpau >& thisfile
Comment 3 Ilia Mirkin 2013-08-18 19:08:06 UTC
There's a good chance that this is fixed with:

http://cgit.freedesktop.org/mesa/mesa/commit/?id=8975f83402e3f5915f3f1a27599c24d908b7706d

Of course note that vdpau still won't work for pre-nv84 cards, but it shouldn't crash quite like this. (It'll probably crash in a different way, as decode_bitstream isn't set. I did try to get it to work, but in the end, the actual decoding didn't work correctly.) More information on what ought to work is at http://nouveau.freedesktop.org/wiki/VideoAcceleration/

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.