Opened 14 years ago

Closed 14 years ago

#3093 closed defect (fixed)

program guide with no input connections defined --> segfault

Reported by: jharvell@… Owned by: stuartm
Priority: minor Milestone: 0.21
Component: mythtv Version: 0.20
Severity: medium Keywords: EPG segfault "program guide" input "input connection" "segmentation fault"
Cc: Ticket locked: no


Capture cards defined. Video sources defined. Channels defined. Programs defined (from mythfilldatabase). Delete all input connections. Enter program Guide

Expected behavior: I should be able to browse program guide and modify the schedule.

Observed behavior: I get an incorrect error message saying no channels are defined. Mythfrontend crashes. Logs below:

2007-02-16 01:06:40.777 XMLParse::LoadTheme? using /usr/share/mythtv/themes/Retro/ui.xml 2007-02-16 01:06:40.872 GuideGrid?:

You don't have any channels defined in the database. Guide grid will have nothing to show you.

2007-02-16 01:06:40.873 Connecting to backend server: cujo.pvt:6543 (try 1 of 5) 2007-02-16 01:06:40.874 Using protocol version 31 Segmentation fault

Change History (8)

comment:1 Changed 14 years ago by jharvell@…

I can gather more data on request. But I've seen this happen in 0.19 and 0.20 on multiple platforms, so I suspect it will be trivial to reproduce.

comment:2 in reply to:  description Changed 14 years ago by Stuart Auchterlonie

Milestone: unknown0.21
Owner: changed from Isaac Richards to Stuart Auchterlonie

Replying to

Expected behavior: I should be able to browse program guide and modify the schedule.

Your expectation is wrong. If you don't have an input connection then the program data that is in the database is orphaned, it doesn't belong to any cards.

This is also an invalid configuration. A card with no inputs connected cannot be used to record scheduled programming.

Observed behavior: I get an incorrect error message saying no channels are defined.

Which is correct.

Mythfrontend crashes. Logs below:

This however isn't. It should fail gracefully.

comment:3 Changed 14 years ago by jharvell@…

Are you sure my expectation is wrong? It is based on documentation from (see below). The reason I deleted all my input connections is because they are not physically connected to anything yet. I am staging the machine. I had to define the input connections first so I could get the channels and programming. Then I deleted the input connections to reflect the fact that there is no video source connected to the inputs. This prevents the scheduler from trying to use the input connection. I had to use this before with a previous Myth box when I temporarily had to disconnect one of the video sources from an input. The scheduler seems to work fine when you delete one of the inputs. It doesn't try to record from that input. The only thing I've observed to have problems is the program guide.

Also, if you are going to fix the segfault, then I think you should also change the wording of the error message on the basis that it's at best misleading and arguably incorrect. In fact, channels are defined in the database. Your argument that they are "orpahned" doesn't really make sense. They are not weak entities and have no existence dependeny on input connections. The fact that the EPG tries to do a natural join involving the input connections and comes up with nothing does not mean the channels are orphaned. If you assert that the EPG is not designed to work without input connections, that's fine. But the error message is in fact wrong.

Now, on to the actual expected behavior. Is there any documentation other than the web page where I could find the expected behavior? If not, then either the EPG needs to be fixed or the web page needs to be updated. My expectation is reasonable. If it is wrong as you say, then how can I make a feature request? It seems reasonable to be able to look at the program guide and schedule programming while no video sources are connected to the inputs. In fact, I shouldn't even have to have a capture card defined to do that. I think the things that need to exist to look at the programming guide and schedule recordings are the video sources, the channels, and of course the programs.

NOTE: Don't add a video source to a hardware input if you don't actually have anything connected there. For example, adding "Cable" to the Tuner and to the Composite inputs without having something connected to Composite will lead to blank recordings.

comment:4 Changed 14 years ago by jharvell@…

Hmmm. Now that I have been experimenting more in this configuration (where there is a card with channels but no input connections), I find that I can get the backend to exit by going into info->system status and look at the tuner status. The backend spits out a log that card 3 (the one with no input connections) doesn't exist. I remember from an earlier log that it complained about card3 init failed.

So it sounds like the system is not designed for that configuration, as you already stated.

The documentation excerpt from the HOWTO referenced at the end of the last comment to this bug report is a problem. Can you update it so that others don't waste their time with this invalid configuration?

comment:5 Changed 14 years ago by Stuart Auchterlonie

Owner: changed from Stuart Auchterlonie to Isaac Richards

I don't have time to look at this one, so it's free to a good home :)

comment:6 Changed 14 years ago by cpinkham

The mythbackend failure when viewing tuner status should have been fixed in [12972].

comment:7 Changed 14 years ago by stuartm

Owner: changed from Isaac Richards to stuartm

If this crash still occurs after [12972] then re-open with a backtrace. (

comment:8 Changed 14 years ago by stuartm

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.