[mythtv] Re: segfault with mythepg and problem with mythfilldatabase

Andrew M. Bishop mythtv-dev@snowman.net
22 Oct 2002 17:27:44 +0100


Daniel Paessler <daniel@paessler.org> wrote:

> i'm running a gentoo system and tried the version 0.6 and also
> the latest cvs of mythtv. i have problems using mythepg, it always
> crashes with a segmentation fault, no idea why...

The crash could be because of an empty program database.

> another thing is mythfilldatabase...it always tells me, that tv_grab_de
> is not working, i'd like to use the german tv-listings, guess why ;-)
> can i make this work?
> it's today the first time for me to try using mythtv, screenshots are
> looking great...
> would be nice if anyone can help or someone has any suggestions

It was me that added the code to use a different XMLTV program from
the tv_grab_na that Isaac was using for North America.  I added in the
ability to use tv_grab_uk.  There are some differences with the two
programs, for example tv_grab_na accepts a --offset option that
tv_grab_uk does not.

The tv_grab_de program does not seem to accept a --config-file option
which the tv_grab_na and tv_grab_uk programs do.  This is a big
problem since it is how MythTV knows which programs to get for each
input source.

the file MC/programs/mythfilldatabase/filldata.cpp contains the following:

-------------------- filldata.cpp --------------------
    if (offset >= 0)
        command.sprintf("nice -19 %s --days 1 --offset %d --config-file %s "
                        "--output %s", xmltv_grabber.ascii(),
                        offset, configfile.ascii(), filename.ascii());
    else
        command.sprintf("nice -19 %s --days 7 --config-file %s --output %s",
                        xmltv_grabber.ascii(), configfile.ascii(), 
                        filename.ascii());
-------------------- filldata.cpp --------------------

I think that you want to replace this with

-------------------- filldata.cpp --------------------
    if (xmltv_grabber == "tv_grab_uk")
        command.sprintf("nice -19 %s --days 7 --config-file %s --output %s",
                        xmltv_grabber.ascii(), configfile.ascii(), 
                        filename.ascii());
    else if (xmltv_grabber == "tv_grab_de")
        command.sprintf("nice -19 %s --days 7 --output %s",
                        xmltv_grabber.ascii(),
                        filename.ascii());
    else
        command.sprintf("nice -19 %s --days 1 --offset %d --config-file %s "
                        "--output %s", xmltv_grabber.ascii(),
                        offset, configfile.ascii(), filename.ascii());
-------------------- filldata.cpp --------------------

also try replacing

-------------------- filldata.cpp --------------------
    if (xmltv_grabber == "tv_grab_uk")
    {
        // tv_grab_uk doesn't support the --offset option, so just grab a week.
        for (it = sourcelist.begin(); it != sourcelist.end(); ++it)
             grabData(*it, xmltv_grabber, -1);
    }
-------------------- filldata.cpp --------------------

with

-------------------- filldata.cpp --------------------
    if (xmltv_grabber == "tv_grab_uk" || xmltv_grabber == "tv_grab_de")
    {
        // tv_grab_uk/de don't support the --offset option, so just grab a week.
        for (it = sourcelist.begin(); it != sourcelist.end(); ++it)
             grabData(*it, xmltv_grabber, -1);
    }
-------------------- filldata.cpp --------------------

If this works then we can generate a proper patch.

You probably want to run the mythfilldatabase program with the
--manual option the first time to let you edit the details.


Also you need to run the setup program (setup/main.cpp), try replacing

-------------------- main.cpp --------------------
        QString command = xmltv_grabber + " --configure --config-file " + 
                          filename;
-------------------- main.cpp --------------------

with

-------------------- main.cpp --------------------
        QString command = xmltv_grabber;
-------------------- main.cpp --------------------

as a temporary fix.

Run this before you run the mythfilldatabase program.


-- 
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop                             amb@gedanken.demon.co.uk
                                      http://www.gedanken.demon.co.uk/