hi
i did a movie bank sketch, but it seems to unveil a lot of problems within quicktime and java, perhaps there's a safer way ??
this is the movie bank sketch i am using:
import processing.video.*;
String file[] = {
"movie1.mov", "movie2.mov", "movie3.mov", "movie4.mov", "movie5.mov",
"movie6.mov", "movie7.mov", "movie8.mov", "movie9.mov", "movie10.mov" };
Movie mb[] = new Movie[file.length];
Movie movie;
int movieindex = 0;
void setup(){
size(800,600);
for(int i=0; i<file.length; i++){
mb[i] = new Movie(this,file[i]);
mb[i].loop();
}
movie = mb[movieindex];
}
void movieEvent(Movie movie) {
if(mb[movieindex].available()){
mb[movieindex].read();
movie = mb[movieindex];
}
}
void draw(){
image(movie,0,0,width,height);
}
void keyPressed(){
if(key==' ')
movieindex = (movieindex + 1 )%file.length;
}
two types of errors come out with this sketch sporadically, when changing movies, on mac os x.5.5, intel machine..
one invalid memory access and crash, like:
Invalid memory access of location 65561800 eip=ffff0937
with crash reporter:
Java information:
Version: Java HotSpot(TM) Client VM (1.5.0_16-133 mixed mode)
Virtual Machine version: Java HotSpot(TM) Client VM (1.5.0_16-133) for macosx-x86, built on Aug 27 2008 11:00:20 by root with gcc 4.0.1 (Apple Inc. build 5465)
Exception type: Bus Error (0xa) at pc=0x9676eb2d
Current thread (0x0102d580): JavaThread "Thread-8" [_thread_in_native, id=9915392]
Stack: [0xb13c0000,0xb1440000)
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j quicktime.qd.Pict.GetMoviePict(II)I+0
j quicktime.qd.Pict.fromMovie(Lquicktime/std/movies/Movie;I)Lquicktime/qd/Pict;+5
j quicktime.std.movies.Movie.getPict(I)Lquicktime/qd/Pict;+2
j processing.video.Movie.read()V+73
j movieBank_p5_2.movieEvent(Lprocessing/video/Movie;)V+24
j sun.reflect.GeneratedMethodAccessor1.invoke(Ljava/lang/Object;[Ljava/lang/Object
Ljava/lang/Object;+40
J sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Ob
ject;)Ljava/lang/Object;
J java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang
/Object;
v ~RuntimeStub::alignment_frame_return Runtime1 stub
j processing.video.Movie.run()V+68
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub
Java Threads: ( => current thread )
0x01034a20 JavaThread "DestroyJavaVM" [_thread_blocked, id=-1333784576]
0x0102f290 JavaThread "Thread-11" [_thread_blocked, id=10218496]
0x0102e7a0 JavaThread "Thread-10" [_thread_in_native, id=9918976]
0x0102ddb0 JavaThread "Thread-9" [_thread_blocked, id=10029056]
=>0x0102d580 JavaThread "Thread-8" [_thread_in_native, id=9915392]
0x0102cba0 JavaThread "Thread-7" [_thread_blocked, id=9763840]
0x0102c4e0 JavaThread "Thread-6" [_thread_blocked, id=9680384]
0x0102bfc0 JavaThread "Thread-5" [_thread_blocked, id=9596928]
0x0102b730 JavaThread "Thread-4" [_thread_blocked, id=9564160]
0x0102b040 JavaThread "Thread-3" [_thread_blocked, id=9482752]
0x0102aa70 JavaThread "Thread-2" [_thread_blocked, id=9335296]
0x010257a0 JavaThread "Animation Thread" [_thread_in_native, id=9216000]
0x0101eee0 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=9172480]
0x0101c0d0 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=9133056]
0x010172e0 JavaThread "AWT-Shutdown" [_thread_blocked, id=8891392]
0x01016d60 JavaThread "AWT-AppKit" daemon [_thread_in_native, id=-1605664864]
0x0100f6f0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=8505856]
0x0100e850 JavaThread "CompilerThread0" daemon [_thread_blocked, id=8502272]
0x0100e310 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=8498688]
0x0100d690 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=8495104]
0x0100d1c0 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=8471040]
0x0100c460 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=8423936]
0x01007c40 JavaThread "Finalizer" daemon [_thread_blocked, id=8490496]
0x01007860 JavaThread "Reference Handler" daemon [_thread_blocked, id=8486912]
Other Threads:
0x01006fb0 VMThread [id=8483328]
0x01010230 WatcherThread [id=8509440]
the other error type quicktime decompressor needed to see photojpeg files (doesnt really crash, picture doesnt move, and console keeps
looping out these errors)
at java.lang.reflect.Method.invoke(Method.java:585)
at processing.video.Movie.run(Movie.java:684)
at java.lang.Thread.run(Thread.java:613)
quicktime.std.StdQTException[QTJava:7.5.5g],-50=paramErr,QT.vers:7558000
at quicktime.std.StdQTException.checkError(StdQTException.java:38)
at quicktime.qd.Pict.fromMovie(Pict.java:105)
at quicktime.std.movies.Movie.getPict(Movie.java:796)
at processing.video.Movie.read(Movie.java:424)
at movieBank_p5.movieEvent(movieBank_p5.java:54)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at processing.video.Movie.run(Movie.java:684)
at java.lang.Thread.run(Thread.java:613)
quicktime.std.StdQTException[QTJava:7.5.5g],-50=paramErr,QT.vers:7558000
at quicktime.std.StdQTException.checkError(StdQTException.java:38)
at quicktime.qd.Pict.fromMovie(Pict.java:105)
at quicktime.std.movies.Movie.getPict(Movie.java:796)
at processing.video.Movie.read(Movie.java:424)
at movieBank_p5.movieEvent(movieBank_p5.java:54)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at processing.video.Movie.run(Movie.java:684)
at java.lang.Thread.run(Thread.java:613)
quicktime.std.StdQTException[QTJava:7.5.5g],-50=paramErr,QT.vers:7558000
at quicktime.std.StdQTException.checkError(StdQTException.java:38)
at quicktime.qd.Pict.fromMovie(Pict.java:105)
at quick