Here's my problem:
I have a Flash swf that uploads files from local machine and if they are images it resizes them if needed. This involves creating a JPGEncoded bytearray from a bitmapData object. After im finished with the bitmapData I dispose() of it.
I am noticing that flash will get stuck while resizing an image sometimes and have tracked this down to an "invalid bitmapData" error message. I tried last night before leaving work and it was throwing this message after 2 images!! This morning it all seemed to be fine so I decided to push it and tried uploading 20 images of 5616x3744 pixels and 5.32MB (the same images I tried previously).
I switched on performance monitor in windows and started the upload in the SWF running in mozilla + firebug for good measure. Things worked great for about 12 images then on the 13th (!!) it froze again. Ive attached a screenshot of the graph from performance mon.
Im guessing I need to do more tests like this to see where there are any problems. Can anyone shed some light on what Im seeing here that might cause problems - the yellow line looks suspicious!(?)
Large green spike corresponds to redrawing the bitmapData I think and the smaller green spike is drawing a thumbnail version from the same Bitmap object after the large version has been successfully loaded. What other counters should I use to monitor memory usage etc.
Any advice is appreciated. many thanks