1.15.0 MediaPortal Invisible on Resume from Hibernate (1 Viewer)

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    After many try, until we are not able to retrieve list of GPU card after a recovery from Windows, it's even no need to try to fix the rendertarget or swapchain etc :(
    Can you attach your test code?
    I'd like to have a look and maybe have a try.

    The only way that i have quite succeeded was about to start new mediaportalApp inside already started one but after it doesn't work well.
    Well, as you know MediaPortalApp/D3D is the render target, so I'm not surprised. This is why I have continued to say that the render target needs to be disposed. ;)

    I think mostly that the main() function needs to be refactored so that the MediaPortalApp instance ("app") can be disposed and recreated after GPU crash. I'm talking about this part:
    https://github.com/MediaPortal/Medi...iaPortal.Application/MediaPortal.cs#L978-L994
    Code:
      var app = new MediaPortalApp();
      if (app.Init())
      {
        try
        {
          Log.Info("Main: Running");
          GUIGraphicsContext.BlankScreen = false;
          Application.Run(app);
          app.Focus();
        }
        catch (Exception ex)
        {
          Log.Error(ex);
          Log.Error("MediaPortal stopped due to an exception {0} {1} {2}", ex.Message, ex.Source, ex.StackTrace);
          _mpCrashed = true;
        }
        app.OnExit();
      }
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    Great :)

    You are right all along and you are faster than me lol.
    So yes we need refactored because if we force the dispose of render target, it close MP :p

    The tested code was based on my build and i have quite all reverted except adding code to auto restart MP (better than nothing for now).
    I will try to put code based on master with an EXP branch, like this you can surely try to look on this.

    Thanks :p
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    @mm1352000 i have pushed a branch : https://git.io/vP4gD
    But still i can't make it works like this night :(

    But you are right we really need to do the refactoring but even with that i'm not sure Manager.Adapters will be correct.
    I have try in the catch exception (from your above pasted code) to start another instance of MP and it was not fully good too (for sure manager was not filled correctly either and all was disposed).
     

    Users who are viewing this thread

    Top Bottom