Channel switching bug (logical error ?) (1 Viewer)

tanstaafl

Portal Member
December 19, 2007
13
0
Uppsala
Home Country
Sweden Sweden
Al_Capone,
you're describing the problem just fine.
Problem is, neither Ronilse nor Flokel can reproduce. That makes logs from your end important. Maybe there's something quirky at your end, and maybe your logs can identify what it is. So post your logs! =)
 

Al_Capone

MP Donator
  • Premium Supporter
  • September 26, 2006
    527
    19
    Home Country
    Norway Norway
    WOW.
    one major mistake by me ! (i just reproduced it again)
    it is not "select channel1" and press next channel 2 times per second.

    it is not "select channel1" and press next channel 2 times per second like 15 times !
    you will see channels change , until you suddenly get no info, and then Radio comes on.

    the following logs are produced like this:
    1.- I emptied both log-directories.
    2.- started mediaportal "channel1" was selected.
    3- *fullscreen selected.*
    4.- I pressed "ch+" like ~10 times
    5.- I ended up at a radio station.


    Please try this new way to reproduce yourself, select channel1 , then press (two presses per second) for "previous" channel as many times as you need, pretend that you are trying to browse around your whole channel list.
     

    tanstaafl

    Portal Member
    December 19, 2007
    13
    0
    Uppsala
    Home Country
    Sweden Sweden
    Just having a quick look at the code.
    Shouldn't TvPlugin.TvHome.ZapToNextChannel's else-clause be setting local variable currentChan to m_zapChannel like in ZapToPreviousChannel?

    Minor issue, seems it's only used locally to write to log.

    Code:
     /// <summary>
        /// Changes to the next channel in the current group.
        /// </summary>
        /// <param name="useZapDelay">If true, the configured zap delay is used. Otherwise it zaps immediately.</param>
        public void ZapToNextChannel(bool useZapDelay)
        {
          Channel currentChan = null;
          int currindex;
          if (m_zapchannel == null)
          {
            currindex = GetChannelIndex(Channel);
            currentChan = Channel;
          }
          else
          {
            currindex = GetChannelIndex(m_zapchannel); // Zap from last zap channel 
    //***********************************************************************        
    currentChan = Channel;   // TANSTAAFL: HERE, compare to below
    //***********************************************************************
          }
          GroupMap gm;
          Channel chan;
          //check if channel is visible 
          //if not find next visible 
          do
          {
            // Step to next channel 
            currindex++;
            if (currindex >= CurrentGroup.ReferringGroupMap().Count)
            {
              currindex = 0;
            }
            gm = (GroupMap) CurrentGroup.ReferringGroupMap()[currindex];
            chan = (Channel) gm.ReferencedChannel();
          } while (!chan.VisibleInGuide);
    
          TVHome.UserChannelChanged = true;
          m_zapchannel = chan;
          Log.Info("Navigator:ZapNext {0}->{1}", currentChan.DisplayName, m_zapchannel.DisplayName);
          if (GUIWindowManager.ActiveWindow == (int) (int) GUIWindow.Window.WINDOW_TVFULLSCREEN)
          {
            if (useZapDelay)
            {
              m_zaptime = DateTime.Now.AddMilliseconds(m_zapdelay);
            }
            else
            {
              m_zaptime = DateTime.Now;
            }
          }
          else
          {
            m_zaptime = DateTime.Now;
          }
        }
    
        /// <summary>
        /// Changes to the previous channel in the current group.
        /// </summary>
        /// <param name="useZapDelay">If true, the configured zap delay is used. Otherwise it zaps immediately.</param>
        public void ZapToPreviousChannel(bool useZapDelay)
        {
          Channel currentChan = null;
          int currindex;
          if (m_zapchannel == null)
          {
            currentChan = Channel;
            currindex = GetChannelIndex(Channel);
          }
          else
          {
    //***************************************************************
            currentChan = m_zapchannel; // <--- TANSTAAFL: and HERE
    //***************************************************************
            currindex = GetChannelIndex(m_zapchannel); // Zap from last zap channel 
          }
          GroupMap gm;
          Channel chan;
          //check if channel is visible 
          //if not find next visible 
          do
          {
            // Step to prev channel 
            currindex--;
            if (currindex < 0)
            {
              currindex = CurrentGroup.ReferringGroupMap().Count - 1;
            }
            gm = (GroupMap) CurrentGroup.ReferringGroupMap()[currindex];
            chan = (Channel) gm.ReferencedChannel();
          } while (!chan.VisibleInGuide);
    
          TVHome.UserChannelChanged = true;
          m_zapchannel = chan;
          Log.Info("Navigator:ZapPrevious {0}->{1}",
                   currentChan.DisplayName, m_zapchannel.DisplayName);
          if (GUIWindowManager.ActiveWindow == (int) (int) GUIWindow.Window.WINDOW_TVFULLSCREEN)
          {
            if (useZapDelay)
            {
              m_zaptime = DateTime.Now.AddMilliseconds(m_zapdelay);
            }
            else
            {
              m_zaptime = DateTime.Now;
            }
          }
          else
          {
            m_zaptime = DateTime.Now;
          }
        }
     

    x4mer

    MP Donator
  • Premium Supporter
  • November 8, 2007
    306
    24
    Toronto
    Home Country
    Canada Canada
    Al_Capone

    Just tried to reproduce this with RTSP on & off, & could not reproduce the problem. I have no radio stations scanned in on TV server though.

    Do you have channels listed in TV server above the channel at the top of your guide?

    I think the channel up/down will include these channels in the cycle, even if you have them unchecked. If some of them are radio channels, that incorrectly are set as TV by your provider, then that could explain the problem you're having. If this is the case, use SQL management studio to change the type on these channels to radio, & they won't be part of the TV section at all anymore, they'll move to the radio section.
     

    Al_Capone

    MP Donator
  • Premium Supporter
  • September 26, 2006
    527
    19
    Home Country
    Norway Norway
    Thanks for trying to reproduce,
    no Tvchannels does not contain radio channels, (I've attached my channel-list)
    I guess the logs at least confirm that this does, in fact, happens ,so you do not think I am crazy ? :)

    (attached my channel export)
     

    Attachments

    • export.xml
      30.6 KB

    x4mer

    MP Donator
  • Premium Supporter
  • November 8, 2007
    306
    24
    Toronto
    Home Country
    Canada Canada
    The first 1/3 of your channel list are radio stations. Your Telenor channel group contains many radio stations, & the bottom of your telenor group has


    <map ChannelName="Radio1 Rock" SortOrder="10000" />
    <map ChannelName="Veronika" SortOrder="10000" />
    <map ChannelName="Radio Mila" SortOrder="10000" />
    <map ChannelName="Scandinavia Sat. R" SortOrder="10000" />
    <map ChannelName="Radio One" SortOrder="10000" />
    <map ChannelName="Radio 10" SortOrder="10000" />
    <map ChannelName="Radio NOROC" SortOrder="10000" />
    <map ChannelName="NRK Alltid Folkemusikk" SortOrder="10000" />
    <map ChannelName="NRK Alltid Klassisk" SortOrder="10000" />
    <map ChannelName="NRK Alltid Nyheter" SortOrder="10000" />
    <map ChannelName="YLE Puhe" SortOrder="10000" />


    Looking at your MP log, your channel flipping was fine till you reached Star! as seen here2009-02-20

    23:06:17.227483 [Debug][MPMain]: ZapNextChannel()
    2009-02-20 23:06:17.267541 [Info.][MPMain]: Navigator:ZapNext NRK1->VH1
    2009-02-20 23:06:17.267541 [Debug][MPMain]: UpdateOSD()
    2009-02-20 23:06:17.577987 [Info.][MPMain]: TVHome:OnNextChannel()
    2009-02-20 23:06:17.577987 [Debug][MPMain]: ZapNextChannel()
    2009-02-20 23:06:17.618045 [Info.][MPMain]: Navigator:ZapNext NRK1->VH1 Classic
    2009-02-20 23:06:17.618045 [Debug][MPMain]: UpdateOSD()
    2009-02-20 23:06:17.878419 [Info.][MPMain]: TVHome:OnNextChannel()
    2009-02-20 23:06:17.878419 [Debug][MPMain]: ZapNextChannel()
    2009-02-20 23:06:17.918477 [Info.][MPMain]: Navigator:ZapNext NRK1->Star!
    2009-02-20 23:06:17.918477 [Debug][MPMain]: UpdateOSD()
    2009-02-20 23:06:18.238937 [Info.][MPMain]: TVHome:OnNextChannel()
    2009-02-20 23:06:18.238937 [Debug][MPMain]: ZapNextChannel()
    2009-02-20 23:06:18.289009 [Info.][MPMain]: Navigator:ZapNext NRK1->KISS
    2009-02-20 23:06:18.289009 [Debug][MPMain]: UpdateOSD()
    2009-02-20 23:06:18.399168 [Info.][MPMain]: Exception :confused:ystem.NullReferenceException: Object reference not set to an instance of an object.
    at TvPlugin.TvZapOsd.ShowPrograms()




    The one following Star in the list (KISS) is a radio station according to your channel list. From that point on in your channel list, there are TV & Radio stations sharing the same sort order as seen here



    <map ChannelName="History Channel" SortOrder="21" />
    <map ChannelName="Hallmark" SortOrder="22" />
    <map ChannelName="MTV" SortOrder="23" />
    <map ChannelName="VH1" SortOrder="24" />
    <map ChannelName="VH1 Classic" SortOrder="25" />
    <map ChannelName="Star!" SortOrder="26" />
    <map ChannelName="KISS" SortOrder="26" />
    <map ChannelName="Alpha Radio" SortOrder="27" />
    <map ChannelName="Eurosport" SortOrder="27" />
    <map ChannelName="Eurosport 2" SortOrder="28" />
    <map ChannelName="Radio Norge" SortOrder="28" />
    <map ChannelName="Radio Paris Oslo" SortOrder="29" />
    <map ChannelName="Disney Channel" SortOrder="29" />
    <map ChannelName="Toon Disney" SortOrder="30" />
    <map ChannelName="EXPRES Bratislava" SortOrder="30" />
     

    Al_Capone

    MP Donator
  • Premium Supporter
  • September 26, 2006
    527
    19
    Home Country
    Norway Norway
    Thank you - sounds strange, I did not even knew that a television list could contain radio channels.
    Will check it out soon, and test/confirm/fix.
     

    Al_Capone

    MP Donator
  • Premium Supporter
  • September 26, 2006
    527
    19
    Home Country
    Norway Norway
    Yes. My export file lists channels that are not displayed in "TV server configuration"

    both "All channels" and "telenor" sortorder lists contains radio channels.
    I removed all radio-channels from sortorder-lists - doing so solved the problem.

    should any tuning-info for radio stations be in this list ?
     

    Users who are viewing this thread

    Top Bottom