Opened 13 years ago

Closed 13 years ago

#2084 closed defect (fixed)

DataDirect inserts DTV channels

Reported by: tim@… Owned by: danielk
Priority: minor Milestone: 0.20
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Channels table seems to get corrupted over time or after channel scan. This results in the backend getting stuck in a loop where it complains that chanid cannot = null until backend is killed

Attachments (6)

channels.dmp (10.9 KB) - added by tim@… 13 years ago.
channel table
mythbackend.log (10.4 KB) - added by tim@… 13 years ago.
backend log with -v record,channel as per request
table_dump.sql.txt (30.5 KB) - added by anonymous 13 years ago.
table dump
mythbackend.2.log (104.4 KB) - added by tharding@… 13 years ago.
backend log -v all
tables.sql.2.txt (13.8 KB) - added by tharding@… 13 years ago.
table dump
2084-2103-v1.patch (8.9 KB) - added by danielk 13 years ago.
fix

Download all attachments as: .zip

Change History (17)

Changed 13 years ago by tim@…

Attachment: channels.dmp added

channel table

Changed 13 years ago by tim@…

Attachment: mythbackend.log added

backend log with -v record,channel as per request

comment:1 Changed 13 years ago by danielk

Milestone: 0.20
Resolution: invalid
Status: newclosed
Version: head

Unfortunately this is not enought information in this case. Please attach dumps of your dtv_multiplex, capturecard, and cardinput tables. Then reopen the ticket.

comment:2 Changed 13 years ago by anonymous

Resolution: invalid
Status: closedreopened

Hi,

I experienced the same problem after svn up to latest. So I attached my dump for the dtv_multiplex, capturecard, and cardinput tables. Chanid is defined to "NOT NULL" but insert tries to insert "NULL", bad fun ;-)

Changed 13 years ago by anonymous

Attachment: table_dump.sql.txt added

table dump

comment:3 Changed 13 years ago by Lueddich@…

Same problem here...

comment:4 Changed 13 years ago by danielk

Resolution: invalid
Status: reopenedclosed

anon, Lueddich, I need all the info Tim provided as well. A dtv_mulitplex table is not useful without the channel table and the backend log to go with it.

comment:5 Changed 13 years ago by tharding@…

Daniel,

I have the same problem. I have been digging into this issue and I am seeing some stuff in the logs that look problematic. In my log I see a query that looks wrong.

The query at line 836 returns nothing when I run it in mysql, but if I change the end to defaultinput = 'Television', instead of inputname = 'Television' it works. For the DVB card, the inputname is set to 'DVBInput'. I couln't tell from the log why it selected 'Television' for the search. My guess is that the capturecard.defaultinput database is getting set wrong to 'Television' instead of 'DVBInput'. This looks like it causes the default channel to be set to '5.0' the first channel listed in the database for this card.

At this point it looks like fails to tune for some reason (I can tune to this channel outside of mythtv), and moves into the same loop as described above. The loop appears to only happen for live TV, for recordings it just doesn't record anything, but seems to recover fine.

I am including my log, and table dump.

Tyson

Changed 13 years ago by tharding@…

Attachment: mythbackend.2.log added

backend log -v all

Changed 13 years ago by tharding@…

Attachment: tables.sql.2.txt added

table dump

comment:6 Changed 13 years ago by anonymous

Resolution: invalid
Status: closedreopened

I am glad to see somebody solved this, but how do I? ;) The recent svn does the same in my case, how can I do that? Please help!

comment:7 Changed 13 years ago by danielk

Tharding, what is your hardware configuration? In the capturecard table it looks like you only have a single analog card defined, but it the logs it looks like you have a DVB card with an analog subcard defined. Did you maybe not restart the backend after the last time you ran mythtv-setup?

comment:8 Changed 13 years ago by danielk

Resolution: invalid
Status: reopenedclosed

No response to questions.

comment:9 in reply to:  8 Changed 13 years ago by tharding@…

Resolution: invalid
Status: closedreopened

Replying to danielk:

No response to questions.

Sorry, I just got back from vacation :)

Tharding, what is your hardware configuration? In the capturecard table it looks

I have two cards, the first card is an analog BT based card. The second card is a DVB card (ATSC).

like you only have a single analog card defined, but it the logs it looks like you have a DVB card with an analog subcard defined. Did you maybe not restart the backend after the last time you ran mythtv-setup?

In mythtv-setup both cards are shown, and at that time I had not done a channel scan, I just used the listing from DataDirect?. The log is from the backend while it was running after having run mythtv-setup.

I think the problem in my setup was that the dtv_multiplex table had no data. I was able to fix my problem by deleting all of the channels for the DVB card from the database. Then do a channel scan. After doing the channel scan, and importing the schedule data from DataDirect? the DVB card worked fine.

There seems to be two problems. Importing the channel list from DataDirect? does not provide enough information to tune my DVB card (no info in the dtv_multiplex table). The second problem appears to be if the backend cannot tune to a DVB channel, it will still try and add an entry into the recorded table even though no data was captured, and this entry appears to have a NULL chanid. My guess is chanid is a indexed column, so that is why this is not allowed. Then the backend continues in an infinite loop trying to add this row.

Durring all of this, the frontend (running on a seperate machine) has dropped back to the main menu, and any attempts to access the backend indicate the backend is not responding.

comment:10 Changed 13 years ago by danielk

Summary: Channel table seems to get corrupted either over time or after scanDataDirect inserts DTV channels

Ah, data direct should not be inserting channels, only the channel scanner should do that for DVBRecorder channels. This must have gotten broken with the fixes for analog channel insertion.

Changed 13 years ago by danielk

Attachment: 2084-2103-v1.patch added

fix

comment:11 Changed 13 years ago by danielk

Resolution: fixed
Status: reopenedclosed

(In [10698]) Fixes #2084. Fixes #2103. Fixes some mythfilldatabase problems with respect to inserting channels.

For #2084, this passes the cardtype in to mythfilldatabase when it is called from withing mythtv-setup, this is needed because at this point the connection between the card input and the source has not yet been saved to the database if the user has changed the source since entering the configuration pane. This also prevents mythfilldatabase from running in mythtv-setup for scan required sources if there are no channels in the lineup. This is not strictly needed after the fix, but it prevents us from wasting time doing this and making the UI unresponsive in the meantime.

For #2103, this creates a new class of DTV devices for Firewire and DBOX2, "unscanable" devices, this is for devices which should be scanned but we do not yet have the code to scan them.

Note: See TracTickets for help on using tickets.