Deadlock in TV Server if recording while importing EPG (1 Viewer)

rlevis

MP Donator
  • Premium Supporter
  • August 15, 2008
    517
    32
    Home Country
    New Zealand New Zealand
    TV Server 1.25. Windows 10.

    This has been an issue for many years, if not since inception, and I hoped it would be resolved eventually, but I'm still suffering. I see dozens or people referring to the same issue over the years in these forums, all of which appear to be caused by anti-virus or other Windows settings. I've managed to repeat the issue consistently now so I hope this will go some way towards a fix. I don't have logs at this stage, but they are the same issues others have where TSWriter finishes at the correct time but the tuner continues tuning in and MP shows the recording is still being recorded (although it isn't) hours after it was supposed to finish. It requires an End Task in Windows Task Manager and service restart.

    It was made more obvious recently as the issue was occurring every night this week. I'm recording a long sport program (Snooker) between 2:00am and 6:30am every night with a 1 hour Post-record time, so it should finish at 7:30am.

    At 6:30am I have a scheduled task to create a TVGuide.xml via EPG Collector, which TV Server imports via the XML TV plugin a couple of minutes later. Only if this import occurs does the issue occur and recording does stop properly. 2 days ago I changed the time of the EPG import to 12 noon and the last 2 nights the recording has finished correctly, compared to 4 days before where it always failed. So the issue does appear to be related to the import of the EPG file. Perhaps it is due to the import process removing all the EPG data before importing the new file!

    This is interesting which I just noticed. A new recording is being started at 6:30am for a couple of hours, recording the same content as the original recording that started at 2am. That could be the one that doesn't stop. I suspect TV Server is getting confused somewhere when there is no EPG while a program is recording.

    There are probably some logs from 2 days ago if you would like them. Let me know what they are named.

    Cheers,
    Ross.
     

    joecrow

    Test Group
  • Team MediaPortal
  • August 9, 2012
    2,528
    1,880
    Home Country
    Germany Germany
    Just a thought but have you tried the setting in XMLTv shown below in the screenshot, both disabled and enabled to see if anything changes?

    tv.jpg
     

    rlevis

    MP Donator
  • Premium Supporter
  • August 15, 2008
    517
    32
    Home Country
    New Zealand New Zealand
    Yes I have thought about it, if that will even resolve it, but as it says, it is recommended to be enabled so not sure what will happen when it is disabled. Will it keep old programs forever in the database?
     

    joecrow

    Test Group
  • Team MediaPortal
  • August 9, 2012
    2,528
    1,880
    Home Country
    Germany Germany
    Have to confess I have no idea but assume they will be overwritten by the import rather than deleted first. Given you can reproduce the problem I would have thought it would be worth trying it disabled, if there is no improvement you can always re-enable it.
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,849
    1,771
    Southampton
    Home Country
    United Kingdom United Kingdom
    it is recommended to be enabled so not sure what will happen when it is disabled. Will it keep old programs forever in the database?
    The Wiki explains the action of this setting quite well; it says this:

    Delete old programs before import (Recommended)
    Tick this option if you want the contents of your EPG to be deleted before a new tvguide.xml is imported. A reason for doing this is that some TV guide sources may have programmes listed 14 days in advance, however the TV companies may not have confirmed all their schedules this far forward so the guide might contain entries such as To be confirmed or Film to be confirmed. These will be loaded into the EPG database and MediaPortal sees them as a normal programme. This is not too much of a problem while they are 10-14 days off, but as current days age off a large proportion of your EPG may end up as To be confirmed. The normal XMLTV import will only add new EPG entries where none exist in the database. It will not update existing ones. Deleting all the old programs before import ensures that the EPG data in the database is up to date as the tvguide.xml being imported.​

    A new recording is being started at 6:30am for a couple of hours, recording the same content as the original recording that started at 2am. That could be the one that doesn't stop.
    I use the DVB-T EPG in the UK, but I have had a couple of instances where "TV Server" recorded a programme twice, slightly displaced in time. Previously I used the "grab EPG while timeshifting/recording" setting with a one hour refresh interval. What happened is that a news broadcast was extended, and the programme that I wanted to record was delayed by 10 minutes, but "TV Server" started the recording at the original time. However, it just so happened that the next EPG grab occurred after the original start time, and before the revised start time, so "TV Server" noticed that there was a "new" programme that was part of the series and which was not the one already recording (different start and stop times), so it started recording that too, even though it was on the same channel. Both recordings finished at their respective stop times, so a non-stop recording did not occur in this case.

    This has been an issue for many years, if not since inception, and I hoped it would be resolved eventually, but I'm still suffering.
    It would be pleasing to think that this problem would be fixed within the next few weeks, but sadly I think it more likely that you will still be waiting for a fix ten years from now :cry:. However, at least you now know the combination of circumstances that trigger this error, so it is within your power to stop it recurring.

    -- from CyberSimian in the UK
     

    rlevis

    MP Donator
  • Premium Supporter
  • August 15, 2008
    517
    32
    Home Country
    New Zealand New Zealand
    Right, so I would not want that checkbox unchecked as many channels do have TBC later in the week. I guess you are right, and I can get around it for the time being. I'm recording DVB-S2 (paid) and DVB-T (free to air) in NZ, but it's generally always satellite recordings that have the issue, I guess because of the lengthy sports, and EPG imports set to occur 3 times a day. I've reduced that to once a day now and I'll hope for the best. I can't use the built-in EPG grabber in TV Server as it doesn't work properly here.
     

    joecrow

    Test Group
  • Team MediaPortal
  • August 9, 2012
    2,528
    1,880
    Home Country
    Germany Germany
    Right, so I would not want that checkbox unchecked as many channels do have TBC later in the week. I guess you are right, and I can get around it for the time being. I'm recording DVB-S2 (paid) and DVB-T (free to air) in NZ, but it's generally always satellite recordings that have the issue, I guess because of the lengthy sports, and EPG imports set to occur 3 times a day. I've reduced that to once a day now and I'll hope for the best. I can't use the built-in EPG grabber in TV Server as it doesn't work properly here.
    Given the info. @CyberSimian posted I still think it is worthwhile, if only for troubleshooting, to confirm that the "delete old programs" is the cause of your problem, then at least we know where to direct any efforts to fix it. Could you at least try once and let us know?
     

    rlevis

    MP Donator
  • Premium Supporter
  • August 15, 2008
    517
    32
    Home Country
    New Zealand New Zealand
    It looks like I forgot to change the Task Scheduler to import at 6:30am. I was sure I had but appears not. It was the last day of the tournament so will try again next week when a new tournament starts.
     

    rlevis

    MP Donator
  • Premium Supporter
  • August 15, 2008
    517
    32
    Home Country
    New Zealand New Zealand
    OK, I managed to get a test in this morning while recording with an XMLTV Import set to not delete the old programs. No problems occurred and the TV recording finished correctly. So there is a problem with TV Server recording while there is no EPG, or perhaps after a new EPG is imported. Perhaps TV Server needs to stop it's 10 second polling of the EPG data looking for programs to start or stop recording while the EPG is being imported or changed, via XMLTV or via the internal grabber. Or perhaps it can be smarter than that somehow. Is someone able to look at a fix?
     

    Users who are viewing this thread

    Top Bottom