I have a problem with destroying RTSPServer
object: the app crashes with a SIGSEGV
Error. But the RTSPServer
object might be destroyed only in the case if I do not touch all other objects.
Is this a library bug or am I doing something wrong?
Their recent live555 changelog says:
2015.05.12:
- Updated the previous revision to change the order in which fields are deleted
in the "RTSPServer" destructor, to avoid a possible crash if "RTSPServer"
objects are deleted. (Thanks to ChaSeop Im for noting the problem.)
This is my destructor:
RTSPServerH264::~RTSPServerH264()
{
LOG(INFO) << "RTSP server close: destroying objects";
if (mSms.size() > 0)
{
LOG(INFO) << "destroying: Server Media Subsession vector";
for (ServerMediaSession* s : mSms)
{
s->deleteAllSubsessions();
Medium::close(s);
}
mSms.clear();
mLiveSubsession.clear();
}
if (mRTSPServer)
{
LOG(INFO) << "destroying: RTSPServer";
// BUG: Destroying RTSPServer object crashes the whole application!
Medium::close(mRTSPServer);
}
if (mUsageEnvironment)
{
LOG(INFO) << "destroying: Usage Environment";
mUsageEnvironment->reclaim();
}
if (mTaskScheduler)
{
LOG(INFO) << "destroying: Task Scheduler";
delete mTaskScheduler;
}
}
The answer to my question is now available here: http://lists.live555.com/pipermail/live-devel/2015-June/019490.html
Response text: