1.15.0 - MediaPortal Invisible on Resume from Hibernate | Page 2

Discussion in 'Archive' started by rmeredit, October 1, 2016.

  1. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,213
    Likes Received:
    6,177
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,164 / 9
    Home Country:
    France France
    Show System Specs
    You can use deploy separate installer to update to another MP version and like explain MM, you can backup your data before proceed, i'm used to that for testing :)

    To do that :

    1- Clean your %temp% folder
    2- Start the full installer (what ever is 1.15 1.14 etc.)
    3- Close the installer (or cancel)
    4- Go to your %temp% and in \MediaPortal Installation\deploy, you can find here both installer, it's the installer start using the full one but with other check etc.
    5- Install first : package-mediaportal.exe and then package-tvengine.exe (if you use TV).

    When doing that, you will use the version that full installer extract.

    Based on MM comment, when GPU crash, MP can't be working, when working that issue, it was not possible to do a fully recover when driver crash or when simulate a crash (by disabling GPU and re-enable it) when doing that MP didn't detect the new D3D GPU card, no clue why, i think it's maybe DX9 C# related.

    So for sure something happen, now maybe MP on resume trigger something that lead to GPU crash, from your log, we can see dispose font before the devicelost message, it's kinda on resume, MP react like left code not executed on shutdown (i'm not sure of that lol).


     
    • Thank You! Thank You! x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. SpudR
    • Team MediaPortal

    SpudR Documentation Group

    Joined:
    July 27, 2007
    Messages:
    2,566
    Likes Received:
    446
    Occupation:
    CTO, MD
    Location:
    Yorkshire, UK
    Ratings:
    +669 / 2
    Home Country:
    England England
    Show System Specs
    Just a quick FYI
    I have had something similar and noticed that the nVidia drivers are crashing and recovering. That really buggers up the playback!
    My Event Viewer reports errors with KERNEL.DLL or somesuch...
    Nvidia driver version 372.90

    Not sure whether related or not - but worth posting JIC.
     
    Last edited: October 3, 2016
    • Like Like x 1
  4. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,515
    Likes Received:
    4,723
    Ratings:
    +8,189 / 17
    Home Country:
    New Zealand New Zealand
    Yes, exactly! This is the part I'm struggling to understand. I can't see why that is happening.
     
    • Agree Agree x 1
  5. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,213
    Likes Received:
    6,177
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,164 / 9
    Home Country:
    France France
    Show System Specs
    Maybe it's a side effect of GPU drivers crash :

    "10/3/2016 8:47:05 AM";"Display";"(0)";"Warning";"Display driver igfx stopped responding and has successfully recovered.";"4101"

    and from MP.log :
    [2016-10-03 08:47:33,377] [Log ] [MPMain ] [DEBUG] - GUIFont:texture disposing:0 debug

    So 30 secs in between (this delay comes from the 30 secs is the option delay).
    So the drivers crash and recover but we know that when it happen MP can't work after that and this is surely why we get the dispose and after all kind of errors messages about GPU.

    I think we can't do nothing right now about that because when testing/simulate the crash MP or i would say .NET didn't know/detect the new D3D GPU from the current Form Window instance lol.
     
  6. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,515
    Likes Received:
    4,723
    Ratings:
    +8,189 / 17
    Home Country:
    New Zealand New Zealand
    Yes, I seem to remember Scythe42 and/or you discovering this. I will try to find some time to do some research about whether this is actually true. On my system (still XP), DVBViewer (written in Delphi) seems to be able to do it... or at least, it seems more resilient than MP. It can handle Window resize (which I know usually triggers D3D device lost), windowed/full-screen switching etc. much better.
     
    • Like Like x 1
  7. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,213
    Likes Received:
    6,177
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,164 / 9
    Home Country:
    France France
    Show System Specs
    I have retry yesterday while debugging and when disable/enable GPU card, in C# the manager class is not more filled correctly from the current windows form instance.
    The solution is to close MP and restart it lol.

    I will try how dvbviewer handle this too later :p

    The manager (Microsoft.DirectX.Direct3D.Manager.Adapters) is no more filled correctly and no clue why maybe there some kind of trick to have it correctly, then we can maybe doing something to reset properly the D3D device etc.

    Log (open)

    [2016-10-04 20:13:19,906] [Log ] [MPMain ] [INFO ] - Main: GPU_HUNG - Error in the application.
    -2005530512 (Unknown)
    at Microsoft.DirectX.Direct3D.Device.PresentInternal(tagRECT* sourceRectangle, tagRECT* destRectangle, IntPtr overrideWindow)
    at Microsoft.DirectX.Direct3D.Device.Present()
    at MediaPortalApp.Render(Single timePassed) in D:\svnroot\MediaPortal-1_Fork_1\mediaportal\MediaPortal.Application\MediaPortal.cs:line 3610
    [2016-10-04 20:13:19,908] [Log ] [MPMain ] [DEBUG] - D3D: RecoverDevice()
    [2016-10-04 20:13:19,910] [Log ] [MPMain ] [DEBUG] - Main: RecreateSwapChain()
    [2016-10-04 20:13:19,962] [Log ] [MPMain ] [DEBUG] - GUIFontManager: SafeDispose()
    [2016-10-04 20:13:19,984] [Log ] [MPMain ] [DEBUG] - TextureManager: Dispose()
    [2016-10-04 20:13:19,985] [Log ] [MPMain ] [INFO ] - TexturePacker:Dispose()
    [2016-10-04 20:13:19,985] [Log ] [MPMain ] [INFO ] - TexturePacker: remove texture:1997
    [2016-10-04 20:13:19,986] [Log ] [MPMain ] [INFO ] - TexturePacker: remove texture:1986
    [2016-10-04 20:13:19,987] [Log ] [MPMain ] [INFO ] - TexturePacker: remove texture:1996
    [2016-10-04 20:13:19,987] [Log ] [MPMain ] [INFO ] - TexturePacker: remove texture:1987
    [2016-10-04 20:13:19,988] [Log ] [MPMain ] [INFO ] - TexturePacker: remove texture:1982
    [2016-10-04 20:13:19,988] [Log ] [MPMain ] [INFO ] - TexturePacker: remove texture:1995
    [2016-10-04 20:13:19,989] [Log ] [MPMain ] [INFO ] - TexturePacker: remove texture:1993
    [2016-10-04 20:13:19,989] [Log ] [MPMain ] [INFO ] - TexturePacker: remove texture:1991
    [2016-10-04 20:13:19,989] [Log ] [MPMain ] [INFO ] - TexturePacker: remove texture:1990
    [2016-10-04 20:13:19,990] [Log ] [MPMain ] [INFO ] - TexturePacker: remove texture:1981
    [2016-10-04 20:13:19,990] [Log ] [MPMain ] [INFO ] - TexturePacker: remove texture:1984
    [2016-10-04 20:13:19,991] [Log ] [MPMain ] [INFO ] - TexturePacker: remove texture:1992
    [2016-10-04 20:13:19,991] [Log ] [MPMain ] [INFO ] - TexturePacker: remove texture:1978
    [2016-10-04 20:13:19,992] [Log ] [MPMain ] [INFO ] - TexturePacker: remove texture:1974
    [2016-10-04 20:13:19,992] [Log ] [MPMain ] [INFO ] - TexturePacker: remove texture:1977
    [2016-10-04 20:13:19,992] [Log ] [MPMain ] [INFO ] - TexturePacker: remove texture:1976
    [2016-10-04 20:13:19,996] [Log ] [MPMain ] [DEBUG] - Main: RecreateSwapChain() by restoring startup DirectX values
    [2016-10-04 20:13:20,153] [Log ] [MPMain ] [DEBUG] - D3D CleanupEnvironment()
    [2016-10-04 20:13:30,061] [Log ] [MPMain ] [DEBUG] - D3D: Init()
    [2016-10-04 20:13:46,727] [Log ] [MPMain ] [DEBUG] - D3D: Init Adapter #0: NVIDIA GeForce GTX 460 - Driver: nvd3dum.dll (10.18.13.6839) - DeviceName: \\.\DISPLAY10
    [2016-10-04 20:13:46,728] [Log ] [MPMain ] [DEBUG] - D3D: Init Adapter #1: - Driver: (0.0.0.0) - DeviceName:
    [2016-10-04 20:13:46,728] [Log ] [MPMain ] [DEBUG] - D3D: Init Adapter #2: - Driver: (0.0.0.0) - DeviceName:
     
  8. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,213
    Likes Received:
    6,177
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,164 / 9
    Home Country:
    France France
    Show System Specs
    Well i have made some test :)
    DVBViewer works.
    Kodi crash lol.

    @rmeredit can you try the attached bin ? (backup original before).
    I have add a restart of MP when GPU crash.
     

    Attached Files:

  9. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,515
    Likes Received:
    4,723
    Ratings:
    +8,189 / 17
    Home Country:
    New Zealand New Zealand
    @Sebastiii
    I wonder if the problem/limitation is that we should be (but are not!) releasing the render target before calling reset:
    https://msdn.microsoft.com/en-us/library/windows/desktop/bb174425(v=vs.85).aspx
    This is difficult for us because our render target is the main form/window. That could be why reset doesn't work unless MP is restarted.

    I found this suggestion which may help:
    http://stackoverflow.com/questions/...-in-slimdx-dx9-without-disposing-all-device-r

    I don't understand enough about D3D, back buffers etc. to fix this problem. :(
     
    • Thank You! Thank You! x 1
  10. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,213
    Likes Received:
    6,177
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,164 / 9
    Home Country:
    France France
    Show System Specs
    Thanks :)

    That could be a nice idea for ex when with switch from full-screen to windowed or reverse, this will avoid to call reset which is slow :p
    But i think it will not correct the issue when the driver is recovered from windows because when it happen, it's like the GPU card doesn't exist anymore.

    From my POV (while debugging) The manager (Microsoft.DirectX.Direct3D.Manager.Adapters) seems to be filled with all correct information when the windows form is created but when the driver crash and recovered (that seems to happen for @rmeredit) the Microsoft.DirectX.Direct3D.Manager.Adapters along with Screen.... call are filled with 0 value for the new recovered GPU card and i have try different thing the only way was to restart MP (because a new windows form is created).

    So effectively , we missed surely something because dvbviewer handle it correctly and i think it works with DX9 but Kodi for ex directly crash.

    Yes me too backbuffer stuff and co and not easy for me but still it will surely possible to make it works, maybe we need to test other open source C# and find one that can handle it and understand why lol.
     
  11. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,515
    Likes Received:
    4,723
    Ratings:
    +8,189 / 17
    Home Country:
    New Zealand New Zealand
    I humbly and respectfully disagree. :)

    We can check the log files...
    [2016-10-03 08:47:35,019] [Log ] [MPMain ] [WARN ] - Main: OnDeviceLost()
    [2016-10-03 08:47:35,019] [Log ] [MPMain ] [DEBUG] - Main: OnDeviceLost CurrentState : LOST
    [2016-10-03 08:47:35,029] [Log ] [MPMain ] [DEBUG] - D3D: RecoverDevice()
    [2016-10-03 08:47:35,029] [Log ] [MPMain ] [DEBUG] - Main: RecreateSwapChain()
    [2016-10-03 08:47:35,049] [Log ] [MPMain ] [DEBUG] - GUIFontManager: SafeDispose()
    [2016-10-03 08:47:35,059] [Log ] [MPMain ] [DEBUG] - TextureManager: Dispose()
    [2016-10-03 08:47:35,069] [Log ] [MPMain ] [INFO ] - TexturePacker:Dispose()
    [2016-10-03 08:47:35,069] [Log ] [MPMain ] [DEBUG] - Main: RecreateSwapChain() by restoring startup DirectX values
    [2016-10-03 08:47:35,079] [Error ] [MPMain ] [ERROR] - D3D: D3DERR_INVALIDCALL - presentation parameters might contain an invalid value
    [2016-10-03 08:47:35,119] [Log ] [MPMain ] [DEBUG] - GraphicContext: Loading settings from C:\ProgramData\Team MediaPortal\MediaPortal\ScreenCalibration1920x1080.fs.xml
    [2016-10-03 08:47:35,119] [Log ] [MPMain ] [DEBUG] - Skin Folder : C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Titan
    [2016-10-03 08:47:35,129] [Log ] [MPMain ] [DEBUG] - Cache Folder: C:\ProgramData\Team MediaPortal\MediaPortal\Cache\Titan
    ...

    IMHO the bolded part is the problem. That error message seems to be ignored, and MP carries on. I think that is wrong; the error should not be ignored, because it means that reset/recover failed. MP cannot be stable after that unless we find out how to reset/recover the device properly. My suggestion is an idea for solving that error => successful reset/recover.

    So to be clear, we dispose fonts (font manager), textures (texture manager, texture packer)... but it seems that we do not dispose the render target (which is the main form/window), and that's what I think the problem is.

    Does that make more sense?
     
    • Like Like x 1
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!