[mythtv-users] length mismatch between programinfo
Michael T. Dean
mtdean at thirdcontact.com
Sun Jul 4 12:36:35 UTC 2010
On 07/03/2010 04:40 PM, Curtis Porter wrote:
> The myth box I put together for my brother-in-law cannot load its
> recording list. It was originally Ubuntu 9.10, recently upgraded to
> Ubuntu 10.04 with the standard 0.23 myth packages. It's always had
> this problem. The frontend gives the following errors:
>
> length mismatch between programinfo
> 2010-07-03 13:46:51.600 PlaybackBox Error: SortedList is Empty
> 2010-07-03 13:46:51.700 PlaybackBox Error: SortedList is Empty
>
> After searching the list archives, I found this ticket:
> http://svn.mythtv.org/trac/ticket/7467
> Which indicates that it's caused by an issue in QT 4 when invalid
> bookmarks data is encountered. As a workaround, I've put the
> following wrapper script in place to launch mythfrontend (username and
> password removed):
>
> #!/bin/bash
> mysql mythconverg -e "update recorded set bookmark=0;"
> mysql mythconverg -e "update recorded set bookmark=1;"
> mysql mythconverg -e "update recorded set bookmark=0;"
> /usr/bin/mythfrontend --service
The problem for #7467 is that something (old development MythTV, between
the 0.19 and 0.20 releases of MythTV) was setting a value for bookmark
that was neither 0 nor 1. The invalid value works fine with all
versions of MythTV, but Qt4 had a bug that causes a failure to read the
data from the database.
I just updated the ticket to mention that the Qt bug is fixed in Qt
4.6.3, so using MythTV 0.22+ with Qt 4.6.3 will prevent any issues
(caused by this Qt bug) from occurring.
> Obviously that's a hack, but it works to get his recordings loaded.
> Unfortunately as soon as a recording ends, the problem recurs, and he
> has to exit mythfrontend and run the wrapper script before recordings
> show up again.
That would that something is setting a value for bookmark that's not 0
and not 1. No code at all in MythTV does this; therefore, I'm guessing
something else is changing your database. The only code that we know of
that ever causes any illegal value to be put into the bookmark field
existed for only a 6-month period during development of 0.20-fixes.
> I can reproduce this on my own frontend by port forwarding mysql and
> the mythbackend network traffic through ssh.
Are you saying that port forwarding is causing the problem or that
you're port forwarding simply to allow testing his frontend with a
different database/data?
> I built a debug 0.23-fixes frontend and can see that the message is
> coming from mythtv/libs/libmyth/remoteutil.cpp line 205:
> if (numrecordings * NUMPROGRAMLINES + 1 > (int)strList.size())
> {
> cerr << "length mismatch between programinfo\n";
> return 0;
> }
>
> numrecordings is 51, NUMPROGRAMLINES is 47, and strList.size() is 56,
> so obviously the backend isn't sending over a complete recording list.
That also means that the frontend is receiving 1 complete record and one
partial record. The bug in Qt will result in sending some number of
complete records less than the total number of records--but all records
are complete. Therefore, it seems something else is happening here. It
sounds more like an issue with socket handling that causes the
connection between the frontend and backend to fail. I would also guess
that the bookmark changes are a placebo, and that--in fact--just
restarting the frontend (and letting it reconnect to the backend) is
what's making a difference.
> A similar issue was reported here:
> http://www.gossamer-threads.com/lists/mythtv/dev/366886
That was the issue in #7467.
> Any suggestions on how I can further troubleshoot this?
I'm pretty sure we need to first find what's actually causing the
problem as the symptom isn't consistent with those of the bug reported
on #7467. If you can upgrade to Qt 4.6.3, you can know for certain that
the problem isn't the Qt bug in #7467.
Note that if it is a socket issue, you'll likely see socket errors
reported in your frontend and/or backend log files. Socket issues can
occur with a variety of kernel and system configurations (where system
includes both system software and hardware). They are also very
difficult to remedy. :( (But if you're good at debugging, you may just
be able to help us improve our socket code to better handle these
currently-not-so-well-handled configurations.)
Mike
More information about the mythtv-users
mailing list