groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From OC <...@ocs.cz>
Subject Re: looks like a missing exception harness in a typechecker somewhere?
Date Tue, 12 Jul 2016 15:15:38 GMT
Paul,

On 12. 7. 2016, at 3:29, Paul King <paulk@asert.com.au> wrote:

> I assume (given you say heavily transformed) that you don't have a
> simple way to reproduce the error?

Alas, precisely; I have tried to isolate the cause, but in vain :(

I just hope the callstack along with whatever code there is at WideningCategories.java:237
might help; if not, well, I am afraid my report would be good-for-nothing :(

Thanks and all the best,
OC

> On Tue, Jul 12, 2016 at 7:26 AM, OC <ocs@ocs.cz> wrote:
>> Hi there,
>> 
>> with a pretty complex and heavily AST-transformed code, which, nevertheless, *without
typechecking builds and runs all right*, with a typechecker compilation crashes in the following
way (Groovy 2.4.7).
>> 
>> The problem might well be caused by a mistake in my own typechecking extension script
(which, essentially, turns all typechecker errors to warnings); still, though, I think the
compiler should not crash this way (instead, it might report a reasonable error):
>> 
>> ===
>>>>> a serious error occurred: BUG! exception in phase 'instruction selection'
in source unit '/Users/ocs/Projects/WO_XC_ProBOIS/SberDat2/../OCShared/src/scomponents/DFEOList.groovy'
unexpected NullpointerException
>>>>> stacktrace:
>> BUG! exception in phase 'instruction selection' in source unit '/Users/ocs/Projects/WO_XC_ProBOIS/SberDat2/../OCShared/src/scomponents/DFEOList.groovy'
unexpected NullpointerException
>>        at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1058)
>>        at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:591)
>>        at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
>>        at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546)
>>        at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:525)
>>        at org.codehaus.groovy.tools.FileSystemCompiler.compile(FileSystemCompiler.java:61)
>>        at org.codehaus.groovy.tools.FileSystemCompiler.doCompilation(FileSystemCompiler.java:217)
>>        at org.codehaus.groovy.tools.FileSystemCompiler.commandLineCompile(FileSystemCompiler.java:150)
>>        at org.codehaus.groovy.tools.FileSystemCompiler.commandLineCompileWithErrorHandling(FileSystemCompiler.java:180)
>>        at org.codehaus.groovy.tools.FileSystemCompiler.main(FileSystemCompiler.java:164)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>        at java.lang.reflect.Method.invoke(Method.java:601)
>>        at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:109)
>>        at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:131)
>> Caused by: java.lang.NullPointerException
>>        at org.codehaus.groovy.ast.tools.WideningCategories.parameterizeLowestUpperBound(WideningCategories.java:237)
>>        at org.codehaus.groovy.ast.tools.WideningCategories.lowestUpperBound(WideningCategories.java:211)
>>        at org.codehaus.groovy.ast.tools.WideningCategories.parameterizeLowestUpperBound(WideningCategories.java:250)
>>        at org.codehaus.groovy.ast.tools.WideningCategories.lowestUpperBound(WideningCategories.java:211)
>>        at org.codehaus.groovy.ast.tools.WideningCategories.lowestUpperBound(WideningCategories.java:163)
>>        at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.popAssignmentTracking(StaticTypeCheckingVisitor.java:3256)
>>        at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitIfElse(StaticTypeCheckingVisitor.java:3215)
>>        at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:43)
>>        at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:37)
>>        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:166)
>>        at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:71)
>>        at org.codehaus.groovy.ast.CodeVisitorSupport.visitTryCatchFinally(CodeVisitorSupport.java:84)
>>        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitTryCatchFinally(ClassCodeVisitorSupport.java:231)
>>        at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitTryCatchFinally(StaticTypeCheckingVisitor.java:3361)
>>        at org.codehaus.groovy.ast.stmt.TryCatchStatement.visit(TryCatchStatement.java:44)
>>        at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:37)
>>        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:166)
>>        at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:71)
>>        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:104)
>>        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:115)
>>        at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitConstructorOrMethod(StaticTypeCheckingVisitor.java:1784)
>>        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:126)
>>        at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.startMethodInference(StaticTypeCheckingVisitor.java:2119)
>>        at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethod(StaticTypeCheckingVisitor.java:2078)
>>        at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1078)
>>        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:53)
>>        at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitClass(StaticTypeCheckingVisitor.java:249)
>>        at org.codehaus.groovy.transform.StaticTypesTransformation.visit(StaticTypesTransformation.java:66)
>>        at org.codehaus.groovy.transform.ASTTransformationVisitor.visitClass(ASTTransformationVisitor.java:134)
>>        at org.codehaus.groovy.transform.ASTTransformationVisitor$2.call(ASTTransformationVisitor.java:178)
>>        at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1053)
>> ===
>> 
>> All the best,
>> OC
>> 


Mime
View raw message