1.11.0 No connection could be made because the target machine actively refused it (2 Viewers)

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    I never said that YOU should fix this. I am talking to all developers of the TV Server.
    I'm confused. I gave my personal answer. Instead of simply accepting my answer and waiting for comments from other developers you accused me of not caring about TV Server bugs as if you expected me to fix the problem for you. :confused:

    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.
    Ok interesting to know, that you are not intersted in fixing bugs in your application. Didn't know that before.

    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.
    What exactly do you think you are testing?
    I ask this because TV Server configuration already has a stress test section, and TV Server does not crash when people use it.

    A quick google search gives a few results with various possibilities:
    http://stackoverflow.com/questions/5694166/process-suddenly-crashes-with-no-errors
    http://community.spiceworks.com/topic/258104-application-crashing-with-no-event-log-errors

    (Note that none of the possibilities point directly to a bug in the primary application or service. ;) )

    Have you checked the TV service memory usage during your stress test?
     

    Snoopy87

    Portal Pro
    August 12, 2012
    470
    167
    Home Country
    Germany Germany
    As said I am testing the following:

    - Totally clean new PC with Windows 7 SP1 (I already tried different PCs with different TV cards and I also tried clean installation vs long time used systems)
    - Using MPExtended OR my custom plugin
    - Calling the method to start timeshift for channel X
    - Calling the method to retrieve the RTSP Url
    - Playing the RTPS Stream for e.g. 30 seconds
    - Calling the method to stop timeshift
    - Repeat the procedure
    - After 5-10 times TV Server Service is gone

    If I then manually starting the TV Server Service, everything is working again until it happen again.
     

    Snoopy87

    Portal Pro
    August 12, 2012
    470
    167
    Home Country
    Germany Germany
    I was able to get the error message with Debug Diag:

    Code:
    DetailID = 1
        Count:    3
        Type:     System.String
        Message:  NOT_FOUND
            Type:     NOT_FOUND
            Message:  NOT_FOUND
        Stack:   
            [HelperMethodFrame]
            System.IO.__Error.WinIOError(Int32, System.String)
            System.IO.File.InternalDelete(System.String, Boolean)
            System.IO.File.Delete(System.String)
            TvService.CleanTimeshiftFilesThread.CleanTimeShiftFiles()
            TvService.CleanTimeshiftFilesThread.CleanTimeshiftFiles()
            System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
            System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
            System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
            System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
            System.Threading.ThreadHelper.ThreadStart()
            [GCFrame]
            [DebuggerU2MCatchHandlerFrame]
     

    Snoopy87

    Portal Pro
    August 12, 2012
    470
    167
    Home Country
    Germany Germany
    I also looked at the code and also was wondering about this... I will try again...

    This exception only occures when the TV Server crashes, so maybe the stack trace is wrong... So if there were files which can't be deleted and only the catched exception will be logged, why does this not happening all the time? Hm...
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Does the speed of your test (ie. the delay between starting and stopping timeshifting, and/or the delay between each repeat) make any difference to the crashing?
     

    Snoopy87

    Portal Pro
    August 12, 2012
    470
    167
    Home Country
    Germany Germany
    I will try that too.

    I am waiting 10 seconds before starting timeshift again. The crash happens while stopping the timeshift the last time.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    One final thought before I go to bed (it is almost 4 AM here)...
    In your earlier log files it looks like your test was timeshifting the same channel over and over again. Does it make any difference if you cycle through a set of channels rather than always using only one channel?
     

    Snoopy87

    Portal Pro
    August 12, 2012
    470
    167
    Home Country
    Germany Germany
    I didn't test that, but I will do this too. At the moment I always testing with the same channel per test (no difference which channel).

    Ok, good night! It's 4 pm here :D
     

    Snoopy87

    Portal Pro
    August 12, 2012
    470
    167
    Home Country
    Germany Germany
    So, is there anyone how can fix this?

    There could be two reason why it happens even though try-catch is used:
    1. It's a really hard exception which forces to shutdown
    2. It's a multi threaded issue and the real exception happens somewhere else while accessing the file

    While the TV Server is gone, one timeshift file and the buffer file is left and not deleted, so the exception should be right. If I manually delete those files then, no error happens, so the files are not blocked, etc. (and of course there is no other process which is accessing this file! no anti virus software, etc.)

    I think this bug could also happen in a normal scenario while using MediaPortal, but of course this may be a rare issue, or maybe this would also only happen if you are zapping really fast through your channel list or Start/Stop, Start/Stop, ... the same channel with MediaPortal.
     

    Users who are viewing this thread

    Top Bottom