[Checkers] IGJ checker null pointer exception

Michael Ernst mernst at csail.mit.edu
Fri Feb 29 15:41:12 EST 2008


When I run the IGJ checker on all of the Daikon source files (you can use
the "make interned-all" target, but just change which checker is being
run), I get a null pointer exception.  See below for the stack trace.

I believe that checking Daikon should produce no warnings or errors, since
Daikon is unannotated and all annotations should default to mutable.

                    -Mike



/DS/home-0/mernst/research/invariants/scripts/javac-xlint -p ([/\\]jtb[/\\])|([/\\]junit[/\\]) javac -g -target 5 -typeprocessor checkers.igj.IGJChecker ...
./daikon/LogHelper.java:39: incompatible types.
found   :  java.util.logging.Handler[@checkers.igj.quals.Mutable ]
required:  java.util.logging.Handler[@checkers.igj.quals.Mutable ]
      Handler[] handlers = global.getHandlers();
                                             ^
./daikon/LogHelper.java:47: incompatible types.
found   :  java.util.logging.Handler[@checkers.igj.quals.Mutable ]
required:  java.util.logging.Handler[@checkers.igj.quals.Mutable ]
    Handler[] handlers = root.getHandlers();
                                         ^
./daikon/LogHelper.java:59: incompatible types.
found   :  java.lang.String[@checkers.igj.quals.Immutable ]
required:  java.lang.String[@checkers.igj.quals.Immutable ]
  private static String[] padding_arrays = new String[] {
                                           ^
./daikon/ModBitTracker.java:67: incompatible types.
found   :  java.util.BitSet[@checkers.igj.quals.Mutable ]
required:  java.util.BitSet[@checkers.igj.quals.Mutable ]
    modbits_arrays = new BitSet[num_vars];
                     ^


An annotation processor threw an uncaught exception.
Consult the following stack trace for details.
java.lang.NullPointerException
	at checkers.igj.IGJVisitor.isAssignable(IGJVisitor.java:166)
	at checkers.igj.IGJVisitor.commonAssignmentCheck(IGJVisitor.java:136)
	at checkers.igj.IGJVisitor.commonAssignmentCheck(IGJVisitor.java:28)
	at checkers.basetype.BaseTypeVisitor.visitAssignment(BaseTypeVisitor.java:95)
	at com.sun.tools.javac.tree.JCTree$JCAssign.accept(JCTree.java:1459)
	at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:67)
	at com.sun.source.util.TreeScanner.visitExpressionStatement(TreeScanner.java:239)
	at com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1155)
	at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:67)
	at com.sun.source.util.TreeScanner.scan(TreeScanner.java:90)
	at com.sun.source.util.TreeScanner.visitBlock(TreeScanner.java:159)
	at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:781)
	at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:67)
	at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:80)
	at com.sun.source.util.TreeScanner.visitIf(TreeScanner.java:233)
	at com.sun.tools.javac.tree.JCTree$JCIf.accept(JCTree.java:1130)
	at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:67)
	at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:80)
	at com.sun.source.util.TreeScanner.scan(TreeScanner.java:90)
	at com.sun.source.util.TreeScanner.visitBlock(TreeScanner.java:159)
	at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:781)
	at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:67)
	at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:80)
	at com.sun.source.util.TreeScanner.visitMethod(TreeScanner.java:143)
	at checkers.basetype.BaseTypeVisitor.visitMethod(BaseTypeVisitor.java:137)
	at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:681)
	at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:67)
	at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:80)
	at com.sun.source.util.TreeScanner.scan(TreeScanner.java:90)
	at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:98)
	at com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:132)
	at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:604)
	at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:67)
	at com.sun.source.util.TreeScanner.scan(TreeScanner.java:90)
	at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:98)
	at com.sun.source.util.TreeScanner.visitCompilationUnit(TreeScanner.java:119)
	at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:488)
	at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:67)
	at checkers.source.SourceChecker.process(SourceChecker.java:194)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:733)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:662)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:807)
	at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:995)
	at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:741)
	at com.sun.tools.javac.main.Main.compile(Main.java:380)
	at com.sun.tools.javac.main.Main.compile(Main.java:306)
	at com.sun.tools.javac.main.Main.compile(Main.java:297)
	at com.sun.tools.javac.Main.compile(Main.java:82)
	at com.sun.tools.javac.Main.main(Main.java:67)
make: *** [interned-all] Error 1




More information about the checkers mailing list