Details
-
Bug
-
Resolution: Fixed
-
Minor
-
1.4.0
-
None
Description
Check for TV service at MP startup can crash if no TV service installed (exception needs to be handled properly).
Basically, in MediaPortal.cs we check (when "wait for tvserver" is set in MediaPortal.xml) if TV service is running, and attempt to start it if it isn't running.
These status calls:
if (ctrl.Status == ServiceControllerStatus.StartPending || ctrl.Status == ServiceControllerStatus.Stopped)
....return an exception if the service is not installed, which we don't handle.
Fix is just adding a try/catch around the code block.
I can trigger the crash by having a TV client system that can't connect to a TV server. In this situation, opening up MP config -> TV/Radio and hitting the 'Test Connection' button can result in the hostname being set by default to the local client PC - this means 'singleseat' internally, and MP then tries to check for/start up a non-existant local TV service -> crash to desktop.
Basically, in MediaPortal.cs we check (when "wait for tvserver" is set in MediaPortal.xml) if TV service is running, and attempt to start it if it isn't running.
These status calls:
if (ctrl.Status == ServiceControllerStatus.StartPending || ctrl.Status == ServiceControllerStatus.Stopped)
....return an exception if the service is not installed, which we don't handle.
Fix is just adding a try/catch around the code block.
I can trigger the crash by having a TV client system that can't connect to a TV server. In this situation, opening up MP config -> TV/Radio and hitting the 'Test Connection' button can result in the hostname being set by default to the local client PC - this means 'singleseat' internally, and MP then tries to check for/start up a non-existant local TV service -> crash to desktop.