[confirm] Development issues (2 Viewers)

disaster123

MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    @morpheus_xx to get the shutdown / standby reliable i needed another additional patch. Otherwise the thread may be executed too late.

    diff --git a/MediaPortal/Source/Core/MediaPortal.Common/Services/Runtime/PowerEventHandler.cs b/MediaPortal/Source/Core/MediaPortal.Common/Services/Runtime/PowerEventHandler.cs
    index 407a40f..e623456 100644
    --- a/MediaPortal/Source/Core/MediaPortal.Common/Services/Runtime/PowerEventHandler.cs
    +++ b/MediaPortal/Source/Core/MediaPortal.Common/Services/Runtime/PowerEventHandler.cs
    @@ -45,7 +45,7 @@ namespace MediaPortal.Common.Services.Runtime

    public PowerEventHandler()
    {
    - _powerEventThread = new Thread(PowerEventHandlerThread) { Name = "PwrEvtHnd", IsBackground = true, Priority = ThreadPriority.BelowNormal };
    + _powerEventThread = new Thread(PowerEventHandlerThread) { Name = "PwrEvtHnd", IsBackground = true, Priority = ThreadPriority.Highest };
    _powerEventThread.Start();
    }
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Hmm, isn't "Normal" or "AboveNormal" not enough in this case?
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    Hmm, isn't "Normal" or "AboveNormal" not enough in this case?
    May be i just wanted to be sure that this thread is always executed before the ones which shutdown the connections. Is there anything inside the powermgmt thread which could block? While viewing the code it seems to be very leightweight to i thought Highest should be OK may be AboveNormal is also OK. Normal could still result into a race.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    I have taken your original patches and reworked them. The result is commited in new branch FEAT_ImproveUPnP. I applied the "SSDP advertise after resume" also to the BackendServer.

    Another change affects the binding of local ip addresses in HttpRequest. I removed this code, because I got WebExceptions and thus the devices where not correctly detected by UPnPNetworkTracker class.

    Can you give this branch a try? I haven't tested it myself yet. A full installer: http://tinyurl.com/z599eqk (morpheusxx/Weekly_20160105)
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    I have taken your original patches and reworked them. The result is commited in new branch FEAT_ImproveUPnP. I applied the "SSDP advertise after resume" also to the BackendServer.

    Another change affects the binding of local ip addresses in HttpRequest. I removed this code, because I got WebExceptions and thus the devices where not correctly detected by UPnPNetworkTracker class.

    Can you give this branch a try? I haven't tested it myself yet. A full installer: http://tinyurl.com/z599eqk (morpheusxx/Weekly_20160105)

    Yes will try tonight. Thanks!
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    I have taken your original patches and reworked them. The result is commited in new branch FEAT_ImproveUPnP. I applied the "SSDP advertise after resume" also to the BackendServer.

    Another change affects the binding of local ip addresses in HttpRequest. I removed this code, because I got WebExceptions and thus the devices where not correctly detected by UPnPNetworkTracker class.

    Can you give this branch a try? I haven't tested it myself yet. A full installer: http://tinyurl.com/z599eqk (morpheusxx/Weekly_20160105)

    Yes will try tonight. Thanks!

    Looks good for the first tests.
    Log looks like this one.
    Code:
    [2016-01-05 20:35:36,418] [134467 ] [104 ] [INFO ] - UPnPServerController: SSDP disabled for IP endpoint '10.8.0.105'
    [2016-01-05 20:35:36,463] [134513 ] [99 ] [INFO ] - SSDPServerController: Stopping listening for multicast messages at IP endpoint '10.8.0.105'
    [2016-01-05 20:35:36,463] [134513 ] [97 ] [INFO ] - SSDPServerController: Stopping listening for multicast messages at IP endpoint '10.8.0.105'
    [2016-01-05 20:35:36,666] [134716 ] [104 ] [INFO ] - UPnPServerController: SSDP disabled for IP endpoint '10.8.0.105'
    [2016-01-05 20:35:36,666] [134716 ] [99 ] [INFO ] - SSDPServerController: Stopping listening for multicast messages at IP endpoint '10.8.0.105'
    [2016-01-05 20:35:36,666] [134716 ] [97 ] [INFO ] - SSDPServerController: Stopping listening for multicast messages at IP endpoint '10.8.0.105'
    [2016-01-05 20:35:36,948] [134997 ] [99 ] [INFO ] - UPnPServerController: SSDP disabled for IP endpoint '192.168.178.201'
    [2016-01-05 20:35:36,948] [134997 ] [97 ] [INFO ] - SSDPServerController: Stopping listening for multicast messages at IP endpoint '192.168.178.201'
    [2016-01-05 20:35:36,970] [135019 ] [104 ] [INFO ] - SSDPServerController: Stopping listening for multicast messages at IP endpoint '192.168.178.201'
    [2016-01-05 20:35:37,015] [135064 ] [99 ] [INFO ] - UPnPServerController: SSDP disabled for IP endpoint '192.168.178.201'
    [2016-01-05 20:35:37,019] [135068 ] [103 ] [INFO ] - SSDPServerController: Stopping listening for multicast messages at IP endpoint '192.168.178.201'
    [2016-01-05 20:35:37,019] [135068 ] [104 ] [INFO ] - SSDPServerController: Stopping listening for multicast messages at IP endpoint '192.168.178.201'
    [2016-01-05 20:35:37,302] [135351 ] [104 ] [INFO ] - SSDPServerController: Stopping listening for multicast messages at IP endpoint '127.0.0.1'
    [2016-01-05 20:35:51,640] [149689 ] [PwrEvtHnd] [INFO ] - UPnPSystemResumeHelper: System resuming. Trigger UpdateAndAdvertise for UPnPServer.
    [2016-01-05 20:35:51,671] [149721 ] [PwrEvtHnd] [INFO ] - UPnPSystemResumeHelper: System resuming. Trigger UpdateAndAdvertise for UPnPServer.
    [2016-01-05 20:35:56,443] [154492 ] [104 ] [INFO ] - UPnPServerController: SSDP enabled for IP endpoint '192.168.178.201', search port is 1900
    [2016-01-05 20:35:57,204] [155253 ] [104 ] [INFO ] - UPnPServerController: SSDP enabled for IP endpoint '192.168.178.201', search port is 1900
    [2016-01-05 20:36:01,813] [159862 ] [103 ] [INFO ] - UPnPServerController: SSDP enabled for IP endpoint '10.8.0.105', search port is 1900
    [2016-01-05 20:36:02,167] [160216 ] [103 ] [INFO ] - UPnPServerController: SSDP enabled for IP endpoint '10.8.0.105', search port is 1900
    [2016-01-05 20:36:02,313] [160362 ] [105 ] [INFO ] - SSDPClientController: Stopping listening for multicast messages at IP endpoint '192.168.178.201'
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    @morpheus_xx Does your branch contain anything else? Can't play recordings anymore.

    Code:
    [2016-01-05 20:52:06,764] [1124813] [Thread104] [WARN ] - MediaPortal.UI.Players.Video.TsVideoPlayer: Unable to play 'Resource '{e88e64a8-0233-4fdf-ba27-0b44c6a39ae9}://///FREENAS/Aufnahmen/Recs/Tagesschau/Tagesschau - () SE - 2016-01-05 - 20_00.ts' at system '01af7439-c452-4e1a-9183-08325a311c0c'
    MediaPortal.Common.Exceptions.NotConnectedException: The system '01af7439-c452-4e1a-9183-08325a311c0c' is not connected
     bei MediaPortal.Common.Services.ResourceAccess.RemoteResourceInformationService.GetResourceInformationService(String systemId)
     bei MediaPortal.Common.Services.ResourceAccess.RemoteResourceInformationService.GetResourceInformation(String nativeSystemId, ResourcePath nativeResourcePath, Boolean& isFileSystemResource, Boolean& isFile, String& resourcePathName, String& resourceName, DateTime& lastChanged, Int64& size)
     bei MediaPortal.Common.Services.ResourceAccess.RemoteResourceProvider.RemoteFileSystemResourceAccessor.ConnectFileSystem(String nativeSystemId, ResourcePath nativeResourcePath, IFileSystemResourceAccessor& result)
     bei MediaPortal.Common.Services.ResourceAccess.ResourceLocator.CreateAccessor()
     bei MediaPortal.UI.Players.Video.BaseDXPlayer.CreateResourceAccessor()
     bei MediaPortal.UI.Players.Video.BaseDXPlayer.SetMediaItem(IResourceLocator locator, String mediaItemTitle)
     bei MediaPortal.UI.Players.Video.VideoPlayerBuilder.GetPlayer(MediaItem mediaItem)
    [2016-01-05 20:52:07,674] [1125723] [Thread104] [ERROR] - Unable to create media player for media item 'Tagesschau'
    MediaPortal.Common.Exceptions.NotConnectedException: The system '01af7439-c452-4e1a-9183-08325a311c0c' is not connected
     bei MediaPortal.Common.Services.ResourceAccess.RemoteResourceInformationService.GetResourceInformationService(String systemId)
     bei MediaPortal.Common.Services.ResourceAccess.RemoteResourceInformationService.GetResourceInformation(String nativeSystemId, ResourcePath nativeResourcePath, Boolean& isFileSystemResource, Boolean& isFile, String& resourcePathName, String& resourceName, DateTime& lastChanged, Int64& size)
     bei MediaPortal.Common.Services.ResourceAccess.RemoteResourceProvider.RemoteFileSystemResourceAccessor.ConnectFileSystem(String nativeSystemId, ResourcePath nativeResourcePath, IFileSystemResourceAccessor& result)
     bei MediaPortal.Common.Services.ResourceAccess.ResourceLocator.CreateAccessor()
     bei MediaPortal.UI.Players.Video.BaseDXPlayer.CreateResourceAccessor()
     bei MediaPortal.UI.Players.Video.BaseDXPlayer.SetMediaItem(IResourceLocator locator, String mediaItemTitle)
     bei MediaPortal.UI.Players.Video.VideoPlayerBuilder.GetPlayer(MediaItem mediaItem)
     bei MediaPortal.UI.Services.Players.PlayerManager.BuildPlayer_NoLock(MediaItem mediaItem, ICollection`1& exceptions)
    [2016-01-05 20:52:07,906] [1125955] [AMQ 'UPnPRendererPlugin'] [ERROR] - Player Error
    [2016-01-05 20:52:07,906] [1125955] [Thread107] [INFO ] - WorkflowManager: Pushing workflow state 'VideoFullscreenContent' (id='882c1142-8028-4112-a67d-370e6e483a33') onto the navigation stack...
    [2016-01-05 20:52:07,908] [1125957] [Thread107] [INFO ] - WorkflowManager: Screen was updated by workflow model
    [2016-01-05 20:52:08,153] [1126202] [AMQ 'PlayerContextManager'] [WARN ] - MediaPortal.UI.Players.Video.TsVideoPlayer: Unable to play 'Resource '{e88e64a8-0233-4fdf-ba27-0b44c6a39ae9}://///FREENAS/Aufnahmen/Recs/Tagesschau/Tagesschau - () SE - 2016-01-05 - 20_00.ts' at system '01af7439-c452-4e1a-9183-08325a311c0c'
    MediaPortal.Common.Exceptions.NotConnectedException: The system '01af7439-c452-4e1a-9183-08325a311c0c' is not connected
     bei MediaPortal.Common.Services.ResourceAccess.RemoteResourceInformationService.GetResourceInformationService(String systemId)
     bei MediaPortal.Common.Services.ResourceAccess.RemoteResourceInformationService.GetResourceInformation(String nativeSystemId, ResourcePath nativeResourcePath, Boolean& isFileSystemResource, Boolean& isFile, String& resourcePathName, String& resourceName, DateTime& lastChanged, Int64& size)
     bei MediaPortal.Common.Services.ResourceAccess.RemoteResourceProvider.RemoteFileSystemResourceAccessor.ConnectFileSystem(String nativeSystemId, ResourcePath nativeResourcePath, IFileSystemResourceAccessor& result)
     bei MediaPortal.Common.Services.ResourceAccess.ResourceLocator.CreateAccessor()
     bei MediaPortal.UI.Players.Video.BaseDXPlayer.CreateResourceAccessor()
     bei MediaPortal.UI.Players.Video.BaseDXPlayer.SetMediaItem(IResourceLocator locator, String mediaItemTitle)
     bei MediaPortal.UI.Players.Video.VideoPlayerBuilder.GetPlayer(MediaItem mediaItem)
    [2016-01-05 20:52:08,356] [1126405] [AMQ 'PlayerContextManager'] [ERROR] - Unable to create media player for media item 'Tagesschau'
    MediaPortal.Common.Exceptions.NotConnectedException: The system '01af7439-c452-4e1a-9183-08325a311c0c' is not connected
     bei MediaPortal.Common.Services.ResourceAccess.RemoteResourceInformationService.GetResourceInformationService(String systemId)
     bei MediaPortal.Common.Services.ResourceAccess.RemoteResourceInformationService.GetResourceInformation(String nativeSystemId, ResourcePath nativeResourcePath, Boolean& isFileSystemResource, Boolean& isFile, String& resourcePathName, String& resourceName, DateTime& lastChanged, Int64& size)
     bei MediaPortal.Common.Services.ResourceAccess.RemoteResourceProvider.RemoteFileSystemResourceAccessor.ConnectFileSystem(String nativeSystemId, ResourcePath nativeResourcePath, IFileSystemResourceAccessor& result)
     bei MediaPortal.Common.Services.ResourceAccess.ResourceLocator.CreateAccessor()
     bei MediaPortal.UI.Players.Video.BaseDXPlayer.CreateResourceAccessor()
     bei MediaPortal.UI.Players.Video.BaseDXPlayer.SetMediaItem(IResourceLocator locator, String mediaItemTitle)
     bei MediaPortal.UI.Players.Video.VideoPlayerBuilder.GetPlayer(MediaItem mediaItem)
     bei MediaPortal.UI.Services.Players.PlayerManager.BuildPlayer_NoLock(MediaItem mediaItem, ICollection`1& exceptions)
    [2016-01-05 20:52:08,595] [1126645] [AMQ 'UPnPRendererPlugin'] [ERROR] - Player Error
     
    Last edited:

    breese

    Retired Team Member
  • Premium Supporter
  • July 11, 2011
    3,902
    770
    66
    Arlington Heights, Illinois
    Home Country
    United States of America United States of America
    Can you give this branch a try? I haven't tested it myself yet. A full installer: http://tinyurl.com/z599eqk (morpheusxx/Weekly_20160105)
    Just did a fresh install of this on my server only and client only.

    Better... No real issues with UPnP....
    Do not know what caused this on my client and have not been able to duplicate it.

    [2016-01-05 17:06:15,624] [19563 ] [AMQ 'NotificationsModel'] [ERROR] - Unhandled exception in message handler of async message queue 'NotificationsModel' when handling a message of type 'StatePushed'
    MediaPortal.UI.Presentation.Workflow.WorkflowManagerLockException: The workflow manager cannot be locked for read operation 'CurrentNavigationContext' (deadlock?)
    at MediaPortal.UI.Services.Workflow.WorkflowManager.EnterReadLock(String operation)
    at MediaPortal.UI.Services.Workflow.WorkflowManager.get_CurrentNavigationContext()
    at MediaPortal.UiComponents.SkinBase.Models.NotificationsModel.Update()
    at MediaPortal.UiComponents.SkinBase.Models.NotificationsModel.OnMessageReceived(AsynchronousMessageQueue queue, SystemMessage message)
    at MediaPortal.Common.Messaging.AsynchronousMessageQueue.DoWork()
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    @morpheus_xx Does your branch contain anything else? Can't play recordings anymore.

    Code:
    [2016-01-05 20:52:06,764] [1124813] [Thread104] [WARN ] - MediaPortal.UI.Players.Video.TsVideoPlayer: Unable to play 'Resource '{e88e64a8-0233-4fdf-ba27-0b44c6a39ae9}://///FREENAS/Aufnahmen/Recs/Tagesschau/Tagesschau - () SE - 2016-01-05 - 20_00.ts' at system '01af7439-c452-4e1a-9183-08325a311c0c'
    MediaPortal.Common.Exceptions.NotConnectedException: The system '01af7439-c452-4e1a-9183-08325a311c0c' is not connected
     bei MediaPortal.Common.Services.ResourceAccess.RemoteResourceInformationService.GetResourceInformationService(String systemId)
     bei MediaPortal.Common.Services.ResourceAccess.RemoteResourceInformationService.GetResourceInformation(String nativeSystemId, ResourcePath nativeResourcePath, Boolean& isFileSystemResource, Boolean& isFile, String& resourcePathName, String& resourceName, DateTime& lastChanged, Int64& size)
     bei MediaPortal.Common.Services.ResourceAccess.RemoteResourceProvider.RemoteFileSystemResourceAccessor.ConnectFileSystem(String nativeSystemId, ResourcePath nativeResourcePath, IFileSystemResourceAccessor& result)
     bei MediaPortal.Common.Services.ResourceAccess.ResourceLocator.CreateAccessor()
     bei MediaPortal.UI.Players.Video.BaseDXPlayer.CreateResourceAccessor()
     bei MediaPortal.UI.Players.Video.BaseDXPlayer.SetMediaItem(IResourceLocator locator, String mediaItemTitle)
     bei MediaPortal.UI.Players.Video.VideoPlayerBuilder.GetPlayer(MediaItem mediaItem)
    [2016-01-05 20:52:07,674] [1125723] [Thread104] [ERROR] - Unable to create media player for media item 'Tagesschau'
    MediaPortal.Common.Exceptions.NotConnectedException: The system '01af7439-c452-4e1a-9183-08325a311c0c' is not connected
     bei MediaPortal.Common.Services.ResourceAccess.RemoteResourceInformationService.GetResourceInformationService(String systemId)
     bei MediaPortal.Common.Services.ResourceAccess.RemoteResourceInformationService.GetResourceInformation(String nativeSystemId, ResourcePath nativeResourcePath, Boolean& isFileSystemResource, Boolean& isFile, String& resourcePathName, String& resourceName, DateTime& lastChanged, Int64& size)
     bei MediaPortal.Common.Services.ResourceAccess.RemoteResourceProvider.RemoteFileSystemResourceAccessor.ConnectFileSystem(String nativeSystemId, ResourcePath nativeResourcePath, IFileSystemResourceAccessor& result)
     bei MediaPortal.Common.Services.ResourceAccess.ResourceLocator.CreateAccessor()
     bei MediaPortal.UI.Players.Video.BaseDXPlayer.CreateResourceAccessor()
     bei MediaPortal.UI.Players.Video.BaseDXPlayer.SetMediaItem(IResourceLocator locator, String mediaItemTitle)
     bei MediaPortal.UI.Players.Video.VideoPlayerBuilder.GetPlayer(MediaItem mediaItem)
     bei MediaPortal.UI.Services.Players.PlayerManager.BuildPlayer_NoLock(MediaItem mediaItem, ICollection`1& exceptions)
    [2016-01-05 20:52:07,906] [1125955] [AMQ 'UPnPRendererPlugin'] [ERROR] - Player Error
    [2016-01-05 20:52:07,906] [1125955] [Thread107] [INFO ] - WorkflowManager: Pushing workflow state 'VideoFullscreenContent' (id='882c1142-8028-4112-a67d-370e6e483a33') onto the navigation stack...
    [2016-01-05 20:52:07,908] [1125957] [Thread107] [INFO ] - WorkflowManager: Screen was updated by workflow model
    [2016-01-05 20:52:08,153] [1126202] [AMQ 'PlayerContextManager'] [WARN ] - MediaPortal.UI.Players.Video.TsVideoPlayer: Unable to play 'Resource '{e88e64a8-0233-4fdf-ba27-0b44c6a39ae9}://///FREENAS/Aufnahmen/Recs/Tagesschau/Tagesschau - () SE - 2016-01-05 - 20_00.ts' at system '01af7439-c452-4e1a-9183-08325a311c0c'
    MediaPortal.Common.Exceptions.NotConnectedException: The system '01af7439-c452-4e1a-9183-08325a311c0c' is not connected
     bei MediaPortal.Common.Services.ResourceAccess.RemoteResourceInformationService.GetResourceInformationService(String systemId)
     bei MediaPortal.Common.Services.ResourceAccess.RemoteResourceInformationService.GetResourceInformation(String nativeSystemId, ResourcePath nativeResourcePath, Boolean& isFileSystemResource, Boolean& isFile, String& resourcePathName, String& resourceName, DateTime& lastChanged, Int64& size)
     bei MediaPortal.Common.Services.ResourceAccess.RemoteResourceProvider.RemoteFileSystemResourceAccessor.ConnectFileSystem(String nativeSystemId, ResourcePath nativeResourcePath, IFileSystemResourceAccessor& result)
     bei MediaPortal.Common.Services.ResourceAccess.ResourceLocator.CreateAccessor()
     bei MediaPortal.UI.Players.Video.BaseDXPlayer.CreateResourceAccessor()
     bei MediaPortal.UI.Players.Video.BaseDXPlayer.SetMediaItem(IResourceLocator locator, String mediaItemTitle)
     bei MediaPortal.UI.Players.Video.VideoPlayerBuilder.GetPlayer(MediaItem mediaItem)
    [2016-01-05 20:52:08,356] [1126405] [AMQ 'PlayerContextManager'] [ERROR] - Unable to create media player for media item 'Tagesschau'
    MediaPortal.Common.Exceptions.NotConnectedException: The system '01af7439-c452-4e1a-9183-08325a311c0c' is not connected
     bei MediaPortal.Common.Services.ResourceAccess.RemoteResourceInformationService.GetResourceInformationService(String systemId)
     bei MediaPortal.Common.Services.ResourceAccess.RemoteResourceInformationService.GetResourceInformation(String nativeSystemId, ResourcePath nativeResourcePath, Boolean& isFileSystemResource, Boolean& isFile, String& resourcePathName, String& resourceName, DateTime& lastChanged, Int64& size)
     bei MediaPortal.Common.Services.ResourceAccess.RemoteResourceProvider.RemoteFileSystemResourceAccessor.ConnectFileSystem(String nativeSystemId, ResourcePath nativeResourcePath, IFileSystemResourceAccessor& result)
     bei MediaPortal.Common.Services.ResourceAccess.ResourceLocator.CreateAccessor()
     bei MediaPortal.UI.Players.Video.BaseDXPlayer.CreateResourceAccessor()
     bei MediaPortal.UI.Players.Video.BaseDXPlayer.SetMediaItem(IResourceLocator locator, String mediaItemTitle)
     bei MediaPortal.UI.Players.Video.VideoPlayerBuilder.GetPlayer(MediaItem mediaItem)
     bei MediaPortal.UI.Services.Players.PlayerManager.BuildPlayer_NoLock(MediaItem mediaItem, ICollection`1& exceptions)
    [2016-01-05 20:52:08,595] [1126645] [AMQ 'UPnPRendererPlugin'] [ERROR] - Player Error
    No code change in this area.
    There are two possible reasons I can think of:
    The resource path contains the SystemGuid as first part.
    1) the ID has changed, can only happen if you delete the config folder, so that a new ID is created, but the paths in MediaLibrary still use the old one.
    2) the UPnP system thinks that the system with this ID is currently offline and the resource is thus not accessible
     

    Users who are viewing this thread

    Top Bottom