Hello:
Yesterday I encountered a rather strange issue while using the Tvheadend addon for CoreELEC 21.3-ng (based on Tvheadend 4.3-2180).
The Tvheadend service kept disconnecting frequently—every few minutes, at seemingly random intervals—and I couldn’t pinpoint the cause. At first, I suspected some kind of file corruption or system instability.
I tried everything: reinstalling Tvheadend, restoring from older backups… but the service kept restarting.
Eventually, I decided to monitor the Tvheadend logs while waiting for the crash to happen. That’s when I discovered the culprit: every time an internal XMLTV grabber was executed, Tvheadend would lose connection and restart.
I tested this multiple times by manually triggering the grabber, and confirmed that it consistently caused Tvheadend to crash. Once I disabled the grabber, the issue stopped --> problem “solved.”
Apparently, the issue was caused by a malformed <category> tag in the EPG XML file—it wasn’t properly closed. This seemed to be enough to crash the grabber and, in turn, Tvheadend itself.
It appears I’m not the only one experiencing this. Other users have reported similar behavior using the same EPG file.
I suspect this is a bug in Tvheadend’s handling of malformed XML (at least in version 4.3-2180 -I’m not sure if it’s been fixed in later builds-).
So here are my questions:
Is it expected behavior for Tvheadend to crash when an internal grabber processes a malformed XML file?
Wouldn’t it be more "reasonable" for Tvheadend to detect the error, ignore the faulty grabber, and continue running normally?
Thanks in advance for your time and for this excellent software. Despite yesterday’s headache 🤣🤣, I’m still a big fan!
Kind regards