1.11.0 - No connection could be made because the target machine actively refused it | Page 8

Discussion in 'Archive' started by Snoopy87, January 9, 2015.

  1. Snoopy87

    Snoopy87 Portal Pro

    Joined:
    August 12, 2012
    Messages:
    468
    Likes Received:
    123
    Gender:
    Male
    Ratings:
    +166 / 10
    Home Country:
    Germany Germany
    Show System Specs
    How do I get this list and those states?[DOUBLEPOST=1431335813][/DOUBLEPOST]This?


     

    Attached Files:

    • Threads.png
      Threads.png
      File size:
      51.5 KB
      Uploaded:
      May 11, 2015
      Views:
      147
    Last edited: May 11, 2015
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. MrTechno
    • Team MediaPortal

    MrTechno Development Group

    Joined:
    February 27, 2011
    Messages:
    1,256
    Likes Received:
    275
    Gender:
    Male
    Location:
    London
    Ratings:
    +515 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    There's System.Diagnostics.Process.GetCurrentProcess().Threads but I assume if the exit is called from unmanaged code this won't contain anything useful :(
     
  4. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    Ahhhh!
    Just looking at the list of threads there gave me some clues.
    Most of those threads seem to be managed, and we already know that there is no Environment.Exit(1) on the C# side... but what about the C++ side.
    In particular, what about here? ;)
    https://github.com/MediaPortal/Medi...wFilters/StreamingServer/Source/main.cpp#L137

    There are other calls to exit(1) scattered through the live555 code too. So, I'm wondering if it is the streaming server that is bringing down the service.
     
    • Like Like x 3
  5. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    https://github.com/MediaPortal/Medi...sageEnvironment/BasicUsageEnvironment.cpp#L35
    https://github.com/MediaPortal/Medi...s/LiveMedia555/liveMedia/FramedSource.cpp#L65
    https://github.com/MediaPortal/Medi...s/LiveMedia555/liveMedia/StreamParser.cpp#L82
    https://github.com/MediaPortal/Medi...dia555/liveMedia/QCELPAudioRTPSource.cpp#L405
    https://github.com/MediaPortal/Medi...Media555/liveMedia/AMRAudioRTPSource.cpp#L546
    https://github.com/MediaPortal/Medi...LiveMedia555/liveMedia/MPEG1or2Demux.cpp#L165

    I guess the next step is to try to find out which of these is the source (...and there may be other possible sources too).
    I would either change the exit codes to unique values, or add OutputDebugString()... something to allow me to see which exit() is the problem...
    ...then recompile the streaming server, reproduce the problem, and see if you can find the source. :)
     
    • Thank You! Thank You! x 2
    • Agree Agree x 1
  6. Snoopy87

    Snoopy87 Portal Pro

    Joined:
    August 12, 2012
    Messages:
    468
    Likes Received:
    123
    Gender:
    Male
    Ratings:
    +166 / 10
    Home Country:
    Germany Germany
    Show System Specs
    It's sooooo strange...

    I changed all "exit(1)" with different numbers: 100, 101, 102, etc. Now I always get Exit Code 255 (0xFF)! This makes no sense, because 255 is not used :-(
     
  7. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    Did you use any negative values?

    Perhaps try to change them back one-by-one until the exit code changes back to 1.
     
  8. Snoopy87

    Snoopy87 Portal Pro

    Joined:
    August 12, 2012
    Messages:
    468
    Likes Received:
    123
    Gender:
    Male
    Ratings:
    +166 / 10
    Home Country:
    Germany Germany
    Show System Specs
    I changed ALL back to exit(1) and still get 255... I have no c++ skills, because I am a C# developer. Maybe it's a general issue of my compiled versions? Maybe due to a newer Visual Studio versions and/or C++ Runtimes?

    Could someone of you create a debug version of StreamingServer.dll which includes different exit codes and/or debug output and post this version here, so that I can use this DLL for further testings? :)
     
  9. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    :(
    If you put the original StreamingServer.dll back, does the error code change back to 1?

    Are you sure you copied the compiled DLL to the correct location etc.?
    If I were you, I would add a log entry here:
    https://github.com/MediaPortal/Medi...wFilters/StreamingServer/Source/main.cpp#L143

    ...so that you can be sure that the DLL that you compiled is actually being used.

    Also, did you get the same exit code (value = 1) consistently in previous tests? ...and is the exit code consistently 255 now?
    I ask this because if the value has changed due to the change of StreamingServer.dll, at least we can say that we are "on the right track" to finding the cause. :)

    Sorry, I think this is very unlikely.

    Sorry, I can't compile the latest MediaPortal code anymore. Projects have been converted to VS 2013, but I still use XP (which can't run VS 2013). Hopefully somebody else can do this for you.
     
    • Thank You! Thank You! x 1
  10. Snoopy87

    Snoopy87 Portal Pro

    Joined:
    August 12, 2012
    Messages:
    468
    Likes Received:
    123
    Gender:
    Male
    Ratings:
    +166 / 10
    Home Country:
    Germany Germany
    Show System Specs
    YEEEEEEEEEEEEES! I GOT IT! :D

    Instead of compiling the debug version of StreamingServer I compiled the Release version and now it works!

    FramedSource.cpp of LiveMedia555
    Code (C):
    1. void FramedSource::getNextFrame(unsigned char* to, unsigned maxSize,
    2.                 afterGettingFunc* afterGettingFunc,
    3.                 void* afterGettingClientData,
    4.                 onCloseFunc* onCloseFunc,
    5.                 void* onCloseClientData) {
    6.   // Make sure we're not already being read:
    7.   if (fIsCurrentlyAwaitingData) {
    8.     envir() << "FramedSource[" << this << "]::getNextFrame(): attempting to read more than once at the same time!\n";
    9.     exit(5); // <--- Sascha: HERE IT IS EXITING! :-)
    10.   }
    11.  
    12.   fTo = to;
    13.   fMaxSize = maxSize;
    14.   fNumTruncatedBytes = 0; // by default; could be changed by doGetNextFrame()
    15.   fDurationInMicroseconds = 0; // by default; could be changed by doGetNextFrame()
    16.   fAfterGettingFunc = afterGettingFunc;
    17.   fAfterGettingClientData = afterGettingClientData;
    18.   fOnCloseFunc = onCloseFunc;
    19.   fOnCloseClientData = onCloseClientData;
    20.   fIsCurrentlyAwaitingData = True;
    21.  
    22.   doGetNextFrame();
    23. }
     
    • Like Like x 4
  11. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    That's great news! :)

    So, the next step is to try to understand why the error is occurring, and solve it if possible.

    I've been looking at this for the last half hour, but not getting far. This is 3rd party code (live555) with lots of "spaghetti" (inheritance etc.).

    I should also point out that this version of the code is now more than 5 years old. The latest code may behave differently... but upgrading for TVE 3 is probably out of the question due to the risk of breaking analog tuner support, the IPTV filter, and the streaming server (all use this library).
     
    • Thank You! Thank You! x 3
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!