My MEL script is tweaking a dynamic mesh (representing a fluid) on a frame-by-frame basis over 100 frames. After looping thru 10-12 frames, the program freezes with a message about low memory and runtime errors. There are no MEL scripting errors reported. The hardware is testing clean, so it appears the issue is software related. I have 2GBs of RAM twice that in virtual memory; the video card is a Wildcat. Is there anything in a MEL script that could be cumulativley hogging large amounts of memory?? Am I now totally at the mercy of Maya's code??
Any help or suggestions might save me from junking two months worth of work. Thanks!
hmmm tryy crealing your arrays once ina while.
Note unless you have 3gb switch on then no prog will be able to use more than 1.5 G of memory virtual or otherwise under windows, EVER! not just possible to allocate that much. Same aplies to linuxes too.
i ran into the same problem on with a script that operated on tens of thousands of buildings on a machine with 3 GB of ram. solution: set the undoInfo state to 'off' in the script.
undoInfo -state off;
this did the trick for me . . .
if you set your undoInfo -state off, remember to set it also back on.
a better option, i think, is to selectively set your undo state through your script. you probably have a couple of loops (or processes) that entail a lot of processing on maya's part (especially if you're changing components, or iterating through lots of data), and you can set your undo on and off before and after these processes. that way, you can also undo your scripts through maya as well.
-sunit
Thank you all for your responses. So far, invoking undoInfo command has prevented the Memory Exception Errors from reappearing.