EPG data lost

Hello,

after one or two weeks where in worked fine, now my PVR has got a completely empty program guide. The structure still is visible, but no entries at all. The same at the “channels” menu.

At tvheadend, I can see all program data.

Strage:
After reboot, for 1-2 minutes I can see program data at “channels”, but they will disappear. The same happens when I manually update EPG data for a certain channel: They will populate program guide, but disappear within a short period.

Let me know if you need logs or more info.

Greetings,
Wolf

1 Like

Does really nobody have an idea how to track down this issue? - It’s so essential to TV…

Cheers,
Wolf

To get a better understanding of the problem you are experiencing we need more information from you. The best way to get this information is for you to upload logs that demonstrate your problem. You can learn more about how to submit a useful support request here.

Depending on the used skin you have to set the settings-level to standard or higher, in summary:

  • enable debug logging at settings->system->logging

  • reboot the OSMC device twice(!)

  • reproduce the issue

  • upload the log set (all configs and logs!) either using the Log Uploader method within the My OSMC menu in the GUI or the ssh method invoking command grab-logs -A

  • publish the provided URL from the log set upload, here

Thanks for your understanding. We hope that we can help you get up and running again shortly.

OSMC skin screenshot:

Ah, thank you, I should have known that on my own.

Now: Did 2 reboots, PVS started, EPG info was aquired, but lost within less than a minute. Aquired them again for 2 channels manually - these were then visible in EPG guide (that particular channel only) and again vanished within one minute.

Logs are here:
https://paste.osmc.tv/idegubihay

Cheers,
Wolf

Hi,

Does issue occur with a different skin. e.g. Estuary?

Thanks Tom.

Yes, I tried 3 different ones.

Can I reinstall TV services without loosing my settings?

Hi,

P try disabling TVHeadend HTSP. Then go to settings Live TV, general and clear data; do the same under the guide menu. Then re-enable TVHeadend HTSP

Thanks Tom.

Thank you. So I did:

  • deactivate TVheadend client HTSP in settings > user addons > PVR clients
  • went to settings > PVR and TV > general; deleted data
  • went to settings > PVR and TV > EPG; deleted data
  • activate TVheadend client HTSP in settings > user addons > PVR clients

Hope these are the steps you described.

In fact, program guide will populate again - partially - with a number of entries. But again, they disappear in half a minute or so.

Sorry. What else should I do?

Hi,

Others may have more ideas, but All I can suggest is a fresh install on a new sd card and restore your settings from a backup.

Thanks Tom.

Thank you very much.
I tried a reinstall, but failed with the widely mentioned RPI4/HDMI-problems. So I’ll wait till these are resolved. (No idea how I circumvented these at my first install)

same here. after cache clearing it reappears, but after 1-2 minutes disappears again…

This started happening also on my setup, which was working fine for about 6 months.

Doing any of the following… reboot, clear data, disable then re-enable the TVH server and/or client, change the number of days in the past or future covered by the EPG… will restore the correct EPG data for about 30 seconds, then it clears and never returns.

But the EPG is available if you look at the TVH server web UI at any time.

Based on the fact this issue came out of nowhere and that it had been working fine, I assumed it was a bug in an OSMC update. But looking back at a number of posts here it seems the issue can just hit people out of the blue at some point.

Would rather not set everything up again from scratch, but will try that next if it no other suggestions land here.

It’s most likely one or more invalid characters in the TVH data passed through to KODI. How are you importing the data into TVH?

Interesting, thanks for this reply.

The EPG data is provided by both DVB-T (Saorview, the Free to Air service in Ireland) and also DVB-S (UK’s Freesat) tuners, both of which provide at least the next 7 days programming data.

I will see if there is some character encoding setting somewhere that is resulting in some incorrect conversion in the data pipeline.

Will report back.

Ok, problem seems to be solved.

Initially, based on the idea posted above I looked for any character encoding settings that might be off, both in TVH and in the Kodi Web UI. I thought perhaps the issue started due to some specific channel messing up the data they were piping through to the EPG, or something forcing a specific ISO charset when the underlying data was arriving as UTF-8. The only place I found such a setting was under the “Network” config in TVH. For both terrestrial and satellite networks this was not set (blank) so I updated to an explicit AUTO. I didn’t think this would make any difference, as AUTO is probably the default, and indeed it didn’t help.

Next I enabled logging via the Kodi UI (I had never even thought to access the Kodi UI directly before today, and while I was looking through the settings I noticed the enable logging setting, but perhaps the same logging toggle is also possible via OSMC directly), and then rebooted OSMC to see if anything was logged in Kodi when the EPG was lost. Indeed it showed that at some point during the EPG update a REPLACE database operation was failing due to a corrupt or malformed database file.

I searched for info on how to solve corrupt databases on Kodi and found the path to all the various db files. Seems like mostly people would like to try and repair these files as they contain the metadata for their entire media library, but since the EPG data is built from the broadcast data, I saw no risk in just deleting the Epg16.db file completely and letting a new one be rebuilt, and so:

rm /home/osmc/.kodi/userdata/Database/Epg*.db

Followed by an OSMC reboot, did the trick.

If that’s all It takes, it feels like Kodi could be improved to do this automatically (for the EPG dB at least) if the file ever gets corrupt, or an option added to OSMC to do this if the clear data menu option is run.

I now suspect the root cause of the issue was simply an inopportune hard power cycling of the Raspberry Pi that all this is running on at a time the EPG file was being written to.

In any case thanks again for the pointer to Kodi, it led me to this solution.

1 Like