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

tanstaafl

Portal Member
December 19, 2007
13
0
Uppsala
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
    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
    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
    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
    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

    x4mer

    MP Donator
  • Premium Supporter
  • November 8, 2007
    306
    24
    Toronto
    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
    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
    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 (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    C Telenet analog-to-digital switch -- manually finding and inputting DVB-C channels in Mediaportal2 General 0
    G Switch to new channel at begining of program automatically Feature Requests 0
    D [further infos missing] Problems switching to live tv channel after resume 2.2 Archive 1
    J Multiple IPTV channels TV-Server 2
    M Add Radio channels and EPG to Mediaportal xmlTV 2
    R Sort or restrict channels by group in mapping dialog Improvement Suggestions 4
    M 1.25.0 Tv Server Configuration Italian Dvb-t2 test channel preview error Television (MyTV frontend and TV-Server) 7
    P Missing channels after rebuild (all on one MUX ?) General 2
    Ralph Holmes One TV channel is duff - all the others are OK General 6
    A UK Freeview channel changes Installation, configuration support 14
    framug [solved] TVguide : channel number. MediaPortal 1 Talk 7
    T Client / Server slow channel-to-channel change (zapping) General Support 1
    V [solved] FTA channels but reported as encrypted MediaPortal 1 Talk 7
    T Server / client channel logo location Installation, configuration support 6
    g0rsq UK Freesat not tunning BBC HD channels, and lots of other freesat channels missing. Newcomers Forum 4
    W [solved] MP suddenly Crashes when starting live TV on most channels and on recordings from the same channels General Support 20
    W [solved] MP suddenly Crashes when starting live TV on some channels and on some recordings Television (MyTV frontend and TV-Server) 1
    raffe [TV] Option for adding IPTV channels without checking Improvement Suggestions 2
    vapourEyes Automatically Tune to Strongest Duplicate Channel Improvement Suggestions 106
    T [solved] Any idea where Channel 107 (DVB-T2) BBC News HD (and others!) have gone??? Installation, configuration support 12
    B [solved] tvguide.xml not importing australian channels Electronic Program Guide 10
    R [fixed] [MP2-819] MP2 Server crashes on ATSC OTA channel scan Submit: Bug Reports 33
    R [solved] All Channel 7 stations listed in guide as 1000 Newcomers Forum 4
    J Rename channel by name Television (MyTV frontend and TV-Server) 2
    P IPTV Channel Problem TV-Server 0
    Similar threads

























    Top Bottom