MP1.18 has crashed sometime after TV and AVR is turned off (1 Viewer)

Dr Morris

Portal Member
September 25, 2012
19
4
Dorset
Home Country
United Kingdom United Kingdom
Hi all,

I've always had occasional difficulties with MEPO presenting me with a "stopped working" whenever I turn on the TV and AVR. Everything is fine when the TV turns off and this in turn uses HDMI to turn off the AVR. When turning things on, the AVR is turned on and then the TV using a Harmony Hub to orchestrate things. I've tried ordering things differently but this makes no difference.

The issue has been pretty bad since v18 :-( though and I'm hoping the community can assist. I see plenty of historical posts on this topic so guess its a perennial problem, but I need to put some stability in place. I am running a minimal set of plug ins and have with previous versions completely re-installed from scratch to narrow things down.

Logs attached. in the attached:
  • MEPO Started
  • BBC One HD started
  • TV/AVR switched off
  • Wait 10 seconds
  • TV/AVR switched on
  • Full picture exists, but blocky and stutters - recover
  • TV/AVR switched off
  • Wait 10 seconds
  • TV/AVR Switched on
  • MEPO crashed message
  • Logs collected and attached
I'm running:
W10 1703 build 15063.674
Defender (all mepo directories excluded and I've tried running with it off)
Samsung TV and
Denon AVR X3000.


Grateful for any thoughts, hints, tips or magic dust available.

FYI that the AVR is set so that the passthru feed is the PCTV as previously when turning everything on the sound would hit the TV first because the TV won't detect the AVR until its powered up and the AVR kicks in - i thin all of this may be interlinked but I've not found a combo that stops the crash.
 

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hello

    Thank you for the report, and for the log files. (y)
    Unfortunately your MediaPortal log level (MP Config -> general section -> log verbosity) is set to "error", so the only thing we can see in the MP log is:
    [collapse]
    [2017-11-11 14:50:10,004] [Error ] [MPMain ] [ERROR] - DirectShowUtil: Failed filter: not found
    [2017-11-11 14:50:10,024] [Error ] [MPMain ] [ERROR] - DirectShowUtil: Failed filter: not found
    [2017-11-11 14:54:09,129] [Error ] [MPMain ] [ERROR] - DirectShowUtil: Failed filter: not found
    [2017-11-11 15:04:48,552] [Error ] [MPMain ] [ERROR] - DirectShowUtil: Failed filter: not found
    [2017-11-11 15:04:48,557] [Error ] [MPMain ] [ERROR] - DirectShowUtil: Failed filter: not found[/collapse]

    (...which just means you haven't configured your codec settings.)
    This isn't much use for troubleshooting! ;)

    If you're going to use Watchdog option 3 ("export..."), you need to manually ensure the log level is set before performing the test. This is why it's better to use Watchdog option 1 or 2 ("report a bug...") - the log level should be set automatically.

    So, please can you collect and attach new log files with log level set to debug.

    Thanks again!
    mm
     

    Dr Morris

    Portal Member
    September 25, 2012
    19
    4
    Dorset
    Home Country
    United Kingdom United Kingdom
    Damn! Fortunately (or not) its easy enough to reproduce, so here you go. verbosity set to Debug. This time did MP crashed after initially starting, selecting BBC One HD, turning off TV and turning on about 10 seconds later.

    Fingers crossed you can give me some pointers (and probably a shopping list of other things probably ;))

    Regards

    Dave
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Thanks Dave (y)

    I think the solution should be relatively straightforward, however let me give you a fuller back story.

    The first thing to say is that when you turn off your AVR and/or TV, the PC is going to lose contact with them. Hopefully that much is obvious! If you were to look in the log files you'd see the corresponding entries:
    [collapse]
    [2017-11-13 19:31:24,209] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEARRIVAL)
    [2017-11-13 19:31:24,212] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: Intel(R) HD Graphics
    [2017-11-13 19:31:24,213] [Log ] [MPMain ] [INFO ] - Main: Video Device or Screen Intel(R) HD Graphics connected
    [2017-11-13 19:31:24,214] [Log ] [MPMain ] [DEBUG] - GraphicContext: device video connected - Count 2
    [2017-11-13 19:31:24,215] [Log ] [MPMain ] [DEBUG] - Main: Video Device or Screen restore screen bounds of display changed to 1920x1080
    [2017-11-13 19:31:24,666] [Log ] [MPMain ] [DEBUG] - Main: WM_DISPLAYCHANGE restore current screen position
    [2017-11-13 19:31:24,670] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEREMOVECOMPLETE)
    [2017-11-13 19:31:24,678] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: Generic PnP Monitor
    [2017-11-13 19:31:24,679] [Log ] [MPMain ] [INFO ] - Main: Video Device or Screen Generic PnP Monitor removed
    [2017-11-13 19:31:24,681] [Log ] [MPMain ] [DEBUG] - GraphicContext: device video removed - Count 1
    [2017-11-13 19:31:24,707] [Log ] [MPMain ] [DEBUG] - Main: WM_DISPLAYCHANGE restore current screen position
    [2017-11-13 19:31:24,711] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEREMOVECOMPLETE)
    [2017-11-13 19:31:24,721] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: Generic PnP Monitor
    [2017-11-13 19:31:24,723] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEREMOVECOMPLETE)
    [2017-11-13 19:31:24,728] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: Intel(R) HD Graphics
    [2017-11-13 19:31:24,729] [Log ] [MPMain ] [INFO ] - Main: Video Device or Screen Intel(R) HD Graphics removed
    [2017-11-13 19:31:24,730] [Log ] [MPMain ] [DEBUG] - GraphicContext: device video removed - Count 0
    [2017-11-13 19:31:24,734] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEARRIVAL)
    [2017-11-13 19:31:24,738] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: Generic PnP Monitor
    [2017-11-13 19:31:24,743] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEARRIVAL)
    [2017-11-13 19:31:24,747] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: Generic PnP Monitor
    [2017-11-13 19:31:24,750] [Log ] [MPMain ] [INFO ] - Main: Video Device or Screen Generic PnP Monitor connected
    [2017-11-13 19:31:24,751] [Log ] [MPMain ] [DEBUG] - GraphicContext: device video connected - Count 1
    [2017-11-13 19:31:24,753] [Log ] [MPMain ] [DEBUG] - Main: Video Device or Screen restore screen bounds of display changed to 1920x1080
    [2017-11-13 19:31:24,755] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEARRIVAL)
    [2017-11-13 19:31:24,758] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: Intel(R) HD Graphics
    [2017-11-13 19:31:24,759] [Log ] [MPMain ] [INFO ] - Main: Video Device or Screen Intel(R) HD Graphics connected
    [2017-11-13 19:31:24,761] [Log ] [MPMain ] [DEBUG] - GraphicContext: device video connected - Count 2
    [2017-11-13 19:31:24,763] [Log ] [MPMain ] [DEBUG] - Main: Video Device or Screen restore screen bounds of display changed to 1920x1080
    [2017-11-13 19:31:24,800] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVNODES_CHANGED)
    [2017-11-13 19:31:24,936] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVNODES_CHANGED)
    [2017-11-13 19:31:24,936] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEREMOVECOMPLETE)
    [2017-11-13 19:31:24,937] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: [TV] Samsung
    [2017-11-13 19:31:24,955] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEREMOVECOMPLETE)
    [2017-11-13 19:31:24,956] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: [TV] Samsung
    [2017-11-13 19:31:24,975] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEREMOVECOMPLETE)
    [2017-11-13 19:31:24,976] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: [TV] Samsung
    [2017-11-13 19:31:24,994] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEREMOVECOMPLETE)
    [2017-11-13 19:31:24,995] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: [TV] Samsung
    [2017-11-13 19:31:25,012] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEREMOVECOMPLETE)
    [2017-11-13 19:31:25,013] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: [TV] Samsung
    [2017-11-13 19:31:25,014] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVNODES_CHANGED)
    [2017-11-13 19:31:25,015] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEREMOVECOMPLETE)
    [2017-11-13 19:31:25,015] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: [TV] Samsung
    [2017-11-13 19:31:25,033] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEREMOVECOMPLETE)
    [2017-11-13 19:31:25,034] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: [TV] Samsung
    [2017-11-13 19:31:33,255] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEARRIVAL)
    [2017-11-13 19:31:33,257] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: [TV] Samsung
    [2017-11-13 19:31:33,274] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEARRIVAL)
    [2017-11-13 19:31:33,275] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: [TV] Samsung
    [2017-11-13 19:31:33,293] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEARRIVAL)
    [2017-11-13 19:31:33,294] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: [TV] Samsung
    [2017-11-13 19:31:33,294] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVNODES_CHANGED)
    [2017-11-13 19:31:33,295] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEARRIVAL)
    [2017-11-13 19:31:33,296] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: [TV] Samsung
    [2017-11-13 19:31:33,313] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEARRIVAL)
    [2017-11-13 19:31:33,314] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: [TV] Samsung
    [2017-11-13 19:31:33,332] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEARRIVAL)
    [2017-11-13 19:31:33,333] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: [TV] Samsung
    [2017-11-13 19:31:33,350] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEARRIVAL)
    [2017-11-13 19:31:33,351] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: [TV] Samsung
    [2017-11-13 19:31:33,386] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVNODES_CHANGED)
    [2017-11-13 19:31:33,403] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEREMOVECOMPLETE)
    [2017-11-13 19:31:33,405] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: Intel(R) HD Graphics
    [2017-11-13 19:31:33,407] [Log ] [MPMain ] [INFO ] - Main: Video Device or Screen Intel(R) HD Graphics removed
    [2017-11-13 19:31:33,408] [Log ] [MPMain ] [DEBUG] - GraphicContext: device video removed - Count 1
    [2017-11-13 19:31:33,543] [Log ] [MPMain ] [DEBUG] - Main: WM_DISPLAYCHANGE restore current screen position
    [2017-11-13 19:31:33,547] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEREMOVECOMPLETE)
    [2017-11-13 19:31:33,551] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: Generic PnP Monitor
    [2017-11-13 19:31:33,552] [Log ] [MPMain ] [INFO ] - Main: Video Device or Screen Generic PnP Monitor removed
    [2017-11-13 19:31:33,553] [Log ] [MPMain ] [DEBUG] - GraphicContext: device video removed - Count 0
    [2017-11-13 19:31:33,604] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEREMOVECOMPLETE)
    [2017-11-13 19:31:33,607] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: Generic PnP Monitor
    [2017-11-13 19:31:33,651] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEREMOVECOMPLETE)
    [2017-11-13 19:31:33,653] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: Intel(R) Display Audio
    [2017-11-13 19:31:33,654] [Log ] [MPMain ] [INFO ] - Main: Audio Renderer Intel(R) Display Audio removed
    [2017-11-13 19:31:33,655] [Log ] [MPMain ] [DEBUG] - GraphicContext: device audio removed - Count 18
    [2017-11-13 19:31:34,676] [Log ] [MPMain ] [DEBUG] - Main: WM_DISPLAYCHANGE restore current screen position
    [2017-11-13 19:31:34,682] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEREMOVECOMPLETE)
    [2017-11-13 19:31:34,683] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: Intel(R) Display Audio
    [2017-11-13 19:31:34,685] [Log ] [MPMain ] [INFO ] - Main: Audio Renderer Intel(R) Display Audio removed
    [2017-11-13 19:31:34,686] [Log ] [MPMain ] [DEBUG] - GraphicContext: device audio removed - Count 17
    [2017-11-13 19:31:34,715] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEREMOVECOMPLETE)
    [2017-11-13 19:31:34,717] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: Intel(R) Display Audio
    [2017-11-13 19:31:34,718] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVNODES_CHANGED)
    [2017-11-13 19:31:34,719] [Log ] [MPMain ] [DEBUG] - Main: WM_DEVICECHANGE (Event: DBT_DEVICEREMOVECOMPLETE)
    [2017-11-13 19:31:34,720] [Log ] [MPMain ] [DEBUG] - Main: Device type is DBT_DEVTYP_DEVICEINTERFACE - Name: Intel(R) Display Audio[/collapse]


    When an audio or video "renderer" is removed, the PC can no longer use it.
    With your current configuration, when MP is showing TV or video, it's using the AVR and TV renderers.
    The implication: when those devices are turned off, MP needs to stop using those renderers.

    So far so good?

    Well, the reason for the crash is that MP makes no attempt to stop using the renderers when they're removed.
    MP makes no attempt because you appear to have configured it to behave that way.

    MP Config -> general section -> startup/resume settings sub-section contains a "stop playback on removal of an audio renderer" setting.
    It's enabled by default so people normally don't experience problems like you're experiencing.
    It's recommended to never disable it unless absolutely necessary. For example, it might be necessary if you have a Bluetooth audio device that frequently goes in and out of range.
    Anyway, if you choose to disable the setting it's at your own risk... and you must manually stop playback before disconnecting (or in your case: turning off) connected devices.


    In other words, solution is either:
    1. Enable the "stop playback on removal of an audio renderer" setting, OR..
    2. Always ensure media playback - TV, videos, music... everything - is stopped before turning your TV and/or AVR off.
     

    Dr Morris

    Portal Member
    September 25, 2012
    19
    4
    Dorset
    Home Country
    United Kingdom United Kingdom
    Hi there,

    Thanks for the great and full explanation - I find that really helpful (y). I remember changing that setting when doing some basic trial and error debug a while back. Have changed it back but still getting errors :(.

    I've attached the logs again but this time have used watchdog to run a really basic config to keep it simple. I wonder if this shows anything different.

    Regards

    Dave
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    @Rick164
    Looks as if your matching code is not working:
    MediaPortal-1/DirectShowUtil.cs at master · MediaPortal/MediaPortal-1 · GitHub
    MediaPortal-1/MediaPortal.cs at master · MediaPortal/MediaPortal-1 · GitHub

    [2017-11-15 07:47:00,844] [Log ] [MPMain ] [INFO ] - DirectShowUtil: First try to insert new audio renderer Default DirectSound Device
    [2017-11-15 07:47:00,879] [Log ] [MPMain ] [DEBUG] - DirectShowUtil: List AddAudioRenderer filter: DENON-AVR (Intel(R) Display Audio) to graph for Default DirectSound Device
    [2017-11-15 07:47:00,884] [Log ] [MPMain ] [DEBUG] - DirectShowUtil: List AddAudioRenderer filter: MediaPortal - Audio Renderer to graph for Default DirectSound Device
    [2017-11-15 07:47:00,884] [Log ] [MPMain ] [DEBUG] - DirectShowUtil: List AddAudioRenderer filter: Default DirectSound Device to graph for Default DirectSound Device
    [2017-11-15 07:47:00,884] [Log ] [MPMain ] [INFO ] - DirectShowUtil: Found audio renderer
    [2017-11-15 07:47:00,887] [Log ] [MPMain ] [DEBUG] - DirectShowUtil: added filter:Default DirectSound Device to graph

    [2017-11-15 07:47:49,091] [Log ] [MPMain ] [INFO ] - Main: Audio Renderer Intel(R) Display Audio removed

    In fact, I don't know how it could ever work for the default DirectSound renderer. :confused:

    Please could you investigate and attempt to fix... or if not possible to fix, roll back.
     

    Dr Morris

    Portal Member
    September 25, 2012
    19
    4
    Dorset
    Home Country
    United Kingdom United Kingdom
    Appreciate the prompt review of this mornings logs; So that code took me firmly back a good few years :). If there is anything I can do to assist / test /tweak let me know, although coding is not in the vocab anymore ;)

    Regards

    Dave
     

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,005
    Home Country
    Netherlands Netherlands
    We did test it with a few scenario's back then including default audio renderer which matched as Windows reported it by its device name and not as Default DirectSound Device, don't know of a easy fix as the current code doesn't allow for a lot of approaches other than replacing the audio core like we tried before which let to other issues with volume control.

    Can make a diff patch or PR to revert as that is probably the best solution for now, let me know what you prefer :)
     
    Last edited:

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    let me know what you prefer :)
    I have no strong preference. I would only expect:
    • ...if audio renderer removal matching is 100% reliable, the "stop..." setting should be removed...
    • ...or if audio renderer removal matching is not reliable, the "stop..." setting must have higher precedence over the matching
    To be clear, what I mean for the second option is:
    1. If matching detects that the current audio renderer is removed, playback should be stopped regardless of the value of the "stop..." setting.
    2. If the "stop..." setting is enabled, playback should be stopped when any audio renderer is removed.
    This second point is the part that is not working right now. That can be "fixed" by changing:
    if (_stopOnLostAudioRenderer && GUIGraphicsContext.CurrentAudioRenderer.Trim().ToLowerInvariant() == deviceName.Trim().ToLowerInvariant())

    ...to...
    if (_stopOnLostAudioRenderer || GUIGraphicsContext.CurrentAudioRenderer.Trim().ToLowerInvariant() == deviceName.Trim().ToLowerInvariant())
     

    Dr Morris

    Portal Member
    September 25, 2012
    19
    4
    Dorset
    Home Country
    United Kingdom United Kingdom
    Hi Rick & MM. I wondered if there is anything I can do in the meantime as restarting MEPO every time I turn on the TV is not going down well with the household. Can I test anything or perhaps a workaround?

    Regards

    Dave
     

    Users who are viewing this thread

    Top Bottom