[Live-devel] Segmentation fault in	DelayQueue::removeEntry(DelayQueueEntry*)
    Francisco Feijoo 
    francisco at j2kvideo.com
       
    Fri Nov  4 07:42:56 PDT 2011
    
    
  
Ross, thanks for the quick answer.
We are connecting to one camera which needs a keep-alive command continuously. Apart from the doEventLoop() we call this function periodically (60s):
void RtspConnection::timeout()
{
	if ( client && session && this->getParameterSupported )
	{
		char * psz_bye = NULL;
		((RTSPClient*)client)->getMediaSessionParameter( *session, NULL, psz_bye );
	}
}
getParameterSupported comes from: 
char * options = ((RTSPClient*)client)->sendOptionsCmd( this->host );
		
if ( strstr(options, "GET_PARAMETER") != NULL )
{
	this->getParameterSupported = true;
}
Is this a wrong way to maintain the connection to the camera? Could this be the cause of the crash?
Thanks in advance.
-- 
Francisco Feijoo
Software Engineer
J2K Video Limited
T: +44 020 8133 9388
E: francisco at j2kvideo.com
W: www.j2kvideo.com
El 04/11/2011, a las 15:10, Ross Finlayson escribió:
>> Looking at the code here http://www.live555.com/liveMedia/doxygen/html/DelayQueue_8cpp-source.html I see this:
>> 
>> 00153 void DelayQueue::removeEntry(DelayQueueEntry* entry) {
>> 00154   if (entry == NULL || entry->fNext == NULL) return;
>> 00155   
>> 00156   entry->fNext->fDeltaTimeRemaining += entry->fDeltaTimeRemaining;
>> 00157   entry->fPrev->fNext = entry->fNext;
>> 00158   entry->fNext->fPrev = entry->fPrev;
>> 00159   entry->fNext = entry->fPrev = NULL;
>> 00160   // in case we should try to remove it again
>> 00161 }
>> 
>> I think the first if could produce a wrong memory access if entry is NULL. Is that correct?
> 
> No, because the statement at line 154 quite clearly tests for "entry == NULL", and returns if it is.
> 
> The "DelayQueue" code is very widely used and has been tested for a long time, so I don't understand why you would be seeing an error there.  (I hope you're not doing something stupid like trying to use multiple threads?)
> 
> 
> Ross Finlayson
> Live Networks, Inc.
> http://www.live555.com/
> 
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20111104/9933e915/attachment.html>
    
    
More information about the live-devel
mailing list