Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-5308

Caught: BUG! exception in phase 'conversion' in source unit '${file}' null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.8.6
    • 2.0-beta-3
    • Compiler
    • None

    Description

      I'm new to Groovy, so I simply stumbled upon the following, which indicated it was a bug. I couldn't find it as an existing issue.

      Source (Test.groovy):
      foo = new String[] [ "x" ]

      $ groovy -d Test.groovy
      Caught: BUG! exception in phase 'conversion' in source unit '/home/taylor/Test.groovy' null
      BUG! exception in phase 'conversion' in source unit '/home/taylor/Test.groovy' null
      at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:847)
      at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:548)
      at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:524)
      at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:501)
      at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:306)
      at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:283)
      at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:267)
      at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:197)
      at groovy.lang.GroovyShell$2.run(GroovyShell.java:215)
      at groovy.lang.GroovyShell$2.run(GroovyShell.java:213)
      at java.security.AccessController.doPrivileged(Native Method)
      at groovy.lang.GroovyShell.run(GroovyShell.java:213)
      at groovy.lang.GroovyShell.run(GroovyShell.java:159)
      at groovy.ui.GroovyMain.processOnce(GroovyMain.java:550)
      at groovy.ui.GroovyMain.run(GroovyMain.java:337)
      at groovy.ui.GroovyMain.process(GroovyMain.java:323)
      at groovy.ui.GroovyMain.processArgs(GroovyMain.java:120)
      at groovy.ui.GroovyMain.main(GroovyMain.java:100)
      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:616)
      at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:108)
      at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:130)
      Caused by: java.lang.NullPointerException
      at org.codehaus.groovy.antlr.AntlrParserPlugin.expressionSwitch(AntlrParserPlugin.java:1652)
      at org.codehaus.groovy.antlr.AntlrParserPlugin.expression(AntlrParserPlugin.java:1636)
      at org.codehaus.groovy.antlr.AntlrParserPlugin.expression(AntlrParserPlugin.java:1632)
      at org.codehaus.groovy.antlr.AntlrParserPlugin.arraySizeExpression(AntlrParserPlugin.java:2512)
      at org.codehaus.groovy.antlr.AntlrParserPlugin.arraySizeExpression(AntlrParserPlugin.java:2510)
      at org.codehaus.groovy.antlr.AntlrParserPlugin.constructorCallExpression(AntlrParserPlugin.java:2463)
      at org.codehaus.groovy.antlr.AntlrParserPlugin.expressionSwitch(AntlrParserPlugin.java:1673)
      at org.codehaus.groovy.antlr.AntlrParserPlugin.expression(AntlrParserPlugin.java:1636)
      at org.codehaus.groovy.antlr.AntlrParserPlugin.expression(AntlrParserPlugin.java:1632)
      at org.codehaus.groovy.antlr.AntlrParserPlugin.binaryExpression(AntlrParserPlugin.java:2265)
      at org.codehaus.groovy.antlr.AntlrParserPlugin.expressionSwitch(AntlrParserPlugin.java:1794)
      at org.codehaus.groovy.antlr.AntlrParserPlugin.expression(AntlrParserPlugin.java:1636)
      at org.codehaus.groovy.antlr.AntlrParserPlugin.expression(AntlrParserPlugin.java:1632)
      at org.codehaus.groovy.antlr.AntlrParserPlugin.expressionSwitch(AntlrParserPlugin.java:1655)
      at org.codehaus.groovy.antlr.AntlrParserPlugin.expression(AntlrParserPlugin.java:1636)
      at org.codehaus.groovy.antlr.AntlrParserPlugin.expression(AntlrParserPlugin.java:1632)
      at org.codehaus.groovy.antlr.AntlrParserPlugin.statement(AntlrParserPlugin.java:1259)
      at org.codehaus.groovy.antlr.AntlrParserPlugin.convertGroovy(AntlrParserPlugin.java:304)
      at org.codehaus.groovy.antlr.AntlrParserPlugin.buildAST(AntlrParserPlugin.java:241)
      at org.codehaus.groovy.control.SourceUnit.convert(SourceUnit.java:272)
      at org.codehaus.groovy.control.CompilationUnit$11.call(CompilationUnit.java:622)
      at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:843)
      ... 23 more

      Attachments

        Activity

          People

            paulk Paul King
            metasyntax Taylor Venable
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: