-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak #15
Comments
That is in fact what is happening. VLC python docs are here -> https://www.olivieraubert.net/vlc/python-ctypes/doc/ I don't see a delete function though for the player class. |
I've been browsing those for a couple days. There's a release function but as soon as you hit it, it locks up the player. there's got to be a way to only have one instance running and just add url's to it's playlist. |
Yea - I was never able to get the API to add songs to an existing player, |
We'll figure it out. It's got to be in there somewhere. |
Maybe something along these lines? https://forum.videolan.org/viewtopic.php?t=90233 |
Does that support appending more files later? |
Switching back to the gstreamer backend and adding a bus to detect the eos signal until I can figure out the vlc bindings. Everything I've tried so far has awesomely failed... |
Found out how to kill the old player. It was in fact "release." It basically works like this. I attached another callback to the end reached event that invokes "release" then "nextSong" from the mainloop. Now it never goes over 5 threads. Next up is to try to tame the RAM usage. It seems to go up a megabyte or 2 everytime the song changes. Maybe it's not clearing the song out of memory? When I get that figured out I'll do a merge request. |
Sounds good. I'm going to be fairly quiet the next couple of weeks as quarter where I teach is coming to an end. Will be reading/reviewing anything you post. |
That's cool gotta pay those bills,lol!!! It'll give me a chance to do some tweaking. |
The memory leak is in the list created in addSongs and in nextSong. Even if everything is disabled and all you do is retrieve a playlist and cycle through the song index without even actually loading anything, RAM usage increases by pretty much exactly the amount as the data(album art, mp4 audio file, etc) that would have been loaded if everything weren't disabled. And it's never garbage collected. You would expect that the list would be a reference to the objects not the actual objects themselves. |
qAndora spawns new threads for each new song and RAM usage gets crazy after a while. After listening for a few hours it was 60+ threads strong and RAM usage was over 100MB. It's got to be in the VLCplayer or VLC.py it's self. I wrote a tkinter UI and it exhibits the same behavior. So I know it's not Pyside/Qt. I'm definitely not an expert on the VLC bindings but from the looks of things a new player is created every time the song changes if so it seems that the old instance is not properly destroyed?
The text was updated successfully, but these errors were encountered: