<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Malgun Gothic";
panose-1:2 11 5 3 2 0 0 2 0 4;}
@font-face
{font-family:"Malgun Gothic";
panose-1:2 11 5 3 2 0 0 2 0 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
text-autospace:none;
word-break:break-hangul;
font-size:10.0pt;
font-family:"Malgun Gothic";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:40.0pt;
margin-bottom:.0001pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:0cm;
mso-para-margin-left:4.0gd;
mso-para-margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
text-autospace:none;
word-break:break-hangul;
font-size:10.0pt;
font-family:"Malgun Gothic";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Malgun Gothic";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Malgun Gothic";}
/* Page Definitions */
@page WordSection1
{size:612.0pt 792.0pt;
margin:3.0cm 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:991562376;
mso-list-type:hybrid;
mso-list-template-ids:-1893945454 1848688908 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:-;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:38.0pt;
text-indent:-18.0pt;
font-family:"Malgun Gothic";
mso-bidi-font-family:"Times New Roman";}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:\F06E;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:60.0pt;
text-indent:-20.0pt;
font-family:Wingdings;}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F075;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:80.0pt;
text-indent:-20.0pt;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F06C;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:100.0pt;
text-indent:-20.0pt;
font-family:Wingdings;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:\F06E;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:120.0pt;
text-indent:-20.0pt;
font-family:Wingdings;}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F075;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:140.0pt;
text-indent:-20.0pt;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F06C;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:160.0pt;
text-indent:-20.0pt;
font-family:Wingdings;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:\F06E;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:180.0pt;
text-indent:-20.0pt;
font-family:Wingdings;}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F075;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:200.0pt;
text-indent:-20.0pt;
font-family:Wingdings;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=KO link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Hi.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I found crash when RTSPServer is closed.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I found that RTSPServer::~RTSPServer added some code about closing fTCPStreamingDatabase in last version.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>The code occurred problem, because deleted fTCPStreamingDatabase is used when closing client connection objects.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>(RTSPServer::RTSPClientConnection::closeSockets() calls fOurServer.stopTCPStreamingOnSocket(fClientOutputSocket);)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>When I changed code like below, it’s no problem.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>RTSPServer::~RTSPServer() {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> // Turn off background read handling:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> envir().taskScheduler().turnOffBackgroundReadHandling(fRTSPServerSocket);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> ::closeSocket(fRTSPServerSocket);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> envir().taskScheduler().turnOffBackgroundReadHandling(fHTTPServerSocket);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> ::closeSocket(fHTTPServerSocket);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> // Close all client session objects:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> RTSPServer::RTSPClientSession* clientSession;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> while ((clientSession = (RTSPServer::RTSPClientSession*)fClientSessions->getFirst()) != NULL) {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> delete clientSession;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> delete fClientSessions;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> // Close all client connection objects:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> RTSPServer::RTSPClientConnection* connection;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> while ((connection = (RTSPServer::RTSPClientConnection*)fClientConnections->getFirst()) != NULL) {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> delete connection;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> delete fClientConnections;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> delete fClientConnectionsForHTTPTunneling; // all content was already removed as a result of the loop above<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> // Delete all server media sessions<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> ServerMediaSession* serverMediaSession;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> while ((serverMediaSession = (ServerMediaSession*)fServerMediaSessions->getFirst()) != NULL) {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> removeServerMediaSession(serverMediaSession); // will delete it, because it no longer has any 'client session' objects using it<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> delete fServerMediaSessions;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> // Delete any pending REGISTER requests:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> RegisterRequestRecord* registerRequest;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> while ((registerRequest = (RegisterRequestRecord*)fPendingRegisterRequests->getFirst()) != NULL) {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> delete registerRequest;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> delete fPendingRegisterRequests;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US> // Empty out and close "fTCPStreamingDatabase":<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> streamingOverTCPRecord* sotcp;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> while ((sotcp = (streamingOverTCPRecord*)fTCPStreamingDatabase->getFirst()) != NULL)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> delete sotcp;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> delete fTCPStreamingDatabase;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>}<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Any advice or help would be appreciated.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>- ChaSeop Im<o:p></o:p></span></p></div></body></html>