Bug in skindesigner Schedules menu (all skins affected)

  • Hi. I've been experiencing a problem where the Schedules menu is almost always empty with any skin using skindesigner. If I switch to a stock skin (like Classic VDR), or anthra+text2skin, the Schedules menu displays just fine. I populate my epg.data using the vdr-eepg plugin, but I don't think that matters at all considering the Schedules menu is only broken with skindesigner skins. Louis, the skindesigner author, said the VDR itself and text2skin use the `old` way to build menus and that skindesigner uses the `new` way. He could explain that better but he suspects there may be a threading/timing issue causing this. He recommended I post here since we haven't been able to figure it out ourselves so far. Below are some quick pics I took that show the problem, and also show that the epg data is just fine/not the problem.


    Any help or ideas would be greatly appreciated!!


    System running debian testing 64bit, vdr-2.2.0, skindesigner-0.4.4-git.5cacee08, eepg-0.0.6pre-git.9cd9a75a, gcc 4.9.2-10, in case any of that matters...


    press OK, everything is fine:


    open Schedule menu and the epg data is MISSING!


    press OK in Schedule menu and show info is just fine:


    open What's On Now menu, epg data is just fine:


    change to Classic VDR skin and open Schedule menu again, this time epg data is there:

  • Hi,

    I populate my epg.data using the vdr-eepg plugin, but I don't think that matters at all considering the Schedules menu is only broken with skindesigner skins.


    since i never heared about such problems from other users, i think this issue is somehow related with that. Maybe this way of populating the EPG is different to any other way, i don't know.


    Additionally you suppressed the fact that with debug output added to skindesigner sometimes it works...for me that shows clearly that there is some kind of a timing issue. May be in conjunction with eepg plugin.


    Is it possible that you populate your epg "natively" by vdr methods? Just to check if eepg is the reason...


    Cheers Louis

  • Hi,


    since i never heared about such problems from other users, i think this issue is somehow related with that. Maybe this way of populating the EPG is different to any other way, i don't know.


    I can't see how that's possible. If there was a problem with epg.data, how come the stock VDR skins, and text2skin display it fine? The problem only occurs with skindesigner skins, and only the Schedule menu.


    Zitat

    Additionally you suppressed the fact that with debug output added to skindesigner sometimes it works...for me that shows clearly that there is some kind of a timing issue. May be in conjunction with eepg plugin.


    I didn't mention the debug output because after further testing it doesn't seem to have any affect. Sometimes (rarely) the Schedules menu does display correctly in skindesigner, but that's true regardless of adding debug output. For example, when you first mention it, Schedules started working. But just before I posted today I added it again after a fresh compile and Schedule was still empty afterwards.


    Zitat

    Is it possible that you populate your epg "natively" by vdr methods? Just to check if eepg is the reason...


    It's not possible. My provider uses a proprietary encoding on epg data. Because of that, stock VDR will never be able to populate the epg here. But again, the pics show the data is there. It's only skindesigner that doesn't display it correctly in the Schedule menu most of the time. Your idea about timing/threading seems more likely than anything. Or the old way (stock VDR, text2skin) vs. the new way (skindesigner method). The root cause must be somewhere in there. Or maybe it has something to do with 64bit somehow like that memory leak from this thread:
    Etwas frist Speicher VDR, Streamdev, SoftHdDevice, ffmpeg, VDPAU? VDR


    Hopefully someone here can offer a new idea, or help us move forward to solving it. :(

  • Hi,

    If there was a problem with epg.data, how come the stock VDR skins, and text2skin display it fine? The problem only occurs with skindesigner skins, and only the Schedule menu.


    i think it's not an problem directly with epg.data, but maybe with the way the cEvent Objects are generated.


    You already mentioned the "old" and the "new" way of displaying the VDR menus. Some more words to that: in the "old" way menus are populated by just passing a tab separated String to a function "SetItem(const char *Text, ...)". The text itself is generated inside VDR, and the Skin just displays this text. In the "new" way a function "SetItemEvent(const cEvent *Event, ...)" is called and a pointer to the cEvent Object is passed, and i generate the texts for the schedule menu items by accessing functions of this cEvent Object (like cEvent::Title()).


    Since the processing of the cEvent Objects for displaying in Skindesigner is running in an different thread, my assumption is that accessing cEvent Objects is somehow not thread safe when eepd Plugin is used. I don't know why, but this is the only logical reason i can imagine. Maybe Klaus has some more ideas what the reason could be.


    Cheers Louis

  • I just did some more testing, with odd results.. I did a restart of vdr to start off fresh .The Schedule menu started displaying correctly but only on my initial channel at startup. If I change channels and open the Schedule menu, it's empty. If I tune back to my initial channel and open Schedules, it's there again. My initial channel is set automatically (setting CurrentChannel in setup.conf) by my tv script so vdr starts on the channel that carries the 10-day guide. I tried tuning other channels on the same transponder and they all had an empty Schedule menu when I opened it. Then I tried changing my initial channel and restarted vdr. The Schedule menu was empty. I tune the channel that carries the 10-day guide and Schedule was displayed correctly.


    Next, I restarted vdr without vdr-eepg at all. I got the exact same behavior. The Schedule menu was only displayed correctly when tuned to the initial channel vdr starts on. This is happening with only vdr, vdr-softhddevice, and vdr-skindesigner running!


    Another strange observation is when I tune a non-init channel (CNN for example) and open the Schedule menu, the logging from the displaymenu.c debugging patch you sent me shows the correct epg data even though it's not being displayed:


    So it seems this problem is happening even without vdr-eepg running, and the behavior is inconsistent & confusing. To be sure that using 64bit isn't somehow causing this, I did the same tests on a 32bit vdr box and got the same results. I'm not sure what other testing I can do. If anyone has any suggestions, they're greatly appreciated!

  • Hi Jinx,


    hm, really strange :rolleyes: To be honest, i have no idea how to fix this. If the events are shown in the debug output correctly, they should also be displayed on the screen.


    All the debugging output was placed in the main thread...so let's continue with adding debug output in the thread that displays the menu items, somewhere obviously the event information gets lost. Please add in views/displaymenulistview.c in line 225:


    Code
    for (int i=0; i<itemCount; i++) {
            if (menuItems[i] && menuItems[i]->Dirty()) {
    +          esyslog("skindesigner: drawing menuitem %d", i);
                menuItems[i]->Clear();
                menuItems[i]->SetNumber(i);


    and in views/displaymenuitemview.c in line 324:


    Code
    cDisplayMenuItemSchedulesView::cDisplayMenuItemSchedulesView(cTemplateViewList *tmplList, const cEvent *event, 
                                                                 const cChannel *channel, eTimerMatch timerMatch, 
                                                                 eMenuCategory cat, bool isEpgSearchFav, bool current, bool selectable) 
                                                                : cDisplayMenuItemView(tmplList, current, selectable) {
        this->event = event;
    +  esyslog("skindesigner: constructor cDisplayMenuItemSchedulesView event %s", event->Title());
        this->channel = channel;
        ...


    and in line 357:


    Code
    if (event) {
    +      esyslog("skindesigner: setting Tokens for event %s", event->Title());
            if (selectable) {
                stringTokens.insert(pair<string,string>("title", event->Title() ? event->Title() : ""));
                ...


    Please post log in case nothing is displayed, and please add the whole lines of logging since also the ThreadIDs are displayed in the log.


    Would be ridicolous if we can not fix this annoying issue ;)


    Cheers Louis

  • I added your newest logging patch, recompiled, and restarted vdr (with only vdr-softhddevice and skindesigner-0.4.4-git.c5edc10f). Currently using the metrixhd skin.


    Schedule menu was empty and there was no blue highlight bar:


    If I press down arrow on the remote, the blue highlight bar appears but there still no text. This was added to the log:


    Unfortunately I don't have any logs yet from what Schedule works, cuz I couldn't get it to work. As soon as it decides to work, I'll post the log. Also, I don't know if this matters at all but I'm using VDPAU with an Nvidia video card. Just trying to think of any differences or anything that might have any significance at all.


    Thanks!

  • Hi,


    ok, now we are a step further. Your log shows that the menu items are not drawn at all. Only the menu item constructor is called, but there is completely no debug output from drawing the menu items in your log. Now we only have to check why ;)


    Could you please add the following debugging code:


    displaymenu.c, line 57:

    Code
    void cSDDisplayMenu::SetMenuCategory(eMenuCategory MenuCat) {
        if (!doOutput)
            return;
    +   esyslog("skindesigner: setting menu category %d", MenuCat);
        rootView->SetMenu(MenuCat, (state == vsInit) ? true : false);


    and in views/displaymenurootview.c line 458 change the function to:


    Code
    void cDisplayMenuRootView::RenderMenuItems(void) {
        if (listView) {
            esyslog("skindesigner: rendering listView");
            listView->Render();
        } else {
            esyslog("skindesigner: listView not set");
        }
    }


    We have to encircle the problem step by step...after i see the results i think we have to do some more debugging ;)


    Cheers Louis

  • Restart vdr and open Schedule menu, no text and no blue highlight bar:


    And when I press down arrow, blue highlight bar appears but no text:


    Zitat

    We have to encircle the problem step by step...after i see the results i think we have to do some more debugging ;)


    I'll add as many debugging lines as you like! :]

  • Ok, really strange...please add now the following in displaymenu.c in the Flush() function beginning at line 287:


    Code
    void cSDDisplayMenu::Flush(void) {
        if (!doOutput)
            return;
    +   esyslog("skindesigner: Flush state = %d", state);
        bool doFlush = false;
        if (state == vsInit) {
            rootView->Start();
    ...


    Cheers Louis

  • This is the same as before... Restart vdr, open Schedule, short pause, press down arrow.


  • Ok, next try, i hope this shows the bug ;)


    In views.displaymenulistview.c line 214:


    Code
    void cDisplayMenuListView::Render(void) {
    +   esyslog("skindesigner: Rendering items, count %d", itemCount);
        if (tabs[1] && oneColumn) {
            tabs[0] = 0;
    ...


    Please post the complete log in one block with the same actions you've done above...


    Cheers Louis

  • Hi Jinx,


    this is really strange...the cDisplayMenuItemSchedulesView Objects seem to disapear somehow. They are added in an array, but after adding and looping through this array, it seems to be empty. Weird...


    Ok, next debugging...please do the following in views/displaymenulistview.c line 147:



    and also in views/displaymenulistview.c line 216:



    Maybe VDR crashes with this debg code...if yes, please post the log till it crashes and provide a core dump of the crash. If it is not crashing, just post the log.


    Cheers Louis

  • Didn't crash! :)


  • Hi,


    ok...now i see a "pattern": if you check the added menu item numbers, you see that some menu item numbers just miss. In your last example the missing one is number 2. Because of some reasons also the menu items before (in this case 0 and 1) are NULL although they are set correctly before. In the debug log before menu item 14 is missing, all menuitems before were somehow set to NULL obviously.


    We have now to approaches: you could try to check why some items of the list are not set. Normally VDR deliveres a continuous list. For me the reason for that seems to be the way how you achiev your EPG data.


    Second point is that this not continuous menu items seem to puzzle skindesigner. I have to check why, currently i have no idea why this causes these strange effects ;)


    Cheers Louis

  • Zitat

    We have now to approaches: you could try to check why some items of the list are not set. Normally VDR deliveres a continuous list. For me the reason for that seems to be the way how you achiev your EPG data.


    How do I check that? Also, do you need my epg.data file? Does it still look like a timing/threading issue, or old way vs. new way issue?


    Zitat

    Second point is that this not continuous menu items seem to puzzle skindesigner. I have to check why, currently i have no idea why this causes these strange effects


    This sounds like I should just wait for further instruction. And it's getting late here. I think my brain is ready for shutdown/sleepmode. :]

  • Hi,


    i've checked the VDR code...the menuitem numbers definitively are continuous. But where is it? ;) To find it, please add the following:


    In displaymenu.c line 99:


    Code
    bool cSDDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Current, bool Selectable, const cChannel *Channel, bool WithDate, eTimerMatch TimerMatch) {
    +   esyslog("skindesigner: Start SetItemEvent %s - %d", Event->Title(), Index);
        if (!doOutput)
            return true;
        if (!rootView->SubViewAvailable())
            return false;
    ...


    and in line 197:


    Code
    void cSDDisplayMenu::SetItem(const char *Text, int Index, bool Current, bool Selectable) {
    +   esyslog("skindesigner: SetItem %d - %s", Index, Text);
        if (!doOutput)
            return;
    ...


    Depending on the output we have to go ahead... ;)


    Cheers Louis

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!