Hello Guest, if you are reading this it means you have not registered yet. Please take a second, Click here to register, and in a few simple steps you will be able to enjoy our community and use our OpenViX support section.

View Entry Info: Weird EPG errors. EPG Refresh. Recent versions of OpenViX e.g. 5.4.008.

Category:
Possible Bug
What ViX Image build number are you using?
Please provide your ViX Team image build number. Menu > Information > About > Build number > ENTER THIS NUMBER e.g. 4.2.028
5.4.008
Have you tried a flash WITHOUT settings restore?
Have you tried this? PLEASE SELECT YES OR NO.
No
Have you tried a flash WITH settings restore?
Have you tried this? PLEASE SELECT YES OR NO.
Yes
Attachments
Page 7 of 12 FirstFirst ... 56789 ... LastLast
Results 91 to 105 of 179

Thread: Weird EPG errors. EPG Refresh. Recent versions of OpenViX e.g. 5.4.008.

  1. #91

    Title
    V.I.P
    Join Date
    Jan 2011
    Posts
    270
    Thanks
    60
    Thanked 582 Times in 194 Posts
    Quote Originally Posted by BefuddledBrian View Post
    To save me searching can anyone point me to the location of the code that limits the size and number of debug logs?
    Use PuTTY and save log on your PC!

    Telnet to box with PuTTY

    stop enigma2
    Code:
    init 4
    start enigma2 with debug level 4 logging
    Code:
    ENIGMA_DEBUG_LVL=4 enigma2
    end debug logging
    Code:
    CTRL+C
    start enigma2 in normal mode again
    Code:
    init 3

  2. The Following 2 Users Say Thank You to LraiZer For This Useful Post:

    abu baniaz (12-03-21)

  3. #92

    Title
    V.I.P
    Join Date
    Jan 2011
    Posts
    270
    Thanks
    60
    Thanked 582 Times in 194 Posts
    Quote Originally Posted by fat-tony View Post
    I saw lots of doubles this morning on tomorrow's (Friday 12th) EPG slots just before midday, containing entries from Wednesday 10 just before midnight. All have the same 36 hour 24 minute (2184 minutes) offset from the original broadcast time. I know I keep banging on about this value being 0x888 or binary 100010001000 which I think is being caused by a bug in the Julian date handling for events starting before midnight and straddling the midnight hour, but I think the answer lies there.
    I think all agree that this should be the first place for Brian to look to debug and fix this issue

  4. #93

    Title
    Forum Supporter
    Donated Member
    Join Date
    Jun 2014
    Posts
    1,321
    Thanks
    613
    Thanked 418 Times in 270 Posts
    Quote Originally Posted by LraiZer View Post
    ...TODO: fix source type issue, update epg.dat from V7 to V8.

    I think you may also be seeing an issue in epgcache code that prevents many of the epg readers inc. OpenTV from updating/removing previously cached events, which would result in you seeing overlapping events from events that were not removed/updated as no longer needed. Fixing this issue would also require updating the epg.dat save/load functions and the file structure of the epg.dat file so the epg Version would also need incrementing from V7 to V8. We need to adjust the eventData type(0xFF) size of the epg source from uint8_t to eventData type(0xFFFF) uint16_t. OpenTV source type(0x4000) and other many of the other readers with a greater source type ID than 255 are currently wrongly being set/saved/loaded as PRIVATE(0X00) source type. Some of the epgcache code checks for PRIVATE or 0 source type and these checks are blocking the wrongly set OpenTV source type (0x00) from ever updating or removing events, it is only allowing new events to be added.

    When i next get some free time, i can make patch to fix this issue to test.
    Would this explain why these phantom entries arent noticable (that I have observed) when using CrossEPG as i've noticed its code does something with epgcache (creates new instance I think)?

  5. #94
    Joe_90's Avatar
    Title
    Moderator
    Join Date
    Mar 2014
    Location
    Wicklow, Ireland
    Posts
    4,126
    Thanks
    1,280
    Thanked 1,126 Times in 888 Posts
    Quote Originally Posted by bbbuk View Post
    Would this explain why these phantom entries arent noticable (that I have observed) when using CrossEPG as i've noticed its code does something with epgcache (creates new instance I think)?
    As far as I am aware, CrossEPG reads the Sky EPG transponder data and stores it in its own database and then populates the EPG cache afterwards. I don't know whether it shares or uses the same code used by the OpenTV reader that EPGRefresh or OpenTVzapper calls. So, it may not encounter the same corruption issue.
    GB Quad Plus, Mut@nt HD51, AX HD61, 80cm dish and Supreme Dark motor. Sony STR-DN 1060, Sony UHP-H1 Bluray, Odroid N2+ (CoreElec), Monitor Audio Bronze 5.1 speakers

  6. The Following User Says Thank You to Joe_90 For This Useful Post:

    bbbuk (12-03-21)

  7. #95

    Title
    V.I.P
    Join Date
    Jan 2011
    Posts
    270
    Thanks
    60
    Thanked 582 Times in 194 Posts
    If you install RadiotimesXmltvEmulator from the feed, as it is based on CrossEPG, you should also see these bogus events in the xmltv file that it generated in /tmp

  8. The Following 2 Users Say Thank You to LraiZer For This Useful Post:

    Andy_Hazza (12-03-21),Huevos (12-03-21)

  9. #96
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,688
    Thanks
    2,017
    Thanked 4,970 Times in 3,284 Posts
    I never noticed before... No event_id in that format.
    Code:
     <programme start="20210316110000 +0100" stop="20210316120000 +0100" channel="282_2_6155">
      <title lang="en">Lorraine</title>
      <sub-title lang="en">Entertainment - Magazine</sub-title>
      <desc lang="en">Lorraine Kelly presents a topical mix of entertainment, discussion and showbiz glamour as well as the latest fashion, food and celebrity gossip.</desc>
     </programme>
    Help keep OpenViX servers online.Please donate!

  10. The Following 3 Users Say Thank You to Huevos For This Useful Post:

    Andy_Hazza (12-03-21),Joe_90 (12-03-21)

  11. #97
    Joe_90's Avatar
    Title
    Moderator
    Join Date
    Mar 2014
    Location
    Wicklow, Ireland
    Posts
    4,126
    Thanks
    1,280
    Thanked 1,126 Times in 888 Posts
    Any sign of the ghost events in that format?
    GB Quad Plus, Mut@nt HD51, AX HD61, 80cm dish and Supreme Dark motor. Sony STR-DN 1060, Sony UHP-H1 Bluray, Odroid N2+ (CoreElec), Monitor Audio Bronze 5.1 speakers

  12. #98
    ccs's Avatar
    Title
    ViX Beta Tester
    Join Date
    Sep 2014
    Posts
    5,836
    Thanks
    554
    Thanked 1,277 Times in 1,089 Posts
    "tvheadend" has some interesting (and very old) comments about event_id's. eg...

    Code:
    https://github.com/tvheadend/tvheadend/commit/be1a42d9092550ffa892e39ef91026e1405192d2
    Try to detect duplicate EPG entries from the DVB feed and adjust
    EPG accordingly. The EPG code will search for events with the same
    DVB event ID +- 2 events from the current one. If the event id is
    equal, the prvious (old) entry will be removed in favor of the new one.
    Reason for not blindingly trusting the event id is that some networks
    seem to (incorrectly) reuse IDs
    .

  13. The Following User Says Thank You to ccs For This Useful Post:


  14. #99
    BrokenUnusableAccount
    Sorry - I couldn't work on this last night - I had to get up early this morning for something.
    Tonight however I have:

    This is the section of opentv.cpp I changed to log stuff, the lines I have added/changed are marked with //BB
    Code:
    OpenTvTitle::OpenTvTitle(const uint8_t * const buffer, uint16_t startMjd)
    {
    	uint8_t descriptor_tag = buffer[0];
    
    	if (descriptor_tag == OPENTV_EVENT_TITLE_DESCRIPTOR)
    	{
    		uint8_t descriptor_length = buffer[1];
    		uint8_t titleLength = descriptor_length > 7 ? descriptor_length-7 : 0;
    
    		uint32_t startSecond = (UINT16(&buffer[2]) << 1); //BB
    
    		startTimeBcd = ((startMjd - 40587) * 86400) + startSecond; //BB
    		duration = UINT16(&buffer[4]) << 1;
    
    		//genre content
    		//uint8_t flag1 = buffer[6];
    		//uint8_t flag2 = buffer[7];
    		//uint8_t flag3 = buffer[8];
    
    		char tmp[OPENTV_EVENT_TITLE_LENGTH];
    		memset(tmp, '\0', OPENTV_EVENT_TITLE_LENGTH);
    
    		if (!huffman_decode (buffer + 9, titleLength, tmp, OPENTV_EVENT_TITLE_LENGTH * 2, false))
    			tmp[0] = '\0';
    
    		title = convertDVBUTF8(tmp, sizeof(tmp), 5);
    
    		eDebug("[OpenTV] +titl:\"%s\" SMJD:%i Ss:%i SBD:%i len:%i", tmp, startMjd, startSecond, startTimeBcd, duration); //BB
    
    		/* storing all the crc unique titles in the title reader phase,
    		   would give us a titles reduction of 155,000 down to 13,000!
    		   we currently add/delete as we go with reduction size ~5000 */
    		uint8_t *otvt = new uint8_t[titleLength];
    		memcpy(otvt, buffer + 9, titleLength);
    		crc32 = opentv_crc(otvt, titleLength);
    		delete [] otvt;
    	}
    }
    Just after midnight I see the "ghost events" showing with startMjd corresponding to today (the day that started just some minutes ago) and startSecond corresponding to start times of over 24:00.
    The start times seem to be the old original start time plus 2^17 seconds which is 131072 (or 0x20000) seconds which is 2184 (or 0x888) minutes and 32 seconds.

    but thinking hard.

    Code:
    https://www.brian-gregory.me.uk/GDL/Putty%20zgemmah7.lan%2020210312-124826.log
    https://www.brian-gregory.me.uk/GDL/Putty%20zgemmah7.lan%2020210312-233623.log
    https://www.brian-gregory.me.uk/GDL/Putty%20zgemmah7.lan%2020210313-000145.log
    Last edited by BrokenUnusableAccount; 13-03-21 at 02:25.

  15. #100
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,829
    Thanks
    239
    Thanked 1,664 Times in 1,311 Posts
    Quote Originally Posted by BefuddledBrian View Post
    Just after midnight I see the "ghost events" showing with startMjd corresponding to today (the day that started just some minutes ago) and startSecond corresponding to start times of over 24:00.
    The start times seem to be the old original start time plus 2^17 seconds which is 131072 (or 0x20000) seconds which is 2184 (or 0x888) minutes and 32 seconds.

    but thinking hard.
    Given that there are only 86400 seconds in a day (0x15180) that looks as though 0x20000 is a flag (meaning unknown) that needs to be masked off.
    Or it's a bit that's been shifted down that shouldn't be there....(signed vs unsigned right-shift)?
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  16. #101
    BrokenUnusableAccount
    Quote Originally Posted by birdman View Post
    Given that there are only 86400 seconds in a day (0x15180) that looks as though 0x20000 is a flag (meaning unknown) that needs to be masked off.
    Or it's a bit that's been shifted down that shouldn't be there....(signed vs unsigned right-shift)?
    I think it is as if it's a signed number but where as a normal x bit signed number when incremented the meaning goes from +(2^x)-1 to -(2^x) here the meaning changes from +ve to -ve at a different point, probably when it's over 86400 seconds.
    The 0x20000 error is because the program currently just always interprets it as a positive unsigned value.
    Last edited by BrokenUnusableAccount; 13-03-21 at 02:35. Reason: typo, rephrase

  17. #102
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,829
    Thanks
    239
    Thanked 1,664 Times in 1,311 Posts
    Quote Originally Posted by BefuddledBrian View Post
    ...and startSecond corresponding to start times of over 24:00.
    The start times seem to be the old original start time plus 2^17 seconds which is 131072 (or 0x20000) seconds which is 2184 (or 0x888) minutes and 32 seconds.
    Wait!! That should not happen!!!

    The max value for UINT16 is 0xffff. Shifted left by 1 that becomes 0x1fffe. There is no way that the 0x20000 bit should ever be set.

    Is there a bug in the UINT16 definition???
    Last edited by birdman; 13-03-21 at 02:40.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  18. #103
    BrokenUnusableAccount
    Quote Originally Posted by birdman View Post
    Wait!! That should not happen!!!

    The max value for UINT16 is 0xffff. Shifted left by 1 that becomes 0x1fffe. There is no way that the 0x20000 bit should ever be set.

    Is there a bug in the UINT16 definition???
    I think I must have explained it badly. Did my second message make it clearer?

    They are in a funny format.
    Say something yesterday really started at 23:50 on 12th March.
    I think they're trying to send it as 13th March starting at minus 00:10 but the software doesn't currently realise sky think negative start times are a thing.

    Or maybe something earlier in the software is messing it up, but I don't think that's likely.
    Last edited by BrokenUnusableAccount; 13-03-21 at 02:53.

  19. #104
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,829
    Thanks
    239
    Thanked 1,664 Times in 1,311 Posts
    Quote Originally Posted by BefuddledBrian View Post
    I think I must have explained it badly. Did my second message make it clearer?
    No.
    The relevant thing is that (assuming UINT16 returns a 16-bit unsigned int)
    Code:
     (UINT16(&buffer[2]) << 1);
    should never be able to set the 0x20000 bit. Regardless of who intends what.

    The problem is that I cannot find a definition of UINT16 anywhere.

    EDIT: Found it. It's in the dvbsi++ bytestream.h header file.

    Code:
    // deprecated 
    #define UINT16(p)       r16(p)
    
    #if __BYTE_ORDER == __BIG_ENDIAN 
    #define r16(p)          (*(const uint16_t * const)(p))
    ...
    #else 
    #define r16(p)          bswap_16(*(const uint16_t * const)p)
    Last edited by birdman; 13-03-21 at 03:05.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  20. #105
    BrokenUnusableAccount
    Quote Originally Posted by birdman View Post
    No.
    The relevant thing is that (assuming UINT16 returns a 16-bit unsigned int)
    Code:
     (UINT16(&buffer[2]) << 1);
    should never be able to set the 0x20000 bit. Regardless of who intends what.
    It isn't.

    It's like the error if a signed byte -17 is interpreted as unsigned giving incorrect value 249.
    That's an error due to interpreting it wrongly of 256 or 0x100, even though the byte has no 0x100 bit in it.
    Last edited by BrokenUnusableAccount; 13-03-21 at 03:11. Reason: remove erroneous bit

Page 7 of 12 FirstFirst ... 56789 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.