For a while now in my app I've used ObjectUtil.copy to copy array collections. Recently we've been making a lot of changes to the app and its started breaking on any of my copy commands. I originally thought it was due to custom classes in the arrays but ruled that out by testing empty or simple ArrayCollections.
Neither of these will work for me:
var a:ArrayCollection = ObjectUtil.copy(new ArrayCollection());
newWindow.months = ObjectUtil.copy(months) as ArrayCollection;
In the second line, newWindow is just a new canvas I'm going to show with a 'months' property and months is an ArrayCollection with only strings in it.
Inside the .copy() function it breaks on buffer.writeObject(value);
and throws this error 'ArgumentError: Error #2004: One of the parameters is invalid.'