Windows Handles number increases

This forum is about all development around libVLC.
MarcoM
New Cone
New Cone
Posts: 4
Joined: 28 Apr 2010 14:42

Windows Handles number increases

Postby MarcoM » 24 Jun 2010 11:00

I use both Java (vlcj) and C# wrappers above libvlc 1.1.0 and I noticed that performing several stream rotation the number of Windows Handles grows continuously up to the crash of the process.
I cannot use a playlist but I have to use sequences of play/stop procedures because duration and URL of each played stream can change dinamically.
Any idea about this problem?
Note that I have the same behaviour with libvlc 1.0.x version and that the same problem can be generated performing several start and stop sequence with the VLC Player.
Thanks
Marco

ivoire
Cone that earned his stripes
Cone that earned his stripes
Posts: 413
Joined: 20 Aug 2008 11:29
VLC version: trunk
Operating System: linux (debian sid)
Contact:

Re: Windows Handles number increases

Postby ivoire » 24 Jun 2010 13:45

Do you have a sample source code so we can try to reproduce this issue ?
Only a sequence of start/stop and it will crahs ?

monsonr
New Cone
New Cone
Posts: 5
Joined: 24 Jun 2010 19:20

Re: Windows Handles number increases

Postby monsonr » 24 Jun 2010 19:36

This happens with the ActiveX control or calling native code in C#.

To test just drop the Ax control on a form and loop start/stop calls. Looks like 3-5 handles per loop.

Code: Select all

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Threading; namespace VlcActiveXTest { public partial class Form1 : Form { long iteration = 0; public Form1() { InitializeComponent(); } bool first = true; protected void RestartVideo() { textBoxOutput.Text = "Stream Start Iteration #" + iteration + " Done"; try { Interlocked.Increment(ref iteration); if (!first) { this.axVLCPlugin21.playlist.stop(); } else { first = false; this.axVLCPlugin21.playlist.clear(); this.axVLCPlugin21.playlist.add(textBoxProxyUrl.Text, "test", ":file-caching=0"); } this.axVLCPlugin21.playlist.play(); } catch { textBoxOutput.Text += Environment.NewLine + Environment.NewLine + "Error"; buttonGo_Click(null, null); } finally { } } bool flipOn = true; private void buttonGo_Click(object sender, EventArgs e) { if (flipOn) { RestartVideo(); timer1.Start(); flipOn = false; } else { flipOn = true; first = true; iteration = 0; timer1.Stop(); this.axVLCPlugin21.playlist.stop(); } } private void timer1_Tick_1(object sender, EventArgs e) { RestartVideo(); } } }


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 40 guests