This is based on the slit-scan example from 
            Form+Code
            
            
I have 2 problems; the program quits on me before it reaches the end due to this error,
 
            
           I have 2 problems; the program quits on me before it reaches the end due to this error,
             which I can't figure out how to debug:
             
              
               
              
              
             
              
             
             
            
               java(9270,0xac90e2c0) malloc: *** error for object 0x11542c0: double free
              
              
               *** set a breakpoint in malloc_error_break to debug
              
             
              and would there be any clever way of actually outputting a very wide file
             
            
             of the entire process, without having a window-size of say 8000 pixels?
             
             
             
              
             
              
             
             
              
             
            
 
           - import processing.video.*;
 - Movie myVideo;
 - int video_width = 300;
 - int video_height = 400;
 - int video_slice_x;
 - // length of output file
 - int window_width = 8000;
 - int window_height = video_height;
 - int draw_position_x = 0;
 - boolean newFrame = false;
 - int lastTimeCheck;
 - int timeIntervalFlag = 2500;
 - void setup() {
 - myVideo = new Movie(this, "test.mov");
 - size(window_width, window_height, P2D);
 - background(0);
 - myVideo.loop();
 - lastTimeCheck = millis();
 - }
 - void movieEvent(Movie myMovie) {
 - myMovie.read();
 - newFrame = true;
 - }
 - void draw() {
 - if (newFrame) {
 - loadPixels();
 - for (int y=0; y<window_height; y++){
 - if ( millis() > lastTimeCheck + timeIntervalFlag ) {
 - lastTimeCheck = millis();
 - video_slice_x = int(random(60,255));
 - }
 - int setPixelIndex = y*window_width + draw_position_x;
 - int getPixelIndex = y*video_width + video_slice_x;
 - pixels[setPixelIndex] = myVideo.pixels[getPixelIndex];
 - }
 - updatePixels();
 - draw_position_x++;
 - if (draw_position_x >= window_width) {
 - // saveFrame when it reaches the desired length
 - saveFrame("line-####.tif");
 - exit();
 - }
 - newFrame = false;
 - }
 - }
 
 
              
              1  
            
 
            