Bug 1417 : memory leak playing video
Last modified: 2009-12-24 06:28




Status:
RESOLVED
Resolution:
WONTFIX -
Priority:
P2
Severity:
normal

 

Reporter:
shitao88
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2009-12-23 23:27
Playing a sequence of videos, this small program encounters a memory leak, and is
eventually killed by the operating system. I have tried sprinkling System.gc() statements
throughout the code, with no effect. I have replicated this on both Windows and MacOSX.

Using Version 1.0.9

Operating system MacOS X (powerpc) and Windows 7 (intel).

Here is the smallest piece of code that demonstrates the memory leak quickly (the video is
sped up to demonstrate the memory leak more quickly). Change the value of movieFileName
to a local video file name to replicate.

import processing.video.*;

Movie movie;
String movieFileName =
"/Users/stein/Documents/Processing/summer05/Clips/MVI_1626.AVI";

void setup() {
size(320, 240, P2D);
movie = new Movie(this, movieFileName);
movie.play();
movie.speed(16.0);
}

void draw() {
if (movie.duration() == movie.time()) {
movie.stop();
movie = new Movie(this, movieFileName);
movie.play();
movie.speed(16.0);
}
image(movie, 0, 0);
}

void movieEvent(Movie m) {
m.read();
}
Additional Comment #1 From fry 2009-12-24 06:28
thanks for the report. i should note that we won't be fixing any more bugs
in the video library, as quicktime for java is no longer supported by
apple. we'll be switching to a new version of the video library based on
gsvideo in the future, i recommend trying that out for the time being:
http://codeanticode.wordpress.com/category/gstreamer/