[Live-devel] TEARDOWN issue when using response handler

Erlandsson, Claes P (CERLANDS) CERLANDS at arinc.com
Thu Nov 8 10:26:16 PST 2012


I'm using the liveMedia (2012.11.05) connecting to a Cisco VSM (version
6.3.2-47d). The server, as I've mentioned in a previous post, requires the
client to wait for the TEARDOWN-response, otherwise the server logs will be
filled with errors and things will eventually go bad. This can arguably be
considered an issue with the server, but it should anyhow be possible to
work around.

 

The issue on the client side is that whenever using a TEARDOWN response
handler it crashes once in a while. I want to point out that I've has the
issue when using sendTeardownCommand() without a response handler. Our
client cycles through streams frequently and I'd say I see the problem about
1 time out of 7000. That means about once every other hour when cycling
through 10 cameras every 10s. 

 

After sending TEARDOWN the response handler is never called, but instead an
exception is thrown. I haven't been able to catch the exception in the
liveMedia DLL, but I instead get an AccessViolationException in the C# code
that uses it. Logging shows that the exception happens at the exact same
place every time, which is right after calling sendTeardownCommand(), but it
never reaches the response handler.

 

Please see sample code below.

 

The code can't really be simpler, and I've no idea why it occurs.

Have I missed something obvious? Anyone experienced anything similar?

 

 

 

void shutdownStream(RTSPClient* rtspClient, int exitCode)

{

// Code omitted, as shutdownStream() is identical to the testRTSPClient
example

// beside having moved Medium::close(rtspClient) to a separate function and
adding

// the TEARDOWN response handler

...

if (someSubsessionsWereActive)

                rtspClient->sendTeardownCommand(*scs.session,
continueAfterTEARDOWN);

           else

                cleanUpStream(rtspClient);

     }

     else

     {

           cleanUpStream(rtspClient);

     }

}

 

 

void continueAfterTEARDOWN(RTSPClient* rtspClient, int resultCode, char*
resultString)

{

     cleanUpStream(rtspClient);

}

 

 

void cleanUpStream(RTSPClient* rtspClient)

{

     UsageEnvironment& env = rtspClient->envir();

 
env.taskScheduler().deleteEventTrigger(((OurRTSPClient*)rtspClient)->myStart
StreamEvent);

 
env.taskScheduler().deleteEventTrigger(((OurRTSPClient*)rtspClient)->myStopS
treamEvent);

 
env.taskScheduler().deleteEventTrigger(((OurRTSPClient*)rtspClient)->mySeekA
bsoluteEvent);

 

     env << *rtspClient << "Closing the stream.\n";

     Medium::close(rtspClient);

}

 

 

/Claes

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20121108/1972474b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5740 bytes
Desc: not available
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20121108/1972474b/attachment-0001.bin>


More information about the live-devel mailing list