Quantcast

[sonar-dev] cxx plugin - IllegalArgumentException and problems with CDT parser

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[sonar-dev] cxx plugin - IllegalArgumentException and problems with CDT parser

SteveB

Hi all,

 

I just started to evaluate sonar on cxx source and build the cxx plugin from trunk, but I ran into an exception in the cohesion sensor (org.sonar.plugins.cxx.ast.cpp.impl.internal.CommonName.validateString).

After catching the exception I ran into more parser problems, like the one below, caused by the cdt parser.

 

My problem is that I run the analysis on closed-source software, so I cannot post the files here. Is there anyone actively working on the parser & cohesion cxx stuff ?

 

 

Thanks,


Stefan

 

//-----

 

D:\ sonar\build.xml:38: java.lang.NoClassDefFoundError: org/eclipse/core/runtime/Assert

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPTemplateArgument.<init>(CPPTemplateArgument.java:27)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates.createTemplateArgumentArray(CPPTemplates.java:1552)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates.instantiateForFunctionCall(CPPTemplates.java:1583)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics.resolveFunction(CPPSemantics.java:2362)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics.resolveAmbiguities(CPPSemantics.java:2066)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics.resolveBinding(CPPSemantics.java:270)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor.resolveBinding(CPPVisitor.java:1287)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor.createBinding(CPPVisitor.java:294)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates.createBinding(CPPTemplates.java:606)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTemplateId.createIntermediateBinding(CPPASTTemplateId.java:117)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTNameBase.resolveBinding(CPPASTNameBase.java:86)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor.createBinding(CPPVisitor.java:290)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName.createIntermediateBinding(CPPASTName.java:63)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTNameBase.resolveBinding(CPPASTNameBase.java:86)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTemplateIDAmbiguity.checkNames(CPPASTTemplateIDAmbiguity.java:123)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTemplateIDAmbiguity.resolveAmbiguity(CPPASTTemplateIDAmbiguity.java:85)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTAmbiguityResolver.visit(CPPASTAmbiguityResolver.java:63)

        at org.eclipse.cdt.internal.core.dom.parser.ASTAmbiguousNode.accept(ASTAmbiguousNode.java:60)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTIfStatement.accept(CPPASTIfStatement.java:131)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTCompoundStatement.accept(CPPASTCompoundStatement.java:79)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDefinition.accept(CPPASTFunctionDefinition.java:187)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTAmbiguityResolver.leave(CPPASTAmbiguityResolver.java:183)

        at org.eclipse.cdt.internal.core.dom.parser.ASTTranslationUnit.accept(ASTTranslationUnit.java:286)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTranslationUnit.resolveAmbiguities(CPPASTTranslationUnit.java:182)

        at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.resolveAmbiguities(AbstractGNUSourceCodeParser.java:670)

        at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.parse(AbstractGNUSourceCodeParser.java:657)

        at org.eclipse.cdt.core.dom.parser.AbstractCLikeLanguage.getASTTranslationUnit(AbstractCLikeLanguage.java:148)

        at org.sonar.plugins.cxx.ast.CxxCppParser.generateAst(CxxCppParser.java:80)

        at org.sonar.plugins.cxx.ast.CxxCppParser.parseFile(CxxCppParser.java:59)

 

 

 

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: [sonar-dev] cxx plugin - IllegalArgumentException and problems with CDT parser

Kociolek, Przemyslaw

Hi Steve,

 

I’m responsible for Cohesion sensor. If you could provide a code sample where it crashes, it would be very usefull. It doesn’t have to be your company code, just send us some test code that can reproduce the crash.

 

Thanks,

Przemek

 

From: SteveB [mailto:[hidden email]]
Sent: Monday, September 10, 2012 11:25 AM
To: [hidden email]
Subject: [sonar-dev] cxx plugin - IllegalArgumentException and problems with CDT parser

 

Hi all,

 

I just started to evaluate sonar on cxx source and build the cxx plugin from trunk, but I ran into an exception in the cohesion sensor (org.sonar.plugins.cxx.ast.cpp.impl.internal.CommonName.validateString).

After catching the exception I ran into more parser problems, like the one below, caused by the cdt parser.

 

My problem is that I run the analysis on closed-source software, so I cannot post the files here. Is there anyone actively working on the parser & cohesion cxx stuff ?

 

 

Thanks,


Stefan

 

//-----

 

D:\ sonar\build.xml:38: java.lang.NoClassDefFoundError: org/eclipse/core/runtime/Assert

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPTemplateArgument.<init>(CPPTemplateArgument.java:27)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates.createTemplateArgumentArray(CPPTemplates.java:1552)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates.instantiateForFunctionCall(CPPTemplates.java:1583)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics.resolveFunction(CPPSemantics.java:2362)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics.resolveAmbiguities(CPPSemantics.java:2066)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics.resolveBinding(CPPSemantics.java:270)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor.resolveBinding(CPPVisitor.java:1287)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor.createBinding(CPPVisitor.java:294)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates.createBinding(CPPTemplates.java:606)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTemplateId.createIntermediateBinding(CPPASTTemplateId.java:117)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTNameBase.resolveBinding(CPPASTNameBase.java:86)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor.createBinding(CPPVisitor.java:290)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName.createIntermediateBinding(CPPASTName.java:63)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTNameBase.resolveBinding(CPPASTNameBase.java:86)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTemplateIDAmbiguity.checkNames(CPPASTTemplateIDAmbiguity.java:123)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTemplateIDAmbiguity.resolveAmbiguity(CPPASTTemplateIDAmbiguity.java:85)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTAmbiguityResolver.visit(CPPASTAmbiguityResolver.java:63)

        at org.eclipse.cdt.internal.core.dom.parser.ASTAmbiguousNode.accept(ASTAmbiguousNode.java:60)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTIfStatement.accept(CPPASTIfStatement.java:131)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTCompoundStatement.accept(CPPASTCompoundStatement.java:79)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDefinition.accept(CPPASTFunctionDefinition.java:187)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTAmbiguityResolver.leave(CPPASTAmbiguityResolver.java:183)

        at org.eclipse.cdt.internal.core.dom.parser.ASTTranslationUnit.accept(ASTTranslationUnit.java:286)

        at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTranslationUnit.resolveAmbiguities(CPPASTTranslationUnit.java:182)

        at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.resolveAmbiguities(AbstractGNUSourceCodeParser.java:670)

        at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.parse(AbstractGNUSourceCodeParser.java:657)

        at org.eclipse.cdt.core.dom.parser.AbstractCLikeLanguage.getASTTranslationUnit(AbstractCLikeLanguage.java:148)

        at org.sonar.plugins.cxx.ast.CxxCppParser.generateAst(CxxCppParser.java:80)

        at org.sonar.plugins.cxx.ast.CxxCppParser.parseFile(CxxCppParser.java:59)

 

 

 

 

Loading...