1.11.0 No connection could be made because the target machine actively refused it (1 Viewer)

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Sascha, I'm not going to be able to test your patch as I have no working and compatible version of TV Server, and no MPExtended.
    Are you able to reproduce the crash using the test section in TV Server configuration? That does a similar thing to what you described with your patch. If TV Server config test doesn't crash the TV service then chances are the problem is something to do with MPExtended.
     

    Snoopy87

    Portal Pro
    August 12, 2012
    470
    167
    Home Country
    Germany Germany
    Hi,

    Stress test had no errors...

    Edit:

    Is there any more documentation available on how to develope a tv plugin? The wiki articles I found where not really helpfull. Or is there any example plugin with source code available?

    All I need is to tune to a given channel by id, get the stream url and stop the stream/timeshift later.

    I created a new class, implemented ITvServerPlugin, but don't know which parameters I have to set to controller.Tune().
     
    Last edited:

    Snoopy87

    Portal Pro
    August 12, 2012
    470
    167
    Home Country
    Germany Germany
    Ok, seems to be an issue of MPExtended. I developed my own TV Server Plugin which controls the TV Server and which communicates through Windows Communication Foundation with my client and everything is working fine, TV Server is not crashing :)
     

    johanj

    MP Donator
  • Premium Supporter
  • January 31, 2009
    781
    398
    46
    Home Country
    Sweden Sweden
    Did you try to debug MPExtended together with your test program?
     

    Snoopy87

    Portal Pro
    August 12, 2012
    470
    167
    Home Country
    Germany Germany
    No, only log files which are attached here and my test application can be used by the developer of MPExtended to find the error. I don't have the development environment and time to build MPExtended, debug MPExtended and understand the code of MPExtended, sorry :-(
     

    Snoopy87

    Portal Pro
    August 12, 2012
    470
    167
    Home Country
    Germany Germany
    I'm back :D

    Could someone please move this thread?

    As you know, I developed my own TV Server Plugin which starts and stops timeshift and a client which is receiving the rtsp-stream. The problem still exists, so it had nothing to do with MPExtended. There is a bug in the TV Server which causes the TV Server to suddenly exit. There are no logs. No information in the Windows Event Viewer (except that the TV Server Service suddenly stopped).

    How can we fix this? Why is the service crashing without logging an error message / a stack trace. Will it help, if I send you the TV Server Plugin and a test application to debug the TV Service?
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Could someone please move this thread?
    To where?

    As you know, I developed my own TV Server Plugin which starts and stops timeshift and a client which is receiving the rtsp-stream. The problem still exists, so it had nothing to do with MPExtended. There is a bug in the TV Server which causes the TV Server to suddenly exit. There are no logs. No information in the Windows Event Viewer (except that the TV Server Service suddenly stopped).
    What makes you so sure it is a bug in TV Server? Could it not be a bug in the C++ runtime or other? I say this because at this time it feels like you don't have much proof to back up your claim.

    How can we fix this?
    One way to start would be to find a procedure that enables you to deterministically reproduce the problem.
    Another way would be to attach a debugger to the service. Presumably this would help you to get more information about the cause of the crash.

    Why is the service crashing without logging an error message / a stack trace.
    This line should ensure that the TV service catches and logs any managed exception that brings down the service:
    https://github.com/MediaPortal/Medi...TvEngine3/TVLibrary/TvService/Service1.cs#L89

    Since there is no logging you might guess that either the log entry is not flushed from a buffer before the crash occurs... or more likely [in my opinion], something unmanaged or outside TV Server's control is the root cause of the trouble. Windows and/or the VC++ runtime is responsible for logging such crashes in the event log.

    Will it help, if I send you the TV Server Plugin and a test application to debug the TV Service?
    Who is the "you" that you are referring to?
    If you mean me then the answer is no. As already mentioned, I have no working and compatible version of TV Server to test with. I also have no time... and honestly, also no desire/interest. IMHO if you want this problem to be resolved then you will need to take the initiative to make it happen.

    Regards,
    mm
     

    Snoopy87

    Portal Pro
    August 12, 2012
    470
    167
    Home Country
    Germany Germany
    Ok interesting to know, that you are not intersted in fixing bugs in your application. Didn't know that before.

    If the TV Server Service is crashing, it's an issue of the TV Server Service, because an application should not crash while using it. It doesn't matter why this happend. It should be fixed. I can't believe that this is randomly a very, very rare bug in the C++ Runtime which of course will never fixed and which can't be handle by the TV Server.

    I do my best to help and I already took the initiative to make everything happen! I said I'm able to post everything to reproduce the error. So maybe it is a bug in the TV Server which may effect MediaPortal or any other third-party plugins too. OR it is an issue on how my TV Server Plugin is working (e.g. I have to call some other methods), but due to the fact that there is absolutly no Plugin SDK documentation it would be nice if someone could help with this, because why offering a plugin interface, if no one can use it? But even if this is an issue of my plugin, the TV Server should not crash! If an application crash, it is always an issue of the application and the application has to handle this.

    But I'm not able to compile, debug, etc. the whole TV Server and Service. Why should users who are reporting bugs do this? It would be 1000 times easier your a TV Server developer, because he has already a running build environment and know/understand the TV Server code.

    Edit:

    Move to where? Its not a bug of MPExtended, its a bug report for the TV Server, so it should be clear...
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Ok interesting to know, that you are not intersted in fixing bugs in your application. Didn't know that before.
    Please be reasonable. You know this generalisation is patently not true.

    TV Server is not "my application" and therefore I do not take responsibility for it. I am only one person that works on it as a hobby. Like you, I have a real life. I don't have infinite time to fix all the bugs that are reported in such a huge code base (not even considering development of new features). Therefore, I have to choose what I will work on and what I won't.

    You know that I've chosen to work on TVE 3.5. Attempting to fix this problem will block me from that work because debugging TVE 3 requires configuration that is incompatible with TVE 3.5 development. Further, I suspect the investigation could take most (if not all) of my available MP development time... and then at the end of the process I still doubt a problem will be found in TV Server... or if it is, it could easily be in a part that is irrelevant in TVE 3.5. Therefore I've decided I'm not willing to commit more time.

    If the TV Server Service is crashing, it's an issue of the TV Server Service, because an application should not crash while using it.
    It is true that we don't want the TV service to crash. However not all TV Server crashes can be blamed on TV Server. Tuner drivers, M***I, DirectShow, BDA, 3rd party plugins... all can cause a crash in TV service, and yet they are not part of TV Server. :)

    It doesn't matter why this happend. It should be fixed.
    So go ahead and fix it! I'm not stopping you. I'm simply saying I don't have time and inclination to fix it for you. :)

    I can't believe that this is randomly a very, very rare bug in the C++ Runtime which of course will never fixed and which can't be handle by the TV Server.
    That was just an example. Other possible causes are listed above (DirectShow etc.). That list is not an exhaustive list either.
    To be very clear, my point is that I currently don't see definitive proof that this crash is caused by a bug in TV Server. There are alternative causes which you appear not to have considered.

    I do my best to help and I already took the initiative to make everything happen! I said I'm able to post everything to reproduce the error.
    Sure, and I appreciate this. I've also tried my best to help you by answering your questions, suggesting next steps etc.

    So maybe it is a bug in the TV Server which may effect MediaPortal or any other third-party plugins too.
    Maybe... but then why haven't I seen such a problem before? ;)

    OR it is an issue on how my TV Server Plugin is working, but due to the fact that there is absolutly no Plugin SDK documentation it would be nice if someone could help with this, because why offering a plugin interface, if no one can use it?
    "No one" is a huuuuuge exaggeration. ;)
    Like I just said, I haven't seen such a report or problem before in any scenario, including with other 3rd party plugins.

    But I'm not able to compile, debug, etc. the whole TV Server and Service. Why should users who are reporting bugs do this?
    Simple: because you want a solution. This is how open source works.

    It would be 1000 times easier your a TV Server developer, because he has already a running build environment and know/understand the TV Server code.
    That's exactly my point: I do not have a running build environment, so it is not 1000 times easier. In fact it is quite an inconvenience for me.

    Regards,
    mm
     

    Snoopy87

    Portal Pro
    August 12, 2012
    470
    167
    Home Country
    Germany Germany
    I never said that YOU should fix this. I am talking to all developers of the TV Server.

    As said the same happen with MPExtended. The reason why you never heard of this is simple: I am the first who found the bug with my stress test scenario.
     

    Users who are viewing this thread

    Top Bottom