memory leak in max/jitter ?

Sep 20, 2006 at 12:02pm

memory leak in max/jitter ?

Hi All,

i wrote a simple webcam app to shoot a long duration (one year)
time-lapse movie;
i use an imagingsource 1024×768 firewire camera
(http://www.1394imaging.com/en/products/cameras/firewire_color/dfk31af03/overview/
) which works perfectly well in jitter through iidc commands;

The patch uses just some basic objects (jit.qt.grab, jit.qt.record,
jit.lcd,…) and some simple patched logics to capture one image
every 30 sec during daylight, save one quicktime movie every day of
all grabbed frames in uncompressed format, and execute during the
night some unix scripts (through shell object) to prepare and ftp all
files to some server…

but the application systematically crashes after 5 or 6 days…
indeed process virtual memory size is expanding dramatically with
time… from 700Mb at the beginning, it doubles 24 hours later…

ah yes, and i also use ‘mxj now’ to get date and time every second
and to control start and end time of grabbing according to some
calendar data.

so?

on a macmini g4 OSX 10.4.7, max 4.5.7 runtime, jitter 1.5.2


Yves Bernard yb@imal.org
asbl iMAL vzw
rue d’Alost straat 7
1000 Bruxelles/Brussel
tel 32 2 213 37 10

http://www.imal.org

http://www.i-cult.be

#27704
Sep 20, 2006 at 1:40pm

BUG REPORTING GUIDELINES

Please report any problems you experience with clear and complete
information, including steps to reproduce, software and system
information, and where possible, an isolated example patch and crash
log. Something like the following would be ideal. This makes it
easier for us to find and fix the problems you experience. Without
such clear and complete information, it is less likely we will be
able to.

Summary:
Provide a descriptive summary of the issue.

Steps to Reproduce:
In numbered format, detail the exact steps taken to produce the bug.

Expected Results:
Describe what you expected to happen when you executed the steps above.

Actual Results:
Please explain what actually occurred when steps above are executed.

Regression:
Describe circumstances where the problem occurs or does not occur,
such as software versions and/or hardware configurations.

Notes:
Provide additional information, such as references to related
problems, workarounds and relevant attachments.

Am 20.09.2006 um 14:02 schrieb Yves Bernard:

> so?

#84080
Sep 20, 2006 at 2:53pm

Hi Jeremy,

i think my previous mail described most of the points you require but
an isolated example patch with crash log;
i will try to do an isolated example patch (currently i am flying
away for a week), but in the meanwhile, maybe there are some known
bugs or well known things which provoke memory leaks? Maybe some
memory issues have been solved in 4.6 ?

here i reformulate my mail data according to your reporting guidelines:

>
>software and system information
on a macmini g4, 512Mb, OSX 10.4.7, max 4.5.7 runtime, jitter 1.5.2

>Summary:
the application systematically crashes after 5 or 6 days…
indeed process virtual memory size is expanding dramatically with
time… from 700Mb at the beginning, it doubles 24 hours later…
The patch uses just some basic objects (jit.qt.grab, jit.qt.record,
jit.lcd,…) and some simple patched logics to capture from a
firewire camera one image every 30 sec during daylight, save one
quicktime movie every day of all grabbed frames in uncompressed
format, and execute during the night some unix scripts (through shell
object) to compress and ftp all files to some server…
The patch uses ‘mxj now’ to get date and time every second and to
control start and end time of grabbing according to some calendar
data.

>Steps to Reproduce:
it is a non interactive application; it just grabs frames, adds them
to a daily jit.qt.recorded file, saves the file at end of the day,
starts again next morning; you just launch the application, let it
run and it will crash after some days…

>Expected Results:
NA

best


Yves Bernard yb@imal.org
asbl iMAL vzw
rue d’Alost straat 7
1000 Bruxelles/Brussel
tel 32 2 213 37 10

http://www.imal.org

http://www.i-cult.be

#84081
Sep 20, 2006 at 3:26pm

hi yves,

no solution here, but your description reminded me the notorious ram-
eating-sfplay discussion which last peaked in june. after blaming
max, it turned out, that there were some bad things going on with the
os file-caching.
i was bitten by that on exactly a mac mini with your ram size and
configuration, whereas my powerbook with more ram didnt show the
problem.

at that time my only solution was to watch the vram-size via shell-
object and, whenever it got below a certain value, script an
appropriately large buffer and immediately destroy it. that was the
only way to free the vram again (besides restarting the whole machine).

maybe there is more than just a coincidence in that?
hans

hans w. koch
im krahnenhof 11
d-50668 koeln
+49-221-554902
http://www.hans-w-koch.net

Am 20.09.2006 um 16:53 schrieb Yves Bernard:

> Hi Jeremy,
>
> i think my previous mail described most of the points you require
> but an isolated example patch with crash log;
> i will try to do an isolated example patch (currently i am flying
> away for a week), but in the meanwhile, maybe there are some known
> bugs or well known things which provoke memory leaks? Maybe some
> memory issues have been solved in 4.6 ?
>
> here i reformulate my mail data according to your reporting
> guidelines:
>
>>
>> software and system information
> on a macmini g4, 512Mb, OSX 10.4.7, max 4.5.7 runtime, jitter 1.5.2
>
>
>> Summary:
> the application systematically crashes after 5 or 6 days…
> indeed process virtual memory size is expanding dramatically with
> time… from 700Mb at the beginning, it doubles 24 hours later…
> The patch uses just some basic objects (jit.qt.grab, jit.qt.record,
> jit.lcd,…) and some simple patched logics to capture from a
> firewire camera one image every 30 sec during daylight, save one
> quicktime movie every day of all grabbed frames in uncompressed
> format, and execute during the night some unix scripts (through
> shell object) to compress and ftp all files to some server…
> The patch uses ‘mxj now’ to get date and time every second and to
> control start and end time of grabbing according to some calendar
> data.
>
>> Steps to Reproduce:
> it is a non interactive application; it just grabs frames, adds
> them to a daily jit.qt.recorded file, saves the file at end of the
> day, starts again next morning; you just launch the application,
> let it run and it will crash after some days…
>
>> Expected Results:
> NA
>
>
>
> best
>
>
>
>
> —
> Yves Bernard yb@imal.org
> asbl iMAL vzw
> rue d’Alost straat 7
> 1000 Bruxelles/Brussel
> tel 32 2 213 37 10
>
> http://www.imal.org
> http://www.i-cult.be

#84082
Sep 20, 2006 at 3:52pm

Am 20.09.2006 um 16:53 schrieb Yves Bernard:

> Hi Jeremy,
>
> i think my previous mail described most of the points you require
> but an isolated example patch with crash log;

Sorry, but this has come up countless times before. Without the
patch, your description of “some basic objects” and “simple patched
logic” could mean anything. If the question is, “are there any known,
significant memory leaks in Jitter?” then the answer is “not that
we’re aware of”. But there’s no chance that this is going to be
looked at without a patch that can show it happening (without any 3rd
party objects, please).

You might also try out the 1.5.3 public beta to see if something got
inadvertently changed/fixed along the way.

> The patch uses just some basic objects (jit.qt.grab, jit.qt.record,
> jit.lcd,…) and some simple patched logics to capture from a
> firewire camera one image every 30 sec during daylight, save one
> quicktime movie every day of all grabbed frames in uncompressed
> format, and execute during the night some unix scripts (through
> shell object) to compress and ftp all files to some server…

#84083
Sep 20, 2006 at 4:58pm

On Sep 20, 2006, at 7:53 AM, Yves Bernard wrote:

> maybe there are some known bugs or well known things which provoke
> memory leaks? Maybe some memory issues have been solved in 4.6 ?

The Apple File Manager caching sfplay~/sfrecord~ issue which Hans
mentioned has been fixed in 4.6. However, if Quicktime itself uses
standard file calls internally, rather than the calls which
explicitly disable Apple File Manager caching, then this general
problem with Apple’s File Manager caching algorithm may demonstrate
similar behavior. If this is the case (for which I have no evidence
to assume it is), as far as I know, there’s nothing we can do. It
appears to be an Apple issue. I’ve mentioned this curious behavior
(which is only exhibited on certain machines for certain people,
according to some mysterious sequence of events) to some people at
Apple, and perhaps it will be addressed in a future release.

As Jeremy mentioned, without an example patch to demonstrate clearly
what you are doing, however, there’s really not much else we can do
to help you. From our standpoint, as developers interested in
providing assistance and fixing bugs where possible, reports without
clear examples are extremely frustrating (and typically viewed as an
impolite drain on the mailing list…more info on this in the oft
cited “How To Ask Questions the Smart Way”).

> the application systematically crashes after 5 or 6 days…
> indeed process virtual memory size is expanding dramatically with
> time… from 700Mb at the beginning, it doubles 24 hours later…
> The patch uses just some basic objects (jit.qt.grab, jit.qt.record,
> jit.lcd,…) and some simple patched logics to capture from a
> firewire camera one image every 30 sec during daylight, save one
> quicktime movie every day of all grabbed frames in uncompressed
> format, and execute during the night some unix scripts (through
> shell object) to compress and ftp all files to some server…
> The patch uses ‘mxj now’ to get date and time every second and to
> control start and end time of grabbing according to some calendar
> data.

If you are generating new symbols based on the time/date, and/or
generating symbols with the shell object, you might be growing the
symbol table without end. Keep in mind that symbols have infinite
lifetime in Max, and there’s no way to flush the symbol table. So if
this is your issue, you’ll need to figure out a way to either change
the way your patch is implemented to be more memory efficient, or
automatically restart your patch.

-Joshua

#84084
Sep 20, 2006 at 10:20pm

here is a stripped version wich just shows the constant memory
increase of the max runtime process (Vsize as shown by unix ‘top’ or
Activity Monitor);
after 155 grabed frames (about 75 minutes), the process size has
increased from 618Mb to 700Mb…

a lowres jpeg preview of each grabbed frame is uploaded by ftp to
some server; this is done through a shell script (uploadJpg.sh); its
code is given as a comment in a subpatch; save the text of this
comment in a unix -x file;

you have to edit some message boxes to set up your ftp account,
various path and file names;
then you have to edit the coll in ‘myDate’ subpatch to modify the
grabing periods of the weekdays;
and of course, make a runtime including all required externals
(jitter, java for mxj);

the only external is Bill Orcut’s shell object.

best,

max v2;
#N vpatcher 3 57 1009 738;
#P origin 39 -6;
#P window setfont “Sans Serif” 9.;
#N vpatcher 94 349 263 568;
#P window setfont “Sans Serif” 9.;
#P user com 24 34 100 196617 90;
#K set 0 30067 25888 29800 25888 26482 25957 28192 24942 25632 29285
25632 25193 26400 25185 28263 8290 30068 29807 28275 8289 29728 29800
25888 27749 26228 8307 26980 25888 28518 8301 24937 28192 28769 29795
26656 29807 8306 25971 28773 25460 26998 25964 31008 29556 24946
29728 26482 24930 26990 26400 24942 25632 29556 28528 8295 29281
25193 28263 15117 3431 29281 25120 30569 27756 8289 27763 28448 29556
28528 8289 30068 28525 24948 26979 24940 27769 8289 25443 28530 25705
28263 8308 28448 25441 27749 28260 24946 8292 24948 24832;
#K end;
#P pop;
#P newobj 107 376 70 196617 p ManualGrab;
#P hidden newex 726 370 95 196617 r JpgPrevFilename;
#P newex 919 137 95 196617 s JpgPrevFilename;
#P newex 920 116 62 196617 prepend set;
#P message 920 96 118 196617 /Users/yves/webcam2;
#P window setfont “Arial Black” 12.;
#P comment 718 156 95 791478284 read this…;
#B frgb 246 8 2;
#P window setfont “Sans Serif” 9.;
#N vpatcher 10 59 610 459;
#P window setfont “Sans Serif” 9.;
#P user com 92 91 372 196617 169;
#K set 0 8993 12130 26990 12130 24947 26637 8992 30064 27759 24932
19056 26414 29544 3398 26988 25966 24941 25905 15712 25185 29541
28257 28005 8228 12640 3436 28515 24940 17513 29233 15712 25705 29294
24941 25888 9265 24589 21875 25970 17981 9266 3408 24947 29510 15652
13069 21349 29302 25970 15650 30583 30510 28025 29541 29302 25970
11875 28525 8717 20577 29555 30575 29284 15652 20577 29555 17933 3430
29808 8237 28192 9299 25970 30309 29216 15420 17774 25645 20326 11603
25971 29545 28526 3363 8237 28192 28528 29801 28526 8292 26995 24930
27749 29472 24949 29807 11628 28519 28526 3341;
#K set 100 30067 25970 8226 9301 29541 29254 8736 8740 20577 29555
30575 29284 8717 25193 28257 29305 3436 25444 8226 9324 28515 24940
17513 29233 8717 28789 29728 8740 18025 27749 28257 28005 12578 8308
28016 24439 25187 11882 28775 3442 25966 24941 25888 29805 28767
30562 25390 27248 26400 8740 18025 27749 28257 28005 12578 3426 31077
3397 28260 11599 26157 21349 29555 26991 28173 3429 30825 29728 12301;
#K end;
#P window setfont “Sans Serif” 10.;
#P user com 91 43 381 196618 75;
#K set 0 29537 30309 8308 26729 29472 8297 28192 24864 26217 27749
8302 24941 25956 8231 30064 27759 24932 19056 26414 29544 10016 26990
8313 28533 29216 26735 28005 12130 26990 8292 26994 25955 29807 29305
8289 29472 24864 30062 27000 8293 30821 25461 29793 25196 25888 29544
25964 27680 29539 29289 28788 8294 26988 25914 3368 28015 25705 26233
8297 29728 30569 29800 8313 28533 29216 26228 28704 29541 29302 25970
8302 24941 25902 11822 10496;
#K end;
#B frgb 255 47 43;
#P pop;
#P newobj 640 157 75 196617 p uploadJpg.sh;
#P window setfont “Arial Black” 12.;
#P window linecount 3;
#P comment 4 127 89 791478284 open myDate subpatch…;
#B frgb 246 8 2;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 81 614 215 196617 /Users/yves/Grabs/hqt20060920;
#P window setfont “Arial Black” 12.;
#P comment 803 72 72 791478284 edit this…;
#B frgb 246 8 2;
#P window setfont “Sans Serif” 9.;
#P message 804 96 108 196617 /Users/yves/Grabs/;
#P window setfont “Arial Black” 12.;
#P comment 532 70 89 791478284 edit these…;
#B frgb 246 8 2;
#P comment 658 73 72 791478284 edit this…;
#B frgb 246 8 2;
#P comment 923 74 72 791478284 edit this…;
#B frgb 246 8 2;
#P window setfont “Sans Serif” 9.;
#P newex 804 117 93 196617 value localGrabDir;
#P message 642 94 152 196617 /Users/yves/bin/uploadJpg.sh;
#P newex 642 114 70 196617 s ftpUnixCmd;
#P comment 347 38 100 196617 2. start it!;
#P button 473 70 15 0;
#P message 549 94 53 196617 password;
#P message 473 94 30 196617 user;
#P newex 549 114 43 196617 s passF;
#P newex 473 113 43 196617 s userF;
#P window linecount 3;
#P user com 919 157 116 196617 24;
#K set 0 27759 30578 25971 8311 25954 8304 29285 30313 25975 8294
26988 25966 24941 25888 10359 26996 26735 30068 8293 30836 25966
29545 28526 10509;
#K end;
#P window linecount 1;
#P message 71 259 120 196617 20/09/2006-23:46:55;
#N vpatcher 10 59 610 459;
#P inlet 248 40 15 0;
#P window setfont “Sans Serif” 9.;
#P message 309 86 118 196617 20/09/2006-23:46:55;
#P newex 309 64 62 196617 prepend set;
#P newex 309 44 59 196617 r dateTime;
#P newex 309 104 109 196617 print endGrab_endDay;
#P connect 1 0 2 0;
#P connect 4 0 3 0;
#P connect 2 0 3 0;
#P connect 3 0 0 0;
#P pop;
#P hidden newobj 124 350 43 196617 p prEnd;
#P newex 1 361 30 196617 t b b;
#P button 1 326 26 6;
#P hidden message 89 351 33 196617 close;
#N vpatcher 314 248 914 648;
#P button 94 49 15 0;
#P window setfont “Sans Serif” 9.;
#P message 315 112 118 196617 20/09/2006-23:46:55;
#P newex 315 90 62 196617 prepend set;
#P window linecount 1;
#P newex 315 70 59 196617 r dateTime;
#P newex 152 238 61 196617 delay 1000;
#P newex 111 218 61 196617 delay 2000;
#P newex 83 199 61 196617 delay 3000;
#P window linecount 0;
#P newex 315 130 117 196617 print initGrab_startDay;
#P newex 13 158 61 196617 delay 5000;
#P window linecount 1;
#P newex 54 178 61 196617 delay 4000;
#P message 227 162 30 196617 open;
#P window linecount 0;
#P newex 94 103 79 196617 t b b b b b b;
#P newex 103 272 38 196617 s grab;
#P inlet 94 30 15 0;
#P user com 229 194 183 196617 33;
#K set 0 25711 8307 30051 25445 29555 26998 25888 26482 24930 29472
24934 29797 29216 28528 25966 26990 26400 27241 29742 29044 11879
29281 25120 26223 29216 25441 28005 29281 8308 28448 29541 29728
30064;
#K end;
#P connect 3 0 6 0;
#P connect 3 1 5 0;
#P connect 3 2 8 0;
#P connect 1 0 14 0;
#P connect 14 0 3 0;
#P connect 6 0 2 0;
#P connect 5 0 2 0;
#P connect 8 0 2 0;
#P connect 9 0 2 0;
#P connect 10 0 2 0;
#P connect 4 0 2 0;
#P connect 3 3 9 0;
#P connect 3 4 10 0;
#P connect 3 5 4 0;
#P connect 11 0 12 0;
#P connect 12 0 13 0;
#P connect 14 0 13 0;
#P connect 13 0 7 0;
#P pop;
#P newobj 21 380 54 196617 p initGrab;
#P button 347 56 26 4;
#P hidden newex 751 672 61 196617 delay 1000;
#P hidden button 751 654 15 0;
#P hidden message 139 418 33 196617 set 0;
#P hidden message 248 103 21 196617 inc;
#P user incdec 269 81 15 15 0 0;
#P number 214 81 55 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden newex 751 692 56 196617 s endDay2;
#P button 198 81 15 0;
#P hidden newex 83 325 77 196617 s videoClockOn;
#P hidden message 72 326 14 196617 0;
#P hidden newex 60 418 77 196617 s videoClockOn;
#P hidden message 45 418 14 196617 1;
#P button 365 143 15 0;
#P hidden newex 732 411 71 196617 r webcamFTP;
#P hidden newex 159 28 77 196617 r videoClockOn;
#P hidden newex 62 29 67 196617 r calendarOn;
#N vpatcher 229 218 1008 694;
#P window setfont “Sans Serif” 9.;
#P window linecount 0;
#P newex 495 310 27 196617 + 1;
#P newex 294 149 77 196617 s readCalendar;
#P newex 136 78 61 196617 delay 2000;
#P button 508 177 15 0;
#P window linecount 1;
#P newex 217 288 71 196617 s webcamFTP;
#P message 157 247 14 196617 1;
#P window linecount 0;
#P message 178 208 14 196617 1;
#P window linecount 1;
#P newex 178 228 67 196617 s calendarOn;
#P window linecount 0;
#P newex 241 189 38 196617 s grab;
#P message 241 159 30 196617 open;
#P window linecount 1;
#P newex 136 285 65 196617 s startClock;
#P newex 588 411 44 196617 s qtDay;
#P newex 672 365 19 196617 c2;
#P newex 638 365 19 196617 c2;
#P newex 588 389 95 196617 sprintf qt%d%s%s;
#P user ubumenu 533 344 66 196617 0 0 1 0;
#X setrgb 31 31 31 187 187 187 234 234 234 255 255 255 141 141 141 112 112 112;
#X add first;
#X add January;
#X add February;
#X add March;
#X add April;
#X add May;
#X add June;
#X add July;
#X add August;
#X add September;
#X add October;
#X add November;
#X add December;
#X prefix_set 0 0 0;
#P comment 570 311 30 196617 year;
#P comment 552 328 24 196617 day;
#P comment 600 344 35 196617 month;
#P number 533 310 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 515 327 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 497 345 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 479 284 237 196617 mxj now;
#P window linecount 0;
#P newex 136 118 140 196617 t b b b b b b b;
#P button 136 99 15 0;
#P inlet 136 30 15 0;
#P comment 289 291 100 196617 enable all ftp upload;
#P comment 377 150 100 196617 disabled here…;
#P window linecount 1;
#P newex 518 226 46 196617 r tClock;
#P connect 3 0 26 0;
#P connect 26 0 4 0;
#P connect 4 0 5 0;
#P connect 5 0 18 0;
#P connect 5 1 23 0;
#P connect 5 2 22 0;
#P connect 22 0 21 0;
#P connect 23 0 24 0;
#P connect 3 0 19 0;
#P fasten 5 2 20 0 183 183 246 183;
#P fasten 5 3 20 0 204 178 246 178;
#P connect 19 0 20 0;
#P fasten 5 5 27 0 246 142 299 142;
#P fasten 5 4 6 0 225 209 484 209;
#P fasten 5 6 6 0 267 209 484 209;
#P connect 25 0 6 0;
#P connect 0 0 6 0;
#P connect 6 1 28 0;
#P connect 28 0 7 0;
#P connect 6 2 8 0;
#P connect 6 3 9 0;
#P hidden connect 7 0 13 0;
#P connect 9 0 14 0;
#P connect 14 0 17 0;
#P connect 15 0 14 1;
#P connect 7 0 15 0;
#P connect 8 0 16 0;
#P connect 16 0 14 2;
#P pop;
#P newobj 347 84 52 196617 p startUp;
#P newex 1 399 61 196617 delay 6000;
#P number 1 284 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden newex 97 284 60 196617 loadmess 0;
#P button 55 259 15 0;
#P hidden newex 42 236 44 196617 r qtDay;
#P comment 89 595 116 196617 highres movie of the day;
#P hidden newex 29 542 56 196617 r endDay2;
#P hidden message 42 563 29 196617 stop;
#N vpatcher 173 156 829 655;
#P origin 0 -30;
#P button 368 37 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 368 54 93 196617 value localGrabDir;
#P newex 369 95 52 196617 pak 0 file;
#P message 369 114 39 196617 set $2;
#P newex 368 73 77 196617 sprintf %sh%s;
#P newex 420 25 44 196617 r qtDay;
#P newex 294 108 58 196617 r startDay;
#P message 294 132 223 196617 /Users/yves/Grabs/hqt20060920;
#P window linecount 0;
#P newex 294 339 32 196617 print;
#P newex 294 152 80 196617 sprintf %s.mov;
#P message 294 299 126 196617 write $2 25 png max 600;
#P newex 294 279 57 196617 pack 0 file;
#P newex 119 366 114 196617 jit.qt.record 1024 768;
#P outlet 369 409 15 0;
#P inlet 119 71 15 0;
#P user com 426 298 100 196617 23;
#K set 0 28782 26400 26995 8308 26725 8301 28531 29728 25455 28016
24931 29728 28518 8289 27756 8300 28531 29548 25971 29472 26223 29293
24948;
#K end;
#P fasten 5 0 3 0 299 327 124 327;
#P connect 1 0 3 0;
#P connect 12 0 8 0;
#P connect 9 0 8 0;
#P connect 8 0 6 0;
#P connect 6 0 4 0;
#P connect 4 0 5 0;
#P connect 5 0 7 0;
#P fasten 6 0 4 1 299 224 346 224;
#P connect 10 0 15 0;
#P connect 15 0 14 0;
#P connect 14 0 11 0;
#P connect 13 0 12 0;
#P connect 12 0 2 0;
#P connect 11 0 13 1;
#P connect 10 0 11 1;
#P pop;
#P newobj 81 576 79 196617 p recordHRMov;
#P button 34 326 26 14;
#P newex 1 418 40 196617 t b b b;
#P hidden newex 751 633 80 196617 sprintf %s.mov;
#P comment 814 597 116 196617 lowres movie of the day;
#P message 751 615 210 196617 /Users/yves/Grabs/qt20060920;
#P hidden newex 751 517 50 196617 r endDay;
#P newex 34 354 50 196617 s endDay;
#B color 14;
#P newex 1 441 58 196617 s startDay;
#B color 6;
#P newex 1 306 44 196617 togEdge;
#P hidden message 772 536 29 196617 stop;
#N vpatcher 282 135 945 650;
#P origin 0 -9;
#P button 407 48 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 407 65 93 196617 value localGrabDir;
#P newex 408 106 52 196617 pak 0 file;
#P message 408 125 39 196617 set $2;
#P newex 407 84 72 196617 sprintf %s%s;
#P newex 459 36 44 196617 r qtDay;
#P newex 277 410 32 196617 print;
#P newex 277 147 58 196617 r startDay;
#P message 277 171 173 196617 /Users/yves/Grabs/qt20060920;
#P window linecount 0;
#P newex 277 190 80 196617 sprintf %s.mov;
#P message 277 350 152 196617 write $2 25 mpeg4 normal 600;
#P newex 277 330 57 196617 pack 0 file;
#P newex 119 417 108 196617 jit.qt.record 512 384;
#P outlet 352 454 15 0;
#P inlet 119 50 15 0;
#P fasten 4 0 2 0 282 404 124 404;
#P connect 0 0 2 0;
#P connect 11 0 6 0;
#P connect 7 0 6 0;
#P connect 6 0 5 0;
#P connect 5 0 3 0;
#P connect 3 0 4 0;
#P connect 4 0 8 0;
#P connect 5 0 3 1;
#P connect 11 0 1 0;
#P connect 9 0 14 0;
#P connect 14 0 13 0;
#P connect 13 0 10 0;
#P connect 12 0 11 0;
#P connect 10 0 12 1;
#P connect 9 0 10 1;
#P pop;
#P newobj 805 577 78 196617 p recordLRMov;
#P message 754 432 143 196617 /Users/yves/webcam2;
#P toggle 737 432 15 0;
#P hidden newex 734 452 29 196617 gate;
#N vpatcher 465 211 1088 619;
#P window setfont “Sans Serif” 9.;
#P newex 227 329 48 196617 print ftp;
#P newex 178 88 75 196617 sprintf %s.jpg;
#P newex 314 184 62 196617 prepend set;
#P window linecount 1;
#P newex 313 164 70 196617 r ftpUnixCmd;
#P window linecount 0;
#P newex 137 208 190 196617 prepend /Users/yves/bin/uploadJpg.sh;
#P toggle 56 251 15 0;
#P newex 56 229 71 196617 r ftpDryMode;
#P newex 38 211 60 196617 loadmess 1;
#P newex 56 270 29 196617 gate;
#P newex 244 138 43 196617 r passF;
#P newex 196 138 43 196617 r userF;
#P newex 136 292 31 196617 shell;
#P newex 137 183 128 196617 pack file1 user pass 2>&1;
#P inlet 213 40 15 0;
#P comment 237 39 100 196617 webcam.jpg low res preview;
#P comment 242 109 100 196617 ftp through unix ftp;
#P connect 8 0 10 0;
#P connect 9 0 10 0;
#P connect 10 0 7 0;
#P fasten 11 0 7 1 142 261 80 261;
#P fasten 7 0 4 0 61 289 141 289;
#P connect 14 0 3 0;
#P connect 3 0 11 0;
#P connect 13 0 11 0;
#P connect 5 0 3 1;
#P connect 2 0 14 0;
#P connect 6 0 3 2;
#P connect 4 0 15 0;
#P connect 11 0 15 0;
#P connect 12 0 13 0;
#P pop;
#P hidden newobj 734 474 49 196617 p myFTP;
#P comment 721 432 26 196617 ftp;
#N vpatcher 125 76 1044 723;
#P window setfont “Sans Serif” 9.;
#P newex 319 98 62 196617 append jpeg;
#P newex 319 77 104 196617 prepend exportimage;
#P window linecount 1;
#P newex 452 34 95 196617 r JpgPrevFilename;
#P button 80 27 15 0;
#P window linecount 0;
#P message 115 143 273 196617 moveto 220 380 , write Time-lapse
movie by yb@imal.org;
#P window linecount 1;
#P message 319 58 141 196617 /Users/yves/webcam2;
#P outlet 25 479 15 0;
#P inlet 319 35 15 0;
#P newex 36 363 99 196617 jit.matrix @adapt 1;
#P newex 36 53 215 196617 jit.matrix wcMtrx 4 char 512 384 @interp 1;
#P button 13 255 15 0;
#P inlet 36 30 15 0;
#P window linecount 0;
#P message 88 186 214 196617 font geneva 12 , textface normal , textmode 2;
#P user jit.pwindow 349 244 514 386 0 1 0 0 1 0;
#P message 101 167 262 196617 frgb 200 200 200 , brgb 0 0 0 , clear
, drawpict wcMtrx;
#P newex 155 216 59 196617 r dateTime;
#P newex 63 236 102 196617 pack write dateTime;
#P message 75 211 73 196617 moveto 3 380;
#P newex 36 74 79 196617 t b b b b b b;
#P newex 36 329 111 196617 jit.lcd 4 char 512 384;
#P fasten 0 0 13 0 41 350 30 350;
#P connect 16 0 10 0;
#P connect 8 0 10 0;
#P connect 10 0 1 0;
#P connect 15 0 0 0;
#P connect 3 0 0 0;
#P connect 2 0 0 0;
#P connect 1 0 0 0;
#P connect 9 0 0 0;
#P connect 5 0 0 0;
#P connect 7 0 0 0;
#P connect 0 0 11 0;
#P fasten 19 0 11 0 324 356 41 356;
#P fasten 1 2 3 0 67 95 68 95;
#P connect 1 3 2 0;
#P connect 1 4 7 0;
#P connect 1 5 5 0;
#P connect 1 1 15 0;
#P connect 4 0 3 1;
#P connect 12 0 14 0;
#P connect 17 0 14 0;
#P connect 14 0 18 0;
#P connect 18 0 19 0;
#P connect 11 0 6 0;
#P pop;
#P newobj 805 391 86 196617 p captionWebcam;
#P toggle 62 53 15 0;
#P newex 62 71 29 196617 gate;
#P newex 13 30 42 196617 r onOff;
#P newex 41 283 42 196617 s onOff;
#P toggle 179 81 15 0;
#P newex 179 98 29 196617 gate;
#P hidden newex 276 125 38 196617 r grab;
#P user jit.pwindow 199 208 514 386 0 1 0 0 1 0;
#P message 329 143 33 196617 close;
#P message 297 143 30 196617 open;
#P newex 198 125 40 196617 t b b b;
#P newex 276 167 104 196617 jit.qt.grab 1024 768;
#P toggle 198 47 15 0;
#P newex 198 63 70 196617 metro 30000;
#P hidden newex 252 40 44 196617 * 1000;
#P hidden number 252 22 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N vpatcher 188 157 1004 710;
#P origin 0 7;
#P window setfont “Arial Black” 12.;
#P window linecount 1;
#P user com 338 87 374 791478284 29;
#K set 0 25956 26996 8308 26725 8291 28524 27749 25460 26991 28192
25697 29793 8308 28448 29541 29728 31087 30066 8292 24937 27769 8295
29281 25120 28773 29289 28516 29486 11822;
#K end;
#B frgb 246 8 2;
#P window setfont “Sans Serif” 9.;
#P message 610 245 159 196617 write /Users/yves/calendar.txt;
#P outlet 551 446 15 0;
#P window linecount 0;
#P newex 550 407 62 196617 prepend set;
#P window linecount 1;
#P message 610 218 154 196617 read /Users/yves/calendar.txt;
#P newex 87 216 27 196617 + 1;
#P window linecount 0;
#P newex 610 169 77 196617 r readCalendar;
#P window linecount 1;
#P newex 380 404 59 196617 s dateTime;
#P window linecount 0;
#P newex 6 139 46 196617 s tClock;
#P message 69 52 14 196617 1;
#P newex 141 190 27 196617 + 0;
#P newex 151 171 32 196617 * 12;
#P newex 332 267 166 196617 expr ($i2 >= $i1) && ($i2 < = $i3);
#P number 200 220 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 419 224 95 196617 expr $i1*60 + $i2;
#P newex 318 224 95 196617 expr $i1*60 + $i2;
#P window linecount 0;
#P newex 199 200 95 196617 expr $i1*60 + $i2;
#P newex 340 202 76 196617 unpack 0 0 0 0;
#P window linecount 1;
#P message 350 153 50 196617 flags 1 0;
#P window setfont “Sans Serif” 14.;
#N coll ;
#T flags 1 0;
#T 1 7 0 20 30 SUN;
#T 2 7 30 20 30 MON;
#T 3 8 30 20 30 TUE;
#T 4 7 30 23 50 WED;
#T 5 8 30 20 30 THU;
#T 6 7 30 20 30 FRI;
#T 7 7 0 20 30 SAT;
#P newobj 339 176 53 196622 coll;
#B color 4;
#P inlet 16 39 15 0;
#N comlet grab ON/OFF;
#P outlet 332 451 15 0;
#P window setfont “Sans Serif” 9.;
#P newex 506 335 19 196617 c2;
#P newex 471 336 19 196617 c2;
#P newex 458 358 19 196617 c2;
#P newex 413 334 19 196617 c2;
#P window linecount 0;
#P newex 359 347 19 196617 c2;
#P window linecount 1;
#P newex 380 380 153 196617 sprintf %s/%s/%d-%s:%s:%s;
#P user ubumenu 123 331 66 196617 0 0 1 0;
#X setrgb 31 31 31 187 187 187 234 234 234 255 255 255 141 141 141 112 112 112;
#X add zero;
#X add January;
#X add February;
#X add March;
#X add April;
#X add May;
#X add June;
#X add July;
#X add August;
#X add September;
#X add October;
#X add November;
#X add December;
#X prefix_set 0 0
0;
#P hidden newex 77 367 27 196617 – 1;
#P user ubumenu 105 349 66 196617 0 0 1 0;
#X setrgb 31 31 31 187 187 187 234 234 234 255 255 255 141 141 141 112 112 112;
#X add Sunday;
#X add Monday;
#X add Tuesday;
#X add Wednesday;
#X add Thursday;
#X add Friday;
#X add Saturday;
#X prefix_set 0 0
0;
#P button 69 115 15 0;
#P comment 214 245 39 196617 second;
#P comment 196 263 39 196617 minute;
#P comment 178 280 30 196617 hour;
#P comment 160 298 30 196617 year;
#P comment 142 315 24 196617 day;
#P comment 190 331 35 196617 month;
#P toggle 69 76 15 0;
#P newex 69 94 69 196617 qmetro 1000;
#P number 176 243 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 159 262 35 9 0 0 0 3 0 0 0 255 156 156 222 222 222 0 0 0;
#P number 141 279 35 9 0 0 0 3 0 0 0 255 156 156 222 222 222 0 0 0;
#P number 123 297 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 105 314 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 87 332 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 69 349 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 69 147 237 196617 mxj now;
#P comment 172 349 63 196617 day of week;
#P window linecount 0;
#P newex 69 28 65 196617 r startClock;
#P window linecount 1;
#P comment 97 79 93 196617 Start/Stop “Clock”;
#P window linecount 0;
#P user com 409 110 174 196617 47;
#K set 0 26223 29216 25953 25448 8311 25957 27424 25697 31020 8307
28773 25449 26217 25971 8307 29793 29300 8289 28260 8293 28260 8308
26989 25888 28518 8295 29281 25120 28773 29289 28516 15117 26990 8296
28533 29216 28009 28277 29797 15117 21333 20029 12588 8275 16724
15671 3328;
#K end;
#P comment 633 189 147 196617 i’ve cut the patch here for this example;
#P connect 13 0 44 0;
#P connect 3 0 43 0;
#P connect 43 0 14 0;
#P connect 14 0 13 0;
#P connect 32 0 21 0;
#P connect 13 0 21 0;
#P connect 21 0 5 0;
#P connect 5 0 6 0;
#P hidden connect 6 0 23 0;
#P connect 5 1 47 0;
#P connect 47 0 7 0;
#P connect 5 2 8 0;
#P hidden connect 23 0 22 0;
#P connect 5 3 9 0;
#P hidden connect 7 0 24 0;
#P connect 5 4 42 0;
#P connect 42 0 10 0;
#P connect 5 8 41 0;
#P connect 41 0 42 1;
#P connect 5 5 11 0;
#P lcolor 5;
#P connect 5 6 12 0;
#P connect 42 0 36 0;
#P connect 36 0 39 0;
#P connect 5 5 36 1;
#P connect 35 0 37 0;
#P connect 37 0 40 0;
#P connect 40 0 31 0;
#P fasten 6 0 33 0 74 396 302 396 302 173 344 173;
#P hidden connect 51 0 33 0;
#P hidden connect 34 0 33 0;
#P hidden connect 48 0 33 0;
#P connect 33 0 35 0;
#P connect 7 0 26 0;
#P connect 27 0 25 0;
#P connect 25 0 45 0;
#P connect 35 1 37 1;
#P connect 26 0 25 1;
#P connect 39 0 40 1;
#P connect 8 0 27 0;
#P connect 35 2 38 0;
#P connect 9 0 25 2;
#P connect 10 0 28 0;
#P connect 28 0 25 3;
#P connect 11 0 29 0;
#P connect 38 0 40 2;
#P connect 29 0 25 4;
#P connect 35 3 38 1;
#P connect 12 0 30 0;
#P connect 30 0 25 5;
#P connect 25 0 49 0;
#P connect 49 0 50 0;
#P pop;
#P newobj 1 182 52 196617 p myDate;
#B color 4;
#P comment 12 54 49 196617 calendar?;
#P comment 815 377 100 196617 lowres jpg;
#P comment 470 54 285 196617 1. set FT account , Unix ftp upload
script , grab files directory;
#P comment 466 29 339 196617 Simple Webcam – yb@imal.org – stripped
version to show memory leak;
#P hidden connect 4 0 45 0;
#P hidden connect 44 0 45 0;
#P connect 45 0 29 0;
#P connect 29 0 67 0;
#P connect 67 0 68 0;
#P connect 68 0 46 0;
#P connect 46 0 36 0;
#P connect 36 0 30 0;
#P connect 68 1 65 0;
#P connect 29 1 37 0;
#P connect 37 0 31 0;
#P hidden connect 4 0 17 0;
#P hidden connect 40 0 39 0;
#P hidden connect 36 1 52 0;
#P hidden connect 42 0 43 0;
#P hidden connect 52 0 53 0;
#P hidden connect 48 0 20 0;
#P connect 20 0 19 0;
#P hidden connect 4 1 70 0;
#P hidden connect 37 0 54 0;
#P fasten 18 0 19 1 18 51 86 51;
#P fasten 9 0 38 0 281 205 86 205;
#P hidden connect 39 0 38 0;
#P connect 38 0 86 0;
#P hidden connect 54 0 55 0;
#P hidden connect 37 0 66 0;
#P hidden connect 37 0 69 0;
#P hidden connect 36 2 61 0;
#P fasten 19 0 16 0 67 96 173 96 173 69 184 69;
#P connect 16 0 15 0;
#P hidden connect 49 0 8 0;
#P connect 8 0 7 0;
#P connect 7 0 56 0;
#P connect 56 0 15 1;
#P fasten 15 0 10 0 184 120 203 120;
#P hidden connect 9 0 13 0;
#P hidden connect 59 0 58 0;
#P hidden connect 56 0 60 0;
#P hidden connect 5 0 6 0;
#P hidden connect 6 0 7 1;
#P hidden connect 58 0 59 0;
#P hidden connect 60 0 59 0;
#P hidden connect 61 0 59 0;
#P hidden connect 66 0 9 0;
#P fasten 10 2 9 0 233 152 281 152;
#P fasten 51 0 9 0 370 162 281 162;
#P hidden connect 14 0 9 0;
#P fasten 11 0 9 0 302 162 281 162;
#P fasten 12 0 9 0 334 162 281 162;
#P connect 64 0 47 0;
#P connect 76 0 74 0;
#P connect 74 0 72 0;
#P connect 76 0 75 0;
#P connect 75 0 73 0;
#P connect 76 0 79 0;
#P connect 79 0 78 0;
#P hidden connect 25 0 24 0;
#P hidden connect 24 0 23 0;
#P hidden connect 50 0 25 0;
#P hidden connect 32 0 33 0;
#P fasten 27 0 33 0 810 597 756 597;
#P hidden connect 33 0 35 0;
#P hidden connect 35 0 62 0;
#P hidden connect 62 0 63 0;
#P hidden connect 63 0 57 0;
#P hidden connect 26 0 24 1;
#P fasten 10 0 26 0 203 202 759 202;
#P hidden connect 93 0 26 0;
#P hidden connect 32 0 28 0;
#P connect 76 0 84 0;
#P connect 84 0 80 0;
#P fasten 9 0 21 0 281 192 810 192;
#P fasten 21 0 27 0 810 453 810 453;
#P hidden connect 28 0 27 0;
#P fasten 10 1 21 1 218 197 886 197;
#P connect 91 0 92 0;
#P connect 76 0 90 0;
#P connect 90 0 91 0;
#P pop;

>On Sep 20, 2006, at 7:53 AM, Yves Bernard wrote:
>
>>maybe there are some known bugs or well known things which provoke
>>memory leaks? Maybe some memory issues have been solved in 4.6 ?
>
>The Apple File Manager caching sfplay~/sfrecord~ issue which Hans
>mentioned has been fixed in 4.6. However, if Quicktime itself uses
>standard file calls internally, rather than the calls which
>explicitly disable Apple File Manager caching, then this general
>problem with Apple’s File Manager caching algorithm may demonstrate
>similar behavior. If this is the case (for which I have no evidence
>to assume it is), as far as I know, there’s nothing we can do. It
>appears to be an Apple issue. I’ve mentioned this curious behavior
>(which is only exhibited on certain machines for certain people,
>according to some mysterious sequence of events) to some people at
>Apple, and perhaps it will be addressed in a future release.
>
>As Jeremy mentioned, without an example patch to demonstrate clearly
>what you are doing, however, there’s really not much else we can do
>to help you. From our standpoint, as developers interested in
>providing assistance and fixing bugs where possible, reports without
>clear examples are extremely frustrating (and typically viewed as an
>impolite drain on the mailing list…more info on this in the oft
>cited “How To Ask Questions the Smart Way”).
>
>>the application systematically crashes after 5 or 6 days…
>>indeed process virtual memory size is expanding dramatically with
>>time… from 700Mb at the beginning, it doubles 24 hours later…
>>The patch uses just some basic objects (jit.qt.grab, jit.qt.record,
>>jit.lcd,…) and some simple patched logics to capture from a
>>firewire camera one image every 30 sec during daylight, save one
>>quicktime movie every day of all grabbed frames in uncompressed
>>format, and execute during the night some unix scripts (through
>>shell object) to compress and ftp all files to some server…
>>The patch uses ‘mxj now’ to get date and time every second and to
>>control start and end time of grabbing according to some calendar
>>data.
>
>
>If you are generating new symbols based on the time/date, and/or
>generating symbols with the shell object, you might be growing the
>symbol table without end. Keep in mind that symbols have infinite
>lifetime in Max, and there’s no way to flush the symbol table. So if
>this is your issue, you’ll need to figure out a way to either change
>the way your patch is implemented to be more memory efficient, or
>automatically restart your patch.
>
>-Joshua


Yves Bernard yb@imal.org
asbl iMAL vzw
rue d’Alost straat 7
1000 Bruxelles/Brussel
tel 32 2 213 37 10

http://www.imal.org

http://www.i-cult.be

#84085
Sep 21, 2006 at 9:25am

This is missing an object called “c2″, as well.

I am intending to test this today. However, Yves, I would prefer if,
in the future, you would please take more care to limit example
patches to only the elements which cause the behavior. As it is, I
will need to test the grabbing section, the ftp/shell script section,
the mxj section and the preview jpeg section, all independently,
which will take some real amount of time.

A better approach, from my perspective as someone attempting to see
this problem (in order to potentially fix it), is for you to have
already figured out what part of your patch is not working properly
and simply show it to me. This is, I would argue, your responsibility
as a developer and as the reporter of a bug. And, if I have trouble
reproducing this bug, this is exactly what I’m going to ask you to do.

Please point me to “c2″ and we’ll take it from there.

Best
jb

Am 21.09.2006 um 00:20 schrieb Yves Bernard:

> here is a stripped version wich just shows the constant memory
> increase of the max runtime process (Vsize as shown by unix ‘top’
> or Activity Monitor);
> after 155 grabed frames (about 75 minutes), the process size has
> increased from 618Mb to 700Mb…
>
> a lowres jpeg preview of each grabbed frame is uploaded by ftp to
> some server; this is done through a shell script (uploadJpg.sh);
> its code is given as a comment in a subpatch; save the text of this
> comment in a unix -x file;
>
> you have to edit some message boxes to set up your ftp account,
> various path and file names;
> then you have to edit the coll in ‘myDate’ subpatch to modify the
> grabing periods of the weekdays;
> and of course, make a runtime including all required externals
> (jitter, java for mxj);
>
> the only external is Bill Orcut’s shell object.

#84086
Sep 22, 2006 at 5:35pm

>
>
> This is missing an object called “c2″, as well.

Hi Jeremy,

oups, sorry, here is ‘c2′:

max v2;
#N vpatcher 20 74 620 474;
#P window setfont “Sans Serif” 9.;
#P comment 139 314 143 196617 output: string of 2 chars;
#P inlet 339 49 15 0;
#P outlet 306 312 15 0;
#P newex 341 82 27 196617 t i i;
#P newex 345 154 38 196617 gate 2;
#P newex 366 130 27 196617 + 1;
#P newex 366 111 36 196617 >= 10;
#P number 334 190 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 306 222 14 196617 0;
#P newex 306 244 38 196617 strcat;
#P comment 112 50 143 196617 arg : int >=0 AND int < = 99;
#P connect 3 0 2 0;
#P connect 2 0 1 0;
#P fasten 6 1 8 0 378 298 311 298;
#P connect 1 0 8 0;
#P connect 6 0 3 0;
#P connect 3 0 1 1;
#P connect 9 0 7 0;
#P connect 5 0 6 0;
#P connect 7 1 4 0;
#P connect 4 0 5 0;
#P connect 7 0 6 1;
#P pop;

>
> I am intending to test this today. However, Yves, I would prefer if,
> in the future, you would please take more care to limit example
> patches to only the elements which cause the behavior. As it is, I
> will need to test the grabbing section, the ftp/shell script section,
> the mxj section and the preview jpeg section, all independently, which
> will take some real amount of time.
>
> A better approach, from my perspective as someone attempting to see
> this problem (in order to potentially fix it), is for you to have
> already figured out what part of your patch is not working properly
> and simply show it to me. This is, I would argue, your responsibility
> as a developer and as the reporter of a bug. And, if I have trouble
> reproducing this bug, this is exactly what I’m going to ask you to do.
>
the patch is working properly: it does perfectly what it he is designed
for… there is just this memory leak (and patch developers do not have
any way to control memory management which is the responsability of the
max memory system/garbage collector).

yes it takes time to try to see where the problem is…
this is why i send a first mail to the list to see if there were any
know issues with memory…

currently, i am away without any equipment to test it… but once at
home after 9/27 i will try to do a version with the exact
functionalities causing the memory leak

> Please point me to “c2″ and we’ll take it from there.


Yves Bernard
asbl iMAL
Centre Dansaert, 7 rue d’Alost
1000 Bruxelles
yb@imal.org
+32 478 27 55 10

#84087
Sep 22, 2006 at 5:39pm

>
>
> This is missing an object called “c2″, as well.

Hi Jeremy,

and ‘c2′ uses ‘strcat’ from jasch (Jun 23 2006 version)…


Yves Bernard
asbl iMAL
Centre Dansaert, 7 rue d’Alost
1000 Bruxelles
yb@imal.org
+32 478 27 55 10

#84088
Sep 25, 2006 at 7:33pm

Thanks, I’ve found the problem, which should be resolved in an
upcoming release of Jitter.

jb

Am 22.09.2006 um 19:39 schrieb Yves Bernard:

>> This is missing an object called “c2″, as well.
>
> Hi Jeremy,

#84089
Sep 29, 2006 at 7:18pm

Hi Jeremy,

i just come back from bucarest… and read your e-mail only now after
doing my own research back at home today;
from my analysis the memory leak is caused by ‘exportimage’ message
sent to jit.matrix or jit.qt.grab (maybe there is a thread problem
behind this as you suggest).

here is a patch which identifies the problem;
(you can take off the ‘jit.matrix @adapt 1′ and just send the
‘exportimage’ message directly to jit.qt.grab and it has the same
effect)
This problem is happening also with the latest version max 4.6.2/jitter1.6.2;

suggestion: while you are looking at export, could it be possible to
specify compression quality with numbers (e.g. from 0 to 100) instead
of a few discreet values (low, normal, high, best)?

max v2;
#N vpatcher 7 48 1021 768;
#P origin 39 -6;
#P window setfont “Sans Serif” 9.;
#P message 766 219 193 196617 exportimage /Users/yves/webcam jpeg;
#P newex 749 301 99 196617 jit.matrix @adapt 1;
#P hidden newex 125 352 71 196617 print endGrab;
#P hidden newex 12 229 78 196617 r startTheGrab;
#P newex 1 361 30 196617 t b b;
#P button 1 326 15 0;
#P hidden message 89 351 33 196617 close;
#N vpatcher 314 248 914 648;
#P window setfont “Sans Serif” 9.;
#P window linecount 0;
#P newex 335 133 58 196617 s mkQtDay;
#P button 94 49 15 0;
#P newex 152 238 61 196617 delay 1000;
#P newex 111 218 61 196617 delay 2000;
#P newex 83 199 61 196617 delay 3000;
#P newex 13 158 61 196617 delay 5000;
#P window linecount 1;
#P newex 54 178 61 196617 delay 4000;
#P message 227 162 30 196617 open;
#P window linecount 0;
#P newex 94 103 79 196617 t b b b b b b;
#P newex 103 272 38 196617 s grab;
#P inlet 94 30 15 0;
#P window linecount 1;
#P newex 430 130 117 196617 print initGrab_startDay;
#P connect 3 0 6 0;
#P connect 3 1 5 0;
#P connect 3 2 7 0;
#P connect 1 0 10 0;
#P connect 10 0 3 0;
#P connect 4 0 2 0;
#P connect 9 0 2 0;
#P connect 8 0 2 0;
#P connect 7 0 2 0;
#P connect 5 0 2 0;
#P connect 6 0 2 0;
#P connect 3 3 8 0;
#P connect 3 4 9 0;
#P connect 3 5 4 0;
#P connect 10 0 11 0;
#P connect 10 0 0 0;
#P pop;
#P newobj 21 380 54 196617 p initGrab;
#P hidden message 139 418 33 196617 set 0;
#P hidden message 248 103 21 196617 inc;
#P user incdec 269 81 15 15 0 0;
#P number 214 81 55 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 198 81 15 0;
#P hidden newex 83 325 77 196617 s videoClockOn;
#P hidden message 72 326 14 196617 0;
#P hidden newex 60 418 77 196617 s videoClockOn;
#P hidden message 45 418 14 196617 1;
#P hidden newex 159 28 77 196617 r videoClockOn;
#N vpatcher 232 196 1011 672;
#P window setfont “Sans Serif” 9.;
#P window linecount 0;
#P newex 136 78 61 196617 delay 2000;
#P window linecount 1;
#P message 157 247 14 196617 1;
#P window linecount 0;
#P message 178 208 14 196617 1;
#P newex 241 189 38 196617 s grab;
#P message 241 159 30 196617 open;
#P window linecount 1;
#P newex 136 285 78 196617 s startTheGrab;
#P window linecount 0;
#P newex 136 118 140 196617 t b b b b b b b;
#P button 136 99 15 0;
#P inlet 136 30 15 0;
#P window linecount 1;
#P newex 294 149 77 196617 s readCalendar;
#P connect 1 0 9 0;
#P connect 9 0 2 0;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P connect 3 1 8 0;
#P connect 3 2 7 0;
#P connect 1 0 5 0;
#P connect 5 0 6 0;
#P fasten 3 3 6 0 204 178 246 178;
#P fasten 3 2 6 0 183 183 246 183;
#P fasten 3 5 0 0 246 142 299 142;
#P pop;
#P newobj 373 82 52 196617 p startUp;
#P newex 1 399 61 196617 delay 6000;
#P button 34 326 15 0;
#P newex 1 418 40 196617 t b b b;
#P newex 34 354 50 196617 s endDay;
#B color 14;
#P newex 1 441 58 196617 s startDay;
#B color 6;
#P user jit.pwindow 199 208 514 386 0 1 0 0 1 0;
#P newex 198 125 30 196617 t b b;
#P newex 276 167 104 196617 jit.qt.grab 1024 768;
#P toggle 198 47 15 0;
#P newex 198 63 64 196617 metro 1000;
#P hidden newex 252 40 44 196617 * 1000;
#P hidden number 252 22 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont “Sans Serif” 12.;
#P window linecount 2;
#P user com 570 33 267 196620 34;
#K set 0 27241 29812 25970 8290 30055 8237 8301 25965 28530 31008
27749 24939 32 26990 8293 30832 28530 29801 28001 26469 3417 30309
29472 16997 29294 24946 25644 8313 25152 26989 24940 11887 29287 3328;
#K end;
#P button 373 54 26 4;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 830 203 100 196617 set your path here…;
#P comment 406 54 100 196617 start here;
#P hidden connect 31 0 29 0;
#P connect 29 0 30 0;
#P connect 30 0 15 0;
#P connect 15 0 13 0;
#P connect 13 0 11 0;
#P connect 30 1 27 0;
#P connect 14 0 12 0;
#P hidden connect 13 1 18 0;
#P hidden connect 18 0 19 0;
#P hidden connect 14 0 20 0;
#P hidden connect 20 0 21 0;
#P hidden connect 14 0 28 0;
#P hidden connect 14 0 32 0;
#P hidden connect 13 2 26 0;
#P hidden connect 17 0 7 0;
#P connect 7 0 6 0;
#P connect 6 0 22 0;
#P connect 22 0 9 0;
#P hidden connect 8 0 10 0;
#P hidden connect 24 0 23 0;
#P hidden connect 22 0 25 0;
#P hidden connect 4 0 5 0;
#P hidden connect 5 0 6 1;
#P hidden connect 26 0 24 0;
#P hidden connect 25 0 24 0;
#P hidden connect 23 0 24 0;
#P fasten 9 1 8 0 223 154 281 154;
#P hidden connect 28 0 8 0;
#P connect 2 0 16 0;
#P fasten 8 0 33 0 281 198 754 198;
#P fasten 34 0 33 0 771 293 754 293;
#P fasten 9 0 34 0 203 161 771 161;
#P pop;

>Thanks. I discovered the problem after spending lots of time with
>the patch. Turns out to be a complicated problem related to thread
>maintenance, but it will be fixed in the next Jitter release.
>
>Thanks,
>jb
>
>
>Am 23.09.2006 um 17:39 schrieb Yves Bernard:
>
>>i’ve tested this stub-jitter version for near one hour and a half
>>(about 150 ‘grabbed’ frames), and the memory stays stable around
>>590Mb.
>>(orginal patch was increasing about 100Mb…)


Yves Bernard yb@imal.org
asbl iMAL vzw
rue d’Alost straat 7
1000 Bruxelles/Brussel
tel 32 2 213 37 10

http://www.imal.org
http://www.i-cult.be
jitter mailing list
jitter@cycling74.com

http://www.cycling74.com/mailman/listinfo/jitter

#84090

You must be logged in to reply to this topic.