[mythtv] EPG Improvements - Need some help

Harvard Pan harvardpan at gmail.com
Thu May 5 11:01:08 UTC 2005


I'm currently implementing the improvements to EPG that I mentioned
earlier. Here are the main enhancements:

a) Pressing "C" in the EPG will toggle the Input. 
    This will update the channel list as well as the preview video.
b) Pressing "Y" in the EPG will switch the card (if you have more than one)
    This will update the channel list as well as the preview video.
c) the EPG will ONLY show the channels available for your current card and input
    Today, the EPG displays either all channels, or just your
favorites. It seems like the correct thing would be to filter it also
by the current source when it's being accessed by Live TV. (Schedule
Recordings->Program Guide will continue to show all channels)
d) *would like to implement* Have the channel guide navigate to the
correct channel when you switch inputs. If you are on input 1 with
channel 5 and switch to input 2 with channel 230, it will
automatically jump the guide to 230.

I've got some working code that I'm attaching as a diff, but I'm not
ready to submit it as a patch yet. I still have some testing to do and
some code cleanup after I get everything in a working satte. While I
was testing, I found that I get a segmentation fault when there is an
error thrown. Here are the steps to reproduce:

1. Open MythFrontend
2. Watch Live TV
3. Go into the program guide.
4. Press "Y" to switch inputs. If your second input has an error (mine
errors out because my slave backend is on a different protocol
version), it will pop up a box telling you the error.
5. press OK, then Escape. Mythfrontend segfaults at this point.

It is dying when it's trying to call m_parent->detach(this). I've been
wracking my brain (and the debugger), but I don't think I understand
the code enough to figure out what's wrong. Does anyone have any
insights? When you switch input in regular live tv and get the same
error, somehow it can throw you back to the menu correctly without
segfaulting. I can't figure out why that works though.

Below is the gdb stack trace. Any help would be greatly appreciated.
Please also find the diff file attached to this email.

--Harvard

2005-05-05 03:51:54.479 Changing from WatchingLiveTV to None
2005-05-05 03:51:54.504 Protocol version mismatch (frontend=16,backend=15)

ASSERT: "i <= nodes" in /usr/lib64/qt-3.3/include/qvaluelist.h (372)
ASSERT: "i <= nodes" in /usr/lib64/qt-3.3/include/qvaluelist.h (372)
2005-05-05 03:51:55.871 TV::HandleStateChange() Error, failed to start
RingBuffer on backend. Aborting.
2005-05-05 03:51:55.871 Unknown state transition: 0 to 0
2005-05-05 03:51:55.875 Changing from None to None
[Thread 1094719840 (LWP 22194) exited]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1147169120 (LWP 22203)]
0x0000000000000000 in ?? ()
(gdb) back
#0  0x0000000000000000 in ?? ()
#1  0x00002aaaabadc092 in MythMainWindow::detach (this=0x6e9dd0,
    child=0x806b00) at mythdialogs.cpp:348
#2  0x00002aaaabadfe75 in ~MythDialog (this=0x806b00) at mythdialogs.cpp:893
#3  0x00002aaaaae36dd5 in ~GuideGrid (this=0x806b00) at guidegrid.cpp:280
#4  0x00002aaaaae323c8 in RunProgramGuide (startchannel=
      {static null = {static null = <same as static member of an
already seen type>, d = 0x641e20, static shared_null = 0x641e20}, d =
0x9e6970, static shared_null = 0x641e20}, thread=true,
player=0x7389d0, allowsecondaryepg=true)
    at guidegrid.cpp:64
#5  0x00002aaaaaf0b476 in TV::doLoadMenu (this=0x7389d0) at tv_play.cpp:3184
#6  0x00002aaaaaf0b6ab in TV::MenuHandler (param=0x7389d0) at tv_play.cpp:3209
#7  0x0000003418c060aa in start_thread () from /lib64/tls/libpthread.so.0
#8  0x00000034181c53d3 in clone () from /lib64/tls/libc.so.6
#9  0x0000000000000000 in ?? ()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: EPG.diff
Type: text/x-patch
Size: 6534 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20050505/8cf06679/EPG.bin


More information about the mythtv-dev mailing list