[Libva] segmentation fault with vainfo

Achim Hofmann news at achim-hofmann.com
Tue Apr 19 13:11:42 PDT 2011


On Mon, 18 Apr 2011 13:09:06 +0200 (CEST), Gwenole Beauchesne wrote:

> 
> On Thu, 14 Apr 2011, Achim Hofmann wrote:
> 
>> Okay, let's have a look at the output of vainfo:
>>
>> libva: libva version 0.32.0-sds2
>> Xlib:  extension "XFree86-DRI" missing on display ":0.0".
>> libva: va_getDriverName() returns 0
>> Segmentation fault
> 
> There is a bug in va.c whereby a NULL driver_name would cause the
> function to crash, thus the application too. That's a sure thing that
> can be fixed, someone sent me a patch. However, there is another
> problem, possibly related to the driver detection code but I never could
> reproduce it.
> 
>> Do you have any idea what could be the reason for the segmentation fault
>> of vainfo? If I have to add more information, please let me know.
> 
> Please build libva with debug symbols and:
> $ gdb vainfo
> (`run')
> (`bt' when it crashes)

Here comes the backtrace for vainfo:

$ gdb --args /usr/bin/vainfo
GNU gdb (Gentoo 7.2 p1) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/bin/vainfo...done.

(gdb) run
Starting program: /usr/bin/vainfo
[Thread debugging using libthread_db enabled]
libva: libva version 0.32.0-sds2
Xlib:  extension "XFree86-DRI" missing on display ":0.0".
libva: va_getDriverName() returns 0

Program received signal SIGSEGV, Segmentation fault.
0xb7da58c3 in strlen () from /lib/libc.so.6

(gdb) bt
#0  0xb7da58c3 in strlen () from /lib/libc.so.6
#1  0xb7fa2eb3 in va_openDriver (dpy=0x80560f8, driver_name=0x0) at va.c:204
#2  0xb7fa3bb5 in vaInitialize (dpy=0x80560f8, major_version=0xbfffec68,
    minor_version=0xbfffec64) at va.c:484
#3  0x080489ff in main (argc=1, argv=0xbfffed44) at vainfo.c:114

It seems you were totally right with your first guess.
va_getDriverName(VADisplay,char**) leaves the driver_name a NULL
pointer. What about the patch you mentioned?

I would have a look at the definition of VADisplayContextP, but at the
moment I don't have any IDE installed and searching the source just with
nano takes to much time for me at the moment.

It has been quite a while since my last c/c++ projects and they all
were targeted to an evil os which must not be named at this point. So
I'll have to decide for a good IDE first and then get familiar with
glibc and how to use make/automake etc. with my projects.
...just the basics which have to be learned...

OT: Perhaps any suggestion for a good IDE from your side?

>> However, mplayer from splitted-desktop.com works like a charm without
>> any errors.
>
> The pre-built binary or something you rebuilt yourself?

I don't use any pre-build packages when I can get the source code; I'm a
Gentoo user. ;) So all apps and libs are build from source (taken from
splitted-desktop.com): libva, xvba-video and mplayer.

Of cource, when there's a update to a specific package, I do checks for
broken link-level depencies and rebuild that packages to be linked to
the new version.

Regards,
Achim Hofmann


More information about the Libva mailing list