Forums > Jitter

Hard Disk Full

April 7, 2006 | 6:18 pm

Hi – just re-posting this from previous post as it is a seperate question and nothing to do with previous post.

When running this patch for more than 20 minutes, the patch uses up all my hard drive space (about 2.5. gb free)

Since i’m not writing to disk, this shouldn’t happen – right?

Do i need to clear the kill the grab object after every loop or something?

Any advise would be great

thanks again,
Jimmy

——-patch———
max v2;
#N vpatcher 113 45 1793 991;
#P origin 160 17;
#P setbglock 1;
#P window setfont Times 10.;
#P comment 473 883 72 1310730 Display as floating window;
#P comment 715 928 88 1310730 Full Screen Display;
#P toggle 458 891 15 0;
#P window setfont "Fixedwidth Serif" 10.;
#P message 458 909 73 1441802 floating $1;
#P newex 810 894 212 1441802 sel 0 1;
#P message 810 915 98 1441802 ; max showmenubar;
#P message 911 915 98 1441802 ; max hidemenubar;
#P message 611 927 83 1441802 fullscreen $1;
#P toggle 700 927 15 0;
#P window setfont Times 10.;
#P comment 762 907 44 1310730 space bar;
#P window setfont "Fixedwidth Serif" 10.;
#P newex 705 874 62 1441802 select 32;
#P newex 706 847 40 1441802 key;
#P newex 294 935 219 1441802 jit.window Display1 100 100 580 460;
#P window setfont Times 10.;
#P comment 563 883 78 1310730 Interpolate to smooth pixelation;
#P toggle 548 891 15 0;
#P window setfont "Fixedwidth Serif" 10.;
#P message 548 909 62 1441802 interp $1;
#P user panel 457 878 567 77;
#X brgb 127 127 255;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 286 928 171 28;
#X brgb 127 127 255;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user jit.pwindow 606 584 322 242 0 1 0 0 1 0;
#P flonum 1133 379 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 1133 404 83 1441802 brightness $1;
#P newex 627 480 68 1441802 jit.brcosa;
#B color 5;
#P window setfont "Sans Serif" 9.;
#P message 1009 392 85 196617 set 0 , 1 5000 50;
#P newex 614 445 114 196617 jit.dimmap @invert 1 0;
#P message 263 134 50 196617 stop;
#P button 88 280 15 0;
#P button 53 280 15 0;
#P window setfont "Sans Serif" 12.;
#P message 271 220 33 196620 read;
#P message 758 468 54 196620 xfade $1;
#P flonum 912 335 35 12 0.3 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user jit.pwindow 1147 573 322 242 0 1 0 0 1 0;
#P newex 552 516 49 196620 jit.xfade;
#P message 228 33 29 196620 $1;
#P message 265 34 15 196620 1;
#P hidden message 288 33 15 196620 0;
#P hidden message 1022 76 88 196620 matrixcount $1;
#P toggle 152 6 15 0;
#P window setfont "Sans Serif" 20.;
#P number 1051 27 63 20 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 12.;
#P newex 684 174 35 196620 sel 0;
#P newex 598 185 49 196620 sel 0;
#P button 654 92 15 0;
#P newex 590 267 74 196620 prepend set;
#P message 595 311 66 196620 index 200;
#P newex 744 269 74 196620 prepend set;
#P message 683 309 106 196620 outputmatrix 162;
#N counter 0 100;
#X flags 0 0;
#P newobj 704 123 108 196620 counter 0 100;
#N counter 0 100;
#X flags 0 0;
#P newobj 595 148 83 196620 counter 0 100;
#P newex 594 222 86 196620 prepend index;
#P newex 681 220 124 196620 prepend outputmatrix;
#P user gswitch2 651 113 39 32 1 0;
#P newex 562 371 179 196620 jit.matrixset 200 4 char 320 240;
#P newex 444 194 35 196620 sel 0;
#P newex 345 189 49 196620 sel 0;
#P message 34 130 36 196620 open;
#P user gswitch 15 337 41 32 0 0;
#P newex 91 146 58 196620 jit.qt.grab;
#P user gswitch 119 511 41 32 1 0;
#P user jit.pwindow 196 579 322 242 0 1 0 0 1 0;
#P newex 225 1 60 196620 loadbang;
#P button 422 89 15 0;
#P newex 349 266 74 196620 prepend set;
#P message 346 307 66 196620 index 161;
#P newex 454 267 74 196620 prepend set;
#P message 440 308 106 196620 outputmatrix 0;
#N counter 1 0 100;
#X flags 0 0;
#P newobj 433 149 93 196620 counter 1 0 100;
#N counter 0 100;
#X flags 0 0;
#P newobj 344 149 83 196620 counter 0 100;
#P newex 345 228 86 196620 prepend index;
#P newex 442 229 124 196620 prepend outputmatrix;
#P user gswitch2 396 112 39 32 0 0;
#P user jit.pwindow 127 322 82 62 0 1 0 0 1 0;
#P newex 343 338 179 196620 jit.matrixset 200 4 char 320 240;
#P newex 178 125 66 196620 jit.qt.movie;
#P newex 152 40 64 196620 qmetro 40;
#P user jit.fpsgui 62 681 60 9109516 0;
#P window setfont "Sans Serif" 20.;
#P comment 782 39 237 196628 buffer time (in frames);
#P user panel 330 84 232 247;
#X brgb 202 212 135;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P background;
#P user panel 579 85 232 247;
#X brgb 207 174 174;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P background;
#P fasten 21 0 22 1 96 215 35 215;
#P fasten 18 0 23 0 230 31 39 31;
#P fasten 19 0 3 0 202 735 396 735 396 673 67 673;
#P fasten 4 0 21 0 157 122 96 122;
#P fasten 23 0 21 0 39 154 72 154 72 122 96 122;
#P fasten 38 0 20 0 689 220 815 220 815 337 124 337;
#P fasten 25 0 20 0 449 219 559 219 559 320 124 320;
#P hidden connect 42 0 20 0;
#P fasten 22 0 7 0 20 392 133 392;
#P hidden connect 43 0 40 0;
#P hidden fasten 18 0 4 0 230 31 157 31;
#P connect 40 0 4 0;
#P connect 4 0 5 0;
#P connect 49 0 5 0;
#P connect 52 0 5 0;
#P connect 6 0 19 0;
#P hidden connect 18 0 44 0;
#P hidden connect 18 0 43 0;
#P hidden connect 18 0 42 0;
#P fasten 45 0 64 0 557 838 299 838;
#P fasten 73 0 64 0 463 929 299 929;
#P fasten 69 0 64 0 616 946 495 946 495 929 299 929;
#P fasten 61 0 64 0 553 929 299 929;
#P connect 28 0 6 0;
#P hidden fasten 41 0 6 0 1027 78 348 78;
#P connect 21 0 6 0;
#P fasten 9 0 6 0 447 305 348 305;
#P connect 10 0 6 0;
#P fasten 8 0 11 0 401 160 349 160;
#P connect 11 0 24 0;
#P connect 11 0 10 0;
#P connect 16 0 15 0;
#P connect 10 0 16 0;
#P hidden fasten 39 0 24 1 1056 71 389 71;
#P hidden connect 43 0 8 0;
#P connect 17 0 8 0;
#P hidden fasten 39 0 11 4 1056 71 421 71;
#P fasten 24 0 17 0 350 223 336 223 336 93 427 93;
#P fasten 25 0 17 0 449 219 541 219 541 93 427 93;
#P fasten 4 0 8 1 157 117 327 117 327 63 430 63;
#P fasten 8 1 12 0 430 160 438 160;
#P connect 14 0 13 0;
#P connect 12 0 9 0;
#P connect 12 0 25 0;
#P connect 9 0 14 0;
#P connect 74 0 73 0;
#P hidden fasten 39 0 12 4 1056 70 518 70;
#P connect 62 0 61 0;
#P connect 6 0 45 0;
#P connect 48 0 45 0;
#P hidden fasten 28 0 26 0 686 304 567 304;
#P hidden fasten 41 0 26 0 1027 71 567 71;
#P connect 29 0 26 0;
#P connect 21 0 26 0;
#P connect 29 0 35 0;
#P connect 55 0 45 1;
#P connect 30 0 29 0;
#P fasten 27 0 30 0 656 159 600 159;
#P connect 35 0 34 0;
#P connect 30 0 37 0;
#P fasten 68 0 69 0 705 945 696 945 696 923 616 923;
#P connect 26 0 53 0;
#P connect 53 0 55 0;
#P fasten 56 0 55 0 1138 431 632 431;
#P hidden fasten 39 0 37 1 1056 72 642 72;
#P connect 36 0 27 0;
#P connect 43 0 36 0;
#P fasten 37 0 36 0 603 222 587 222 587 92 659 92;
#P fasten 38 0 36 0 689 220 792 220 792 92 659 92;
#P hidden fasten 39 0 30 4 1056 72 672 72;
#P fasten 4 0 27 1 157 117 327 117 327 31 685 31;
#P connect 31 0 28 0;
#P connect 33 0 32 0;
#P connect 31 0 38 0;
#P connect 66 0 68 0;
#P fasten 27 1 31 0 685 159 709 159;
#P connect 65 0 66 0;
#P connect 28 0 33 0;
#P connect 47 0 48 0;
#P hidden fasten 39 0 31 4 1056 72 805 72;
#P fasten 68 0 72 0 705 945 806 945 806 891 815 891;
#P connect 72 0 71 0;
#P connect 72 1 70 0;
#P hidden connect 39 0 41 0;
#P hidden connect 44 0 39 0;
#P connect 57 0 56 0;
#P connect 26 0 46 0;
#P pop;


April 7, 2006 | 6:32 pm

400 * (320 * 240 * 4 * 8bytes) / 1024 = 960000K / 1024 = 937.5MB

How much RAM do you have installed on your system? I am pretty certain
this is your computer paging virtual memory to disk. Especially since
there’s no writing to disk going on in the patch.

jb


April 7, 2006 | 7:01 pm

Note that you are using quite a bit of ram in this patch and If
you’ve increased the jit.matrixset sizes it could be even more. With
the default 200 matrix for each matrixset sizes, we have:

320 x 240 x 4 x 200 x 2=122,880,000bytes == ~122MB

If you were to change the matrixset sizes to be something like 2000,
you would use almost 2GB and this would get paged to disk on any VM
system (XP or OS X). So far with your patch, I don’t see any memory
leak that would otherwise cause RAM to grow over time, or any disk
writing in your patch. So I’d need to know more information about
your exact usage of this patch, before I could speculate further.

Btw, int->[prepend index]->[prepend set]->message box, is probably
more efficiently (and clearly) represented as int->[pack index 0]
then just bang the left input of pack instead of banging the message
box.

-Joshua


April 7, 2006 | 7:16 pm

Thanks Guys.

I’m using a powebook G4 with 1gb of RAM and was still gettng the problem when using a matrixset size of 100.

If i supply more hard drive space will it stop the problem, or will it just continue to take whatever space i give it?

It’s for an installation which is to run for about 2 days.

Thanks again,
Jimmy


April 7, 2006 | 7:58 pm

Then it sounds like a memory leak either in Jitter or the video
capture device driver. I’m not seeing the problem here on my G4
AluBook running 10.4.5 and my latest development version of Jitter,
so it might be a bug in an earlier version of Jitter, though I don’t
recall having such problems with similar setups in any version in the
past (have used patches which make use of these elements and more for
several hours at a time without problem). Could you please clarify
your video input device, whether you installed drivers for this
device, as well as what version of Jitter, MaxMSP, and the OS you are
using?

Also, it would help us out If you could also take some time to
isolate what part of the patch is leading to this behavior. For example:

- Does it happen when you replace jit.qt.grab with jit.qt.movie?

- If you’re running OS X, and you run process viewer or "top" from
the terminal, does the MaxMSP memory usage keep growing as your patch
runs? (for more info on these and other memory viewing utilities
check out http://www.osxfaq.com/dailytips/03-2002/03-18.ws)

- If you remove the jit.matrixset portion of your patch (just use a
single jit.matrix) is the behavior the same?

- Is any other patch open or are any other applications on the system
growing their memory usage without bound?

-Joshua


April 8, 2006 | 12:05 pm

Hi All,
I’ve gone through all debugging steps as suggested and it seems as though the dimmap object is the cause of the leak – Steps below.

Setup:
10.3.9 – mac os x 667 Mhz PowerPC G4
1 GB SDRAM
MAX 4.3.1
ATY, RageM6 BUS: AGP Slot: ATI
VRAM 16 Mb

Debug Steps:
1. Single Matrix reading from a grab object – No problem at all

2. Same original setup reading from a qt.movie into matrixset with dimmap and fade (of about 100 MB) – same issue

3. Matrixset objects replaced with single matrix object (everything else the same including fade and dimmap etc..) Same issue – if anything this take the RAM faster than any other tests so far

4. Same original setup without the Fade – Same issue

5. Same original setup without the DIMMAP – No problem

The exact issue is that MAX is taking approx. 2mb of RAM for every second that the patch is run – i’ve also briefly tested this on my iMac G5 (which is too big too use for the show) and am getting the same problem – although i haven’t tested this as much as with my powerbook set-up (i should get to this today)

I’ll play around with alternatives to the dimmap object and will post any further results.

Thanks everyone for being so helpful, i only started using Jitter last Monday and it’s a real delight to fins such a helpful community here – hopefully i can return the favor in the future as i learn the software further

Cheers,
Jimmy


April 8, 2006 | 12:24 pm

Ok Update: I went through the same debugging steps on my iMac G5 with exactly the same result so i’ve now swapped the ‘jit.dimmap @invert 1 0′ object for a ‘jit.mxform2d @offset_x -320 @boundmode 4′ object and everything is running steady

Hopefully this will help anyone who hits the same problem

Thanks!
Jimmy

******fixed patch – but not completed with desired efect yet***

max v2;
#N vpatcher 113 45 1793 991;
#P origin 160 17;
#P setbglock 1;
#P window setfont "Sans Serif" 9.;
#P newex 877 470 214 196617 jit.mxform2d @offset_x -320 @boundmode 4;
#P window setfont Times 10.;
#P comment 473 883 72 1310730 Display as floating window;
#P comment 715 928 88 1310730 Full Screen Display;
#P toggle 458 891 15 0;
#P window setfont "Fixedwidth Serif" 10.;
#P message 458 909 73 1441802 floating $1;
#P newex 810 894 212 1441802 sel 0 1;
#P message 810 915 98 1441802 ; max showmenubar;
#P message 911 915 98 1441802 ; max hidemenubar;
#P message 611 927 83 1441802 fullscreen $1;
#P toggle 700 927 15 0;
#P window setfont Times 10.;
#P comment 762 907 44 1310730 space bar;
#P window setfont "Fixedwidth Serif" 10.;
#P newex 705 874 62 1441802 select 32;
#P newex 706 847 40 1441802 key;
#P newex 294 935 219 1441802 jit.window Display1 100 100 580 460;
#P window setfont Times 10.;
#P comment 563 883 78 1310730 Interpolate to smooth pixelation;
#P toggle 548 891 15 0;
#P window setfont "Fixedwidth Serif" 10.;
#P message 548 909 62 1441802 interp $1;
#P user panel 457 878 567 77;
#X brgb 127 127 255;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user panel 286 928 171 28;
#X brgb 127 127 255;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P user jit.pwindow 606 584 322 242 0 1 0 0 1 0;
#P flonum 1133 379 35 10 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 1133 404 83 1441802 brightness $1;
#P newex 627 480 68 1441802 jit.brcosa;
#B color 5;
#P window setfont "Sans Serif" 9.;
#P message 1009 392 85 196617 set 0 , 1 5000 50;
#P newex 1078 242 114 196617 jit.dimmap @invert 1 0;
#P message 263 134 50 196617 stop;
#P button 88 280 15 0;
#P button 53 280 15 0;
#P window setfont "Sans Serif" 12.;
#P message 271 220 33 196620 read;
#P message 760 502 54 196620 xfade $1;
#P flonum 912 335 35 12 0.3 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user jit.pwindow 1147 573 322 242 0 1 0 0 1 0;
#P newex 552 516 49 196620 jit.xfade;
#P message 228 33 29 196620 $1;
#P message 265 34 15 196620 1;
#P hidden message 288 33 15 196620 0;
#P hidden message 1022 76 88 196620 matrixcount $1;
#P toggle 152 6 15 0;
#P window setfont "Sans Serif" 20.;
#P number 1051 27 63 20 75 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 12.;
#P newex 684 174 35 196620 sel 0;
#P newex 598 185 49 196620 sel 0;
#P button 654 92 15 0;
#P newex 590 267 74 196620 prepend set;
#P message 595 311 66 196620 index 47;
#P newex 744 269 74 196620 prepend set;
#P message 683 309 106 196620 outputmatrix 0;
#N counter 0 100;
#X flags 0 0;
#P newobj 704 123 108 196620 counter 0 100;
#N counter 0 100;
#X flags 0 0;
#P newobj 595 148 83 196620 counter 0 100;
#P newex 594 222 86 196620 prepend index;
#P newex 681 220 124 196620 prepend outputmatrix;
#P user gswitch2 651 113 39 32 0 0;
#P newex 562 371 179 196620 jit.matrixset 200 4 char 320 240;
#P newex 444 194 35 196620 sel 0;
#P newex 345 189 49 196620 sel 0;
#P message 34 130 36 196620 open;
#P user gswitch 15 337 41 32 0 0;
#P newex 91 146 58 196620 jit.qt.grab;
#P user gswitch 119 511 41 32 1 0;
#P user jit.pwindow 196 579 322 242 0 1 0 0 1 0;
#P newex 225 1 60 196620 loadbang;
#P button 422 89 15 0;
#P newex 349 266 74 196620 prepend set;
#P message 346 307 66 196620 index 75;
#P newex 454 267 74 196620 prepend set;
#P message 440 308 106 196620 outputmatrix 52;
#N counter 1 0 100;
#X flags 0 0;
#P newobj 433 149 93 196620 counter 1 0 100;
#N counter 0 100;
#X flags 0 0;
#P newobj 344 149 83 196620 counter 0 100;
#P newex 345 228 86 196620 prepend index;
#P newex 442 229 124 196620 prepend outputmatrix;
#P user gswitch2 396 112 39 32 1 0;
#P user jit.pwindow 127 322 82 62 0 1 0 0 1 0;
#P newex 343 338 179 196620 jit.matrixset 200 4 char 320 240;
#P newex 178 125 66 196620 jit.qt.movie;
#P newex 152 40 64 196620 qmetro 40;
#P user jit.fpsgui 62 681 60 9109516 0;
#P window setfont "Sans Serif" 20.;
#P comment 782 39 237 196628 buffer time (in frames);
#P user panel 330 84 232 247;
#X brgb 202 212 135;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P background;
#P user panel 579 85 232 247;
#X brgb 207 174 174;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P background;
#P fasten 21 0 22 1 96 215 35 215;
#P fasten 18 0 23 0 230 31 39 31;
#P fasten 19 0 3 0 202 735 396 735 396 673 67 673;
#P fasten 4 0 21 0 157 122 96 122;
#P fasten 23 0 21 0 39 154 72 154 72 122 96 122;
#P fasten 38 0 20 0 689 220 815 220 815 337 124 337;
#P fasten 25 0 20 0 449 219 559 219 559 320 124 320;
#P hidden connect 42 0 20 0;
#P fasten 22 0 7 0 20 392 133 392;
#P hidden connect 43 0 40 0;
#P hidden fasten 18 0 4 0 230 31 157 31;
#P connect 40 0 4 0;
#P connect 4 0 5 0;
#P connect 49 0 5 0;
#P connect 52 0 5 0;
#P connect 6 0 19 0;
#P hidden connect 18 0 44 0;
#P hidden connect 18 0 43 0;
#P hidden connect 18 0 42 0;
#P fasten 73 0 64 0 463 929 299 929;
#P fasten 69 0 64 0 616 946 495 946 495 929 299 929;
#P fasten 61 0 64 0 553 929 299 929;
#P connect 28 0 6 0;
#P hidden fasten 41 0 6 0 1027 78 348 78;
#P connect 21 0 6 0;
#P fasten 9 0 6 0 447 305 348 305;
#P connect 10 0 6 0;
#P fasten 8 0 11 0 401 160 349 160;
#P connect 11 0 24 0;
#P connect 11 0 10 0;
#P connect 16 0 15 0;
#P connect 10 0 16 0;
#P hidden fasten 39 0 24 1 1056 71 389 71;
#P hidden connect 43 0 8 0;
#P connect 17 0 8 0;
#P hidden fasten 39 0 11 4 1056 71 421 71;
#P fasten 24 0 17 0 350 223 336 223 336 93 427 93;
#P fasten 25 0 17 0 449 219 541 219 541 93 427 93;
#P fasten 4 0 8 1 157 117 327 117 327 63 430 63;
#P fasten 8 1 12 0 430 160 438 160;
#P connect 14 0 13 0;
#P connect 12 0 9 0;
#P connect 12 0 25 0;
#P connect 9 0 14 0;
#P connect 74 0 73 0;
#P hidden fasten 39 0 12 4 1056 70 518 70;
#P connect 62 0 61 0;
#P connect 6 0 45 0;
#P connect 48 0 45 0;
#P hidden fasten 28 0 26 0 686 304 567 304;
#P connect 29 0 26 0;
#P hidden fasten 41 0 26 0 1027 71 567 71;
#P connect 21 0 26 0;
#P connect 29 0 35 0;
#P connect 55 0 45 1;
#P connect 30 0 29 0;
#P fasten 27 0 30 0 656 159 600 159;
#P connect 35 0 34 0;
#P connect 30 0 37 0;
#P connect 45 0 58 0;
#P fasten 68 0 69 0 705 945 696 945 696 923 616 923;
#P connect 77 0 55 0;
#P fasten 56 0 55 0 1138 431 632 431;
#P hidden fasten 39 0 37 1 1056 72 642 72;
#P connect 36 0 27 0;
#P connect 43 0 36 0;
#P fasten 37 0 36 0 603 222 587 222 587 92 659 92;
#P fasten 38 0 36 0 689 220 792 220 792 92 659 92;
#P hidden fasten 39 0 30 4 1056 72 672 72;
#P fasten 4 0 27 1 157 117 327 117 327 31 685 31;
#P connect 31 0 28 0;
#P connect 33 0 32 0;
#P connect 31 0 38 0;
#P connect 66 0 68 0;
#P fasten 27 1 31 0 685 159 709 159;
#P connect 65 0 66 0;
#P connect 28 0 33 0;
#P connect 47 0 48 0;
#P hidden fasten 39 0 31 4 1056 72 805 72;
#P fasten 68 0 72 0 705 945 806 945 806 891 815 891;
#P connect 72 0 71 0;
#P connect 26 0 77 0;
#P connect 72 1 70 0;
#P hidden connect 39 0 41 0;
#P hidden connect 44 0 39 0;
#P connect 57 0 56 0;
#P connect 55 0 46 0;
#P pop;


Viewing 7 posts - 1 through 7 (of 7 total)