[Live-devel] segfault RtspClient

Gerald Hansink gerald.hansink at ieee.org
Fri Jun 2 05:19:26 PDT 2017


hi Ross,

see below for the explanation from Frederik of dereferencing a deleted
RTPInterface

---------

When I take the following steps to add debug output:
* #define DEBUG_SEND in RTPInterface.cpp
* print RTPInterface's address in its destructor
* print which RTPInterface address is used in SocketDescriptor's destructor

the following output shows that a socket write error (9) causes the
fDeleteMyselfNext flag to be set. When the taskScheduler task is eventually
deleting the SocketDescriptor, the RTPInterface used was already delete by
Medium::close*, which was called as a Teardown callback function.

* Medium::close | MediaLookupTable::remove | MediaSession::~MediaSession |
MediaSubsession::~MediaSubsession | MediaSubsession::deInitiate |
Medium::close | MediaLookupTable::remove | RTCPInstance::~RTCPInstance


sendRTPorRTCPPacketOverTCP: 56 bytes over channel 1 (socket 103)
sendRTPorRTCPPacketOverTCP: completed
sendRTPorRTCPPacketOverTCP: 16 bytes over channel 1 (socket 103)
sendRTPorRTCPPacketOverTCP: completed
SocketDescriptor(socket 103)::deregisterRTPInterface(channel 1)
Debug: ~RTPInterface  0x65a3eb38
SocketDescriptor(socket 103)::deregisterRTPInterface(channel 0)
Debug: ~RTPInterface  0x60f218dc
sendRTPorRTCPPacketOverTCP: 40 bytes over channel 1 (socket 98)
SocketDescriptor(socket 98)::deregisterRTPInterface(channel 255)
SocketDescriptor(socket 98)::deregisterRTPInterface fDeleteMyselfNext =
True (channel 255)
sendRTPorRTCPPacketOverTCP: failed! (errno 9)
Debug: ~RTPInterface  *0x65a41ab8*
SocketDescriptor(socket 98)::deregisterRTPInterface(channel 0)
Debug: ~RTPInterface  0x60f08a1c
Debug: Use rtpInterface *0x65a41ab8*  streamChannelId  1 @
~SocketDescriptor ... rtpInterface = (RTPInterface*)(iter->next(key))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20170602/e6913939/attachment.html>


More information about the live-devel mailing list