Details
Description
After upgrade to latest versions of Sonar and Flex plugin some code analysis has started to fail.
Full stack trace here:
INFO: Rules number in the ruleSet: 85 Oct 29, 2012 1:03:16 PM de.bokelberg.flex.parser.AS3Scanner$XMLVerifier verify WARNING: The markup in the document preceding the root element must be well-formed. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) [ERROR] Java heap space -> [Help 1] java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2894) at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:117) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:407) at java.lang.StringBuffer.append(StringBuffer.java:241) at de.bokelberg.flex.parser.AS3Parser.parseMetaData(AS3Parser.java:1577) at de.bokelberg.flex.parser.AS3Parser.parseClassContent(AS3Parser.java:157) at de.bokelberg.flex.parser.AS3Parser.parseClass(AS3Parser.java:942) at de.bokelberg.flex.parser.AS3Parser.parsePackageContent(AS3Parser.java:290) at de.bokelberg.flex.parser.AS3Parser.parsePackage(AS3Parser.java:1768) at de.bokelberg.flex.parser.AS3Parser.parseCompilationUnit(AS3Parser.java:204) at de.bokelberg.flex.parser.AS3Parser.parseLines(AS3Parser.java:1554) at de.bokelberg.flex.parser.AS3Parser.buildAst(AS3Parser.java:109) at com.adobe.ac.pmd.files.FileSetUtils.tryToBuildAst(FileSetUtils.java:182) at com.adobe.ac.pmd.files.FileSetUtils.buildAst(FileSetUtils.java:78) at com.adobe.ac.pmd.FlexPmdViolations.computeAsts(FlexPmdViolations.java:126) at com.adobe.ac.pmd.FlexPmdViolations.computeAsts(FlexPmdViolations.java:109) at com.adobe.ac.pmd.FlexPmdViolations.computeViolations(FlexPmdViolations.java:88) at com.adobe.ac.pmd.engines.AbstractFlexPmdEngine.computeViolations(AbstractFlexPmdEngine.java:142) at com.adobe.ac.pmd.engines.AbstractFlexPmdEngine.executeReport(AbstractFlexPmdEngine.java:119) at org.sonar.plugins.flex.flexpmd.FlexPmdSensor.execute(FlexPmdSensor.java:85) at org.sonar.plugins.flex.flexpmd.FlexPmdSensor.analyse(FlexPmdSensor.java:63) at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64) at org.sonar.batch.phases.Phases.execute(Phases.java:97) at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:128) at org.sonar.batch.bootstrap.Module.start(Module.java:83) at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:114) at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:104) at org.sonar.batch.bootstrap.Module.start(Module.java:83) at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:121) at org.sonar.batch.bootstrap.Module.start(Module.java:83) at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:73) at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:60)
I've increased my java heap space to 2GB in order to give it a try, but I don't think that's exactly a problem with my machine.
I've tried with different quality profiles (new default and a previous existing one) but it doesn't make any difference.
Also, another quality analysis has stop working on another complex project. In that case the anylisis hangs forever.
Issue Links
- is duplicated by
-
SONARPLUGINS-2414
Abode FlexPMD : OutOfMemory when parsing some MXML files
-
- relates to
-
SONARPLUGINS-2413
Do not use FlexPMD
-
I also tried using a Sonar Runner and the problem persists: it gives an OutOfMemory error no matter how much max heap size it is assigned (and it occures very fast).
It only works if it has 0 active rules and fails with only 1 active rule (I've tried activating different rules but this doesn't help).
Info about my JDK installation:
java version "1.7.0_07"
OpenJDK Runtime Environment (IcedTea7 2.3.2) (7u7-2.3.2a-0ubuntu0.12.04.1)
OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)