Scythe42's fixes for 1.4.0 (6 Viewers)

Status
Not open for further replies.

elliottmc

Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    I know this thread doesn't have to do with Music section, but if I'm right, the installer includes lastest Music Player binaries + files... I've tested the first installer you released, and Music Section was broken (it only played first file inside a playlist, then skip the others and stop). I remember to have read somewhere (may be in Music Player Rework thread), that there were some missing files... Could you take a look and upload a fixed installer?

    I would really like to test these fixes in my daily production system... but I can't because of that.

    Thanks a lot.

    If you update using the installer from the first post in this thread, it has all of the music stuff in it - no missing binaries.
     

    markus_g

    Portal Pro
    August 12, 2006
    104
    42
    Home Country
    Australia Australia
    I haven't edited any registry keys. I think it may be because I have a VGA lead also plugged into the same Sony Bravia. I will remove it and try again as I don't currently use the VGA. I had this plugged in as it improved a problem a long time ago in an old version of mediaportal.
    That explains the multiple displays showing up. Two connected displays from a GPU point of view. The individual connections cannot see that it is the same display.

    If the issue still persists or shows other unusual stuff we can work this scenario out as well.

    Hi,
    Thankyou, it now works correctly when booting with the display turned off with the VGA lead unplugged. Which is fine as I don't use the VGA anymore.

    I also thought I would try the following with the VGA plugged back in.
    1) Boot Windows from shutdown with display off.
    2) Turn on display. Mediaportal not displaying on HDMI or VGA. Can only see desktop.
    3) Switch back to HDMI and remove VGA lead. Windows drops back to single display and Mediaportal then displays correctly.

    Regards,
    Markus
     

    Scythe42

    Retired Team Member
  • Premium Supporter
  • June 20, 2009
    2,065
    2,703
    51
    Berlin
    Home Country
    Germany Germany
    I also thought I would try the following with the VGA plugged back in.
    1) Boot Windows from shutdown with display off.
    2) Turn on display. Mediaportal not displaying on HDMI or VGA. Can only see desktop.
    3) Switch back to HDMI and remove VGA lead. Windows drops back to single display and Mediaportal then displays correctly.
    Thank you testing. What you are seeing makes perfect sense.

    When the display is turned off:
    -> DISPLAY 1 in Windows ouputs to HDMI
    -> DISPLAY 2 in Windows outputs to VGA -> MP was redirected, because the primary display is not available! MP does not know it. It still thinks it is on DISPLAY 1.

    When the display is turned on:
    -> DISPLAY 1 outputs to HDMI and VGA (it is just one display)
    -> DISPLAY 2 still there but not displayed on any screen, therefore you cannot see MP. But the VGA port is still connected.

    When you remove VGA:
    -> DISPLAY 1 outputs to HDMI
    -> DISPLAY 2 is gone -> Window now moves MP to DISPLAY1

    When you boot up Windows with the the display turned on, the driver never provides you with DISPLAY 2 because it instantly knows that there is only one display.

    All in all this is a problem of the GPU driver. The scenario of using VGA and HDMI with an multi display aware application is not supported. There might be similar issues with AMD and Nvidia. What is missing is that MP is informed about being redirected to DISPLAY 2.
     

    HomeY

    Test Group
  • Team MediaPortal
  • February 23, 2008
    6,475
    4,645
    49
    ::1
    Home Country
    Netherlands Netherlands
    #4 : GUI not full smooth sometimes (maybe on first run) after playing a video, it looks better.
    Again need steps to reproduce and what you do not consider smooth. Such stuff cannot be random.

    Hope @HomeY can explain it too, i think he see that too.
    @Scythe42
    Easiest way to explain is a stuttering RSS feed + stuttering in menus. I've uploaded a video (GUI not smooth after startup.mp4) to Team FTP (my user folder) which is about 100 MB. It begins with a NOT smooth GUI, hard to see, but 'easiest' to see by watching the RSS feed. You can see the tiny hickups when the letters 'change color'. After watching 2/3 seconds of LiveTV and going back to Home Menu, it's smooth (you'll see way less 'colorchanges' on the RSS feed letters in the end of the Video. That's about the best i could do to make it visible for ya. No errors in logs, but attached you'll find the MediaPortal.log when i was reproducing this.

    No other steps needed for reproducing:
    1. Start MediaPortal
    2. Watch the RSS feed

    #5 : half screen (freezed) from wakeup from S3 (rarely)
    That is a regression. Need logs when this happens. Please not with a ton of tests. Reproduce and provide logs of it with description of what you did.

    I have see that on HTPC (so to do proper quick test) i need to turn off/on my videoprojector (not sure it like it lol). When i have try last night, MP was in full screen and freezed, i will retry.
    I've seen this also, still trying to reproduce this and i'll send logs when i've succeeded.

    ** EDIT **
    Just resumed S3, and it hangs. Last line in log after resume:
    Code:
    [2013-04-25 19:09:51,310] [Log	] [18	  ] [INFO ] - PowerScheduler: System changed from busy state to idle state
    Logs attached for the S3 'hang'
     
    Last edited:

    HomeY

    Test Group
  • Team MediaPortal
  • February 23, 2008
    6,475
    4,645
    49
    ::1
    Home Country
    Netherlands Netherlands
    OK, did some comparising with another fork (which is EXACTLY the same, only doesn't have your rework stuff included).
    RSS feed is perfectly smooth, and after resuming S3, the RSS feed starts rolling within 3 seconds. So it seems both of the above issues are related to your work.

    Maybe it helps if you can compare logs, so for this working situation, you'll find the MP logs attached. Hopefully 1 of them gives you some hints ;)
     

    Scythe42

    Retired Team Member
  • Premium Supporter
  • June 20, 2009
    2,065
    2,703
    51
    Berlin
    Home Country
    Germany Germany
    Easiest way to explain is a stuttering RSS feed + stuttering in menus. I've uploaded a video (GUI not smooth after startup.mp4) to Team FTP (my user folder) which is about 100 MB. It begins with a NOT smooth GUI, hard to see, but 'easiest' to see by watching the RSS feed. You can see the tiny hickups when the letters 'change color'. After watching 2/3 seconds of LiveTV and going back to Home Menu, it's smooth (you'll see way less 'colorchanges' on the RSS feed letters in the end of the Video. That's about the best i could do to make it visible for ya. No errors in logs, but attached you'll find the MediaPortal.log when i was reproducing this.
    We have some attribute called MaxFPS inside MP. This is never properly tied to the current refresh rate and can cause these problems. It is used to delay some animations to match a refresh rate (futile attempt), What is your refresh rate when you start MP an see the issue? Meaning before any kind of playback or whatever. It is 50Hz or 60Hz? And what is it after playback? Is the refresh rate changer used in your setup?

    It might be a pure coincidence of you seeing it smooth. I always had it stuttering since I started to use MP.

    ** EDIT **
    Just resumed S3, and it hangs. Last line in log after resume:
    Code:
    [2013-04-25 19:09:51,310] [Log	] [18	  ] [INFO ] - PowerScheduler: System changed from busy state to idle state
    Logs attached for the S3 'hang'

    Last action from OnResume() in the log is:
    Code:
    [2013-04-25 19:08:41,935] [Log	] [MPMain  ] [INFO ] - Main: OnResume - Init Input Devices
    [2013-04-25 19:08:41,935] [Log	] [MPMain  ] [INFO ] - DirectInput: not enabled

    Checking InputDevices.cs
    Code:
    	public static void Init()
    	{
    	  if (_initialized)
    	  {
    		Log.Info("Remotes: Init was called before Stop - stopping devices now");
    		Stop();
    	  }
    	  _initialized = true;
    	  diRemote.Init();
    	  X10Remote.Init();
    	  CentareaRemote.Init();
    	  HidListener.Init(GUIGraphicsContext.ActiveForm);
    	  MCE2005Remote.Init(GUIGraphicsContext.ActiveForm);
    	  FireDTVRemote.Init(GUIGraphicsContext.ActiveForm);
    	  HCWRemote.Init(GUIGraphicsContext.ActiveForm);
    	  IrTrans.Init(GUIGraphicsContext.ActiveForm);
    	}

    One of these functions does not return when MP is resuming on your system. It might be stuck in an infinite loop retrying. At least that would explain a hanging MP as it waits for something that is never happening.

    Which one is used on your system, so I can check the code where it is stuck?

    Can you try without using a remote, to make sure we are stuck here as well?

    Also try with a delay in resuming MP in case it is caused by some hardware not yet back when Windows wakes up. I see the devices are coming back several seconds later...

    A resume delay should never be needed unless as a workaround for other bugs...
     
    Last edited:

    HomeY

    Test Group
  • Team MediaPortal
  • February 23, 2008
    6,475
    4,645
    49
    ::1
    Home Country
    Netherlands Netherlands
    We have some attribute called MaxFPS inside MP. This is never properly tied to the current refresh rate and can cause these problems. It is used to delay some animations to match a refresh rate (futile attempt), What is your refresh rate when you start MP an see the issue? Meaning before any kind of playback or whatever. It is 50Hz or 60Hz? And what is it after playback? Is the refresh rate changer used in your setup?
    - DRR is used on my system, desktop refresh rate set to 50Hz (since i'm using RTSP for LiveTV)
    - TV is also 50Hz, so DRR doesn't kick in when i start it (default DRR setting set to 50Hz)

    It might be a pure coincidence of you seeing it smooth. I always had it stuttering since I started to use MP.
    Unfortunately not. Very well visible in real time (video sucks indeed) and very easily when i run the fork without your work, it's smooth from the start.
    Also just noticed that when the GUI finally is smooth, i can simply fall back to 'stuttering' after a few mins idling.


    Which one is used on your system, so I can check the code where it is stuck?
    Microsoft MCE checked (using Harmony One)

    Can you try without using a remote, to make sure we are stuck here as well?
    Will try now and report back in a minute.
    ** EDIT **
    Logs removed again, tested with wrong fork, doing it again now!

    Also try with a delay in resuming MP in case it is caused by some hardware not yet back when Windows wakes up. I see the devices are coming back several seconds later...

    A resume delay should never be needed unless as a workaround for other bugs...
    I never had the 'not smooth' GUI before, i would have definitely noticed it ;) Been using Resume from S3 for years now, and never had to use a delay.
     
    Last edited:

    Scythe42

    Retired Team Member
  • Premium Supporter
  • June 20, 2009
    2,065
    2,703
    51
    Berlin
    Home Country
    Germany Germany
    We have some attribute called MaxFPS inside MP. This is never properly tied to the current refresh rate and can cause these problems. It is used to delay some animations to match a refresh rate (futile attempt), What is your refresh rate when you start MP an see the issue? Meaning before any kind of playback or whatever. It is 50Hz or 60Hz? And what is it after playback? Is the refresh rate changer used in your setup?
    - DRR is used on my system, desktop refresh rate set to 50Hz (since i'm using RTSP for LiveTV)
    - TV is also 50Hz, so DRR doesn't kick in when i start it (default DRR setting set to 50Hz)
    We have a winner. I default to 60Hz because that is the standard RR for Windows! Old code defaults to 50Hz. I made this change on purpose because to be frank: you want the UI displayed at 60Hz and only for content use a different RR.

    To solve this MP needs to actually query the refresh rate when starting instead of using a magic number. Unless you have the same value when MP is starting you will notice this. I reverted all magic numbers to Windows defaults where ever possible to provide maximum compatibility with installations.

    I never had the 'not smooth' GUI before, i would have definitely noticed it ;) Been using Resume from S3 for years now, and never had to use a delay.
    It is faster in my builds... Maybe now too fast and an underlying bug in some other parts is visible now...

    Anyway, remote stuff seems hanging, so we need to find out why. Waiting for you to report back if it still happens with no remote selected. If not, I start going to the code where we might have infinite retries our ignored exceptions.
     
    Last edited:

    Scythe42

    Retired Team Member
  • Premium Supporter
  • June 20, 2009
    2,065
    2,703
    51
    Berlin
    Home Country
    Germany Germany
    Status
    Not open for further replies.

    Users who are viewing this thread

    Top Bottom