[confirm] TV Guide border highlight causing render exception (1 Viewer)

Brownard

Development Group
  • Team MediaPortal
  • March 21, 2007
    2,290
    1,872
    Home Country
    United Kingdom United Kingdom
    If I enable TV guide border highlighting and scroll through the guide I get a flicker caused by the render exception shown in the logs. It seems to only be noticeable when video is playing (but I expect this is due to the increased load).
    The flicker occurs when moving between programs in the guide and is particularly bad when using the mouse. It happens for all skins I've tried and is completely fixed if I disable border highlighting.

    I think I've tracked it down to the call to SendToFront (in TvGuideBase.SetFocusBorder) modifying the control collection whilst Render is enumerating it.

    Incidentally when MP is first installed the TV Guide settings for the skins are in an invalid state, genre colouring is enabled but border highlighting isn't (this also means you don't see the above behaviour on a fresh install), as soon as you change the settings you can no longer select this configuration.
     

    SciDoctor

    Retired Team Member
  • Premium Supporter
  • February 2, 2005
    1,465
    139
    England
    I noted this problem when the initial pre release testing was being done, unfortunately most team members couldn't replicate this as they used NV GPU and the problem seemed to only affect ATI GPU.

    Hopefully your above input will help to squash this pesky bug. I run without the border because of this.
     

    Brownard

    Development Group
  • Team MediaPortal
  • March 21, 2007
    2,290
    1,872
    Home Country
    United Kingdom United Kingdom
    • Thread starter
    • Moderator
    • #3
    A simple hack to fix this in the code is to call the foreach loop with Controls.ToArray(), so modifications to the original collection don't matter, don't know if this has a performance/knock on effect though
     

    Jay_UK

    Test Group
  • Team MediaPortal
  • October 6, 2009
    1,781
    283
    Derby
    Home Country
    United Kingdom United Kingdom
    Hi there,

    I've quickly tested on my main HTPC (i7 with a ATI HD6770) with the remote control only (no mouse) - no flickering in the main TV guide (11 row Titan) - with or without TV playing.

    I'll try and do some more testing tomorrow on a ATI HD5450 and a HD6410.

    J.
     
    Last edited:

    Guzzi

    Retired Team Member
  • Premium Supporter
  • August 20, 2007
    2,161
    747
    @HomeY

    Can someone with ATI graphics confirm this, and mantis.

    Thanks
    I can confirm. Actually, as @Brownard said, there is exceptions happening due to modifying the Control collection, yes.

    We already got this in mantis -> http://mantis.team-mediaportal.com/view.php?id=3868 :)
    Maybe @tourettes could comment the proposol from @Brownard in Post #3
    We shouldn't do such in the render loop imho.
    Have fixed that exception - pls try attached core.dll
    However, When scrolling fast, I get DirectX errors in log E_OUTOFMEMORY - seems, that textures are faster pushed to render device, than are disposed - maybe @tourettes can you comment? Will your maps solve such issues?
     

    Attachments

    • 3838-Core-FixForRenderException.zip
      2.5 MB
    Last edited:

    Guzzi

    Retired Team Member
  • Premium Supporter
  • August 20, 2007
    2,161
    747
    Ok, found that the E_OUTOFMEMORY exception is thrown, when the EPG is switching from bottom back to first item - and also, if moving up and the first item is selected - I think I better stop looking :confused: ...
    Edit: Can't reproduce now - so waiting for your testresults ... but at least the enumeration exception is fixed ... ;-)
     
    Last edited:

    Guzzi

    Retired Team Member
  • Premium Supporter
  • August 20, 2007
    2,161
    747

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Added branch to mantis - pls check:
    https://github.com/MediaPortal/MediaPortal-1/tree/EXP-3868-Fix_Flicker_Issue_on_EPG
    Note: We possibly might need a null check (in case the element is removed from collection while we're processing it) - I didn't do it, as it is already done in many (but not all) method calls and I didn't have a problem so far.

    It cures the .NET "collection modified" error, but it wont cure the logical issue we have. The collection content might be modified during the rendering pass so it is still possible to access an item that has been freed (unles .NET takes care of not freeing the item) or possible to skip some items if the collection receives new items while it is being iterated thru.
     

    Users who are viewing this thread

    Top Bottom