Stray
Stray

Reputation: 1699

mxmlc - Warning: Failed to parse corrupt data - once project reaches certain size?

I have a long running project which is compiled as modules for release, but the test suite potentially runs all the tests for every module.

The project is quite large - currently around 1250 tests cases (classes), and pulling in around 4000 classes in total. It's an asunit3 project so all the test cases are listed in one AllTests.as file.

Obviously I don't run all the tests all the time - the suite takes minutes to run, so most of the time I'm running focussed tests but a couple of times a day I run the full suite which includes integration tests and so on.

As of my last few hours of work, I'm no longer able to successfully build and run the whole suite. We have a script that allows us to filter tests using the package name or class name, so I can testpackage['modules'] or testpackage['com'] etc. I can also exclude packages - testallexcept['utils'] and so on.

I'm able to run any and all subsets of the tests, but if I try to test the whole set, I get:

Warning: Failed to parse corrupt data.

If I filter out just a few classes then I'm able to get the swf to compile and open, but it's just a white box and doesn't actually run the tests. If I filter a few more then all is fine. It doesn't appear to matter which ones I filter - as long as I take around 15 test cases out, all is fine (though I haven't found an exact number that is the line between ok / not ok.)

I'm compiling with -benchmark and get the following output:

Initial setup: 34ms
start loading swcs 7ms Running Total: 41ms
Loaded 45 SWCs: 253ms
precompile: 456ms
Files: 4013 Time: 16087ms
Linking... 91ms
SWF Encoding... 833ms
/Users/me/Documents/clients/project/bin/ProjectShellRunner.swf (4888318 bytes)
postcompile: 927ms
Total time: 17312ms
Peak memory usage: 413 MB (Heap: 343, Non-Heap: 70)

mxmlc finished compiling bin/ProjectShellRunner.swf in 18 seconds

As the peak memory usage is over the default heap in mxmlc, I increased it to

VMARGS="-Xmx1024m -Dsun.io.useCanonCaches=false " 

This doesn't appear to have helped.

The way asunit3 and projectsprouts is set up pulls all the tests together in one single AllTests.as file. This is now over 2500 lines long and imports all 1250 test cases.

Is there anything I'm missing in terms of hard limits on number of classes, class length, number of imports in one class, etc? Or any settings I'm able to change other than the VM heap for java? I'm using the Flex 4.2 mxmlc compiler.

Obviously I can work around this via a script to run a series of subsets instead of one single suite, but I'd like to understand why this is happening.

Any clues?


Some extra info based on Qs from twitter:

Upvotes: 0

Views: 116

Answers (0)

Related Questions