[vlc-devel] TCP handle leak on failed attempt to open network stream

tom245292 at hushmail.me tom245292 at hushmail.me
Wed Jan 20 11:46:32 CET 2010


Hello,

I have encountered what appears to be a TCP handle leak in the 
Windows version of VLC that occurs when an attempt to open a 
network stream fails due to the address not being found. It occurs 
with RTSP, HTTP as well as other protocols.

Both Microsoft's 'netstat' tool and Sysinternal's 'Process 
Explorer' show that the number of TCP/IP connections increases by 
two every time VLC makes a failed connection attempt. The leak does 
NOT occur if VLC successfully connects or if the connection fails 
while it is playing.

The connections that are left open are TCP connections from a port 
on the localhost back to another port on the localhost and they are 
all in the 'ESTABLISHED' state. These connections are in the 
VLC.exe process itself. This issue occurs in both the VLC plugin 
and the main app itself.

I am developing an application that uses the VLC plugin inside an 
embedded browser(s) to display IPCamera streams. My app attempts to 
re-connect when a connection is lost. This leak therefore becomes a 
problem when multiple streams attempt to re-connect over a period 
of time.

I have observed this leak on vlc v1.0.2, v1.0.3 and also on a 
nightly build downloaded yesterday.

I am searching through VLC's source code to try and find where 
these connections are left open. Any help or advice would be 
greatly appreciated.

Thanks,
Tom


System information: Windows XP SP3 (latest updates), VLC v1.0.3.

Example command line: "c:\program files\VideoLan\vlc\vlc.exe 
rtsp:\\badURL".




More information about the vlc-devel mailing list