We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi there,
I have problems loading several videos with GLvideo. I need to load, and play them continuously, one by one (a big video, and jump() is not an option).
With "myMovie.close()" I free the CPU RAM. No problems. It works perfect.
The problem is the GPU RAM. It becomes full, until the program crash. With
sudo vcdbg reloc
I can see that
total space allocated is 592M, with 590M relocatable, 2.3M legacy and 0 offline
1 legacy blocks of size 2359296
free list at 0x3da82260
580M free memory in 37 free block(s)
Then 560M free memory, 500, 400,...until the program crash.
I have tried everything, but no way to free the GPU RAM.
This is a simplification of my code (this is not my code, it is just a simplification):
import gohai.glvideo.*;
GLMovie myMovie;
boolean movieLoaded=false;
void setup() {
size(400, 240, P2D);
}
void draw() {
background(0);
if (movieLoaded) {
if (myMovie.available()) {
myMovie.read();
}
image(myMovie, 0, 0, width, height);
}
if (frameCount % 900 == 0) {
if (movieLoaded) {
clearMovie();
}
} else if (frameCount % 900 == 30) {
if (!movieLoaded) {
myMovie = new GLMovie(this, "launch1.mp4");
movieLoaded=true;
myMovie.play();
}
}
}
public void clearMovie() {
myMovie.close();
movieLoaded=false;
}
Any help would be more than welcome! f.-
Answers
Hi @RaulF - thank you for the report, this issue on GitHub might be the same or related.
It's something that I need to look into at some point, but I currently don't foresee having time for it in the near future - sorry. That said: the library code is open source, so if anyone else wants to try investigating this, they can. (Tracking down GPU memory leaks in a closed-source graphics driver is not exactly the easiest thing though, unfortunately.)
Hi gohai,
Yes, I think it is the same issue. I really would like to help, but I have no idea where to start :D
Looking into the GPU memory, after a while, it is full of 'Orphaned EGLImage storage'
0x3d27e9a0: used 1.5M (refcount 1 lock count 0, size 1536000, align 4096, data 0x3d27f000, d1rual) 'Orphaned EGLImage storage'
but I haven't found any documentation about this anywhere.
Best.
Hi gohai,
I will take a look into this this December. Any clue where or how to start looking for? I have any experience with that kind of things, and I can't find any info anyway.
Thanks!