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

Stacktrace in the new shell

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1-beta-3
    • 1.1-rc-1
    • Groovysh
    • None

    Description

      I have some difficulties reproducing this bug, as I'm not 100% sure what's causing it exactly, but it seems that when you launch the shell (with the NEWSHELL var env set), when you start typing some uncomplete statement, and then hit Escape, you can get the huge and horrible stacktrace below:

      C:\Documents and Settings\Guillaume Laforge>groovysh
      Groovy Shell (1.1-beta-3, JVM: 1.6.0_02-b06)
      Type 'help' or '\h' for help.
      -------------------------------------------------------------------------------------------------------------
      groovy:(0):000>ERROR java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      at java.lang.AbstractStringBuilder.deleteCharAt (AbstractStringBuilder.java:770)
      at java.lang.StringBuffer.deleteCharAt (StringBuffer.java:382)
      at jline.ConsoleReader.killLine (ConsoleReader.java:742)
      at jline.ConsoleReader.readLine (ConsoleReader.java:569)
      at jline.ConsoleReader.readLine (ConsoleReader.java:416)
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke (Method.java:597)
      at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke (ReflectionMetaMethod.java:64)
      at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke (MetaClassHelper.java:537)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:772)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:614)
      at org.codehaus.groovy.runtime.Invoker.invokePojoMethod (Invoker.java:87)
      at org.codehaus.groovy.runtime.Invoker.invokeMethod (Invoker.java:75)
      at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod (InvokerHelper.java:74)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN (ScriptBytecodeAdapter.java:158)
      at org.codehaus.groovy.tools.shell.InteractiveShellRunner.readLine (InteractiveShellRunner.groovy:86)
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke (Method.java:597)
      at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke (ReflectionMetaMethod.java:64)
      at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke (MetaClassHelper.java:537)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:772)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN (ScriptBytecodeAdapter.java:66)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrent0 (ScriptBytecodeAdapter.java:99)
      at org.codehaus.groovy.tools.shell.ShellRunner.work (ShellRunner.groovy:75)
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke (Method.java:597)
      at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke (ReflectionMetaMethod.java:64)
      at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke (MetaClassHelper.java:537)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:772)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN (ScriptBytecodeAdapter.java:66)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrent0 (ScriptBytecodeAdapter.java:99)
      at org.codehaus.groovy.tools.shell.ShellRunner.run (ShellRunner.groovy:57)
      at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$run (InteractiveShellRunner.groovy)
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke (Method.java:597)
      at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke (ReflectionMetaMethod.java:64)
      at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke (MetaClassHelper.java:537)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:772)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN (ScriptBytecodeAdapter.java:118)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0 (ScriptBytecodeAdapter.java:142)
      at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run (InteractiveShellRunner.groovy:64)
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke (Method.java:597)
      at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke (ReflectionMetaMethod.java:64)
      at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke (MetaClassHelper.java:537)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:772)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:614)
      at org.codehaus.groovy.runtime.Invoker.invokePogoMethod (Invoker.java:98)
      at org.codehaus.groovy.runtime.Invoker.invokeMethod (Invoker.java:79)
      at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod (InvokerHelper.java:74)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN (ScriptBytecodeAdapter.java:158)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod0 (ScriptBytecodeAdapter.java:201)
      at org.codehaus.groovy.tools.shell.Groovysh.run (Groovysh.groovy:446)
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke (Method.java:597)
      at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke (ReflectionMetaMethod.java:64)
      at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke (MetaClassHelper.java:537)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:772)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:614)
      at org.codehaus.groovy.runtime.Invoker.invokePogoMethod (Invoker.java:98)
      at org.codehaus.groovy.runtime.Invoker.invokeMethod (Invoker.java:79)
      at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod (InvokerHelper.java:74)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN (ScriptBytecodeAdapter.java:158)
      at org.codehaus.groovy.tools.shell.Groovysh.main (Groovysh.groovy:591)
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke (Method.java:597)
      at org.codehaus.groovy.tools.GroovyStarter.rootLoader (GroovyStarter.java:101)
      at org.codehaus.groovy.tools.GroovyStarter.main (GroovyStarter.java:130)
      groovy:(0):000> ERROR java.lang.StringIndexOutOfBoundsException: null
      at java.lang.AbstractStringBuilder.delete (AbstractStringBuilder.java:702)
      at java.lang.StringBuffer.delete (StringBuffer.java:373)
      at jline.ConsoleReader.backspace (ConsoleReader.java:1200)
      at jline.ConsoleReader.setBuffer (ConsoleReader.java:968)
      at jline.ConsoleReader.readLine (ConsoleReader.java:558)
      at jline.ConsoleReader.readLine (ConsoleReader.java:416)
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke (Method.java:597)
      at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke (ReflectionMetaMethod.java:64)
      at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke (MetaClassHelper.java:537)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:772)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:614)
      at org.codehaus.groovy.runtime.Invoker.invokePojoMethod (Invoker.java:87)
      at org.codehaus.groovy.runtime.Invoker.invokeMethod (Invoker.java:75)
      at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod (InvokerHelper.java:74)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN (ScriptBytecodeAdapter.java:158)
      at org.codehaus.groovy.tools.shell.InteractiveShellRunner.readLine (InteractiveShellRunner.groovy:86)
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke (Method.java:597)
      at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke (ReflectionMetaMethod.java:64)
      at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke (MetaClassHelper.java:537)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:772)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN (ScriptBytecodeAdapter.java:66)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrent0 (ScriptBytecodeAdapter.java:99)
      at org.codehaus.groovy.tools.shell.ShellRunner.work (ShellRunner.groovy:75)
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke (Method.java:597)
      at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke (ReflectionMetaMethod.java:64)
      at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke (MetaClassHelper.java:537)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:772)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN (ScriptBytecodeAdapter.java:66)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrent0 (ScriptBytecodeAdapter.java:99)
      at org.codehaus.groovy.tools.shell.ShellRunner.run (ShellRunner.groovy:57)
      at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$run (InteractiveShellRunner.groovy)
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke (Method.java:597)
      at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke (ReflectionMetaMethod.java:64)
      at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke (MetaClassHelper.java:537)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:772)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN (ScriptBytecodeAdapter.java:118)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0 (ScriptBytecodeAdapter.java:142)
      at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run (InteractiveShellRunner.groovy:64)
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke (Method.java:597)
      at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke (ReflectionMetaMethod.java:64)
      at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke (MetaClassHelper.java:537)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:772)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:614)
      at org.codehaus.groovy.runtime.Invoker.invokePogoMethod (Invoker.java:98)
      at org.codehaus.groovy.runtime.Invoker.invokeMethod (Invoker.java:79)
      at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod (InvokerHelper.java:74)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN (ScriptBytecodeAdapter.java:158)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod0 (ScriptBytecodeAdapter.java:201)
      at org.codehaus.groovy.tools.shell.Groovysh.run (Groovysh.groovy:446)
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke (Method.java:597)
      at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke (ReflectionMetaMethod.java:64)
      at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke (MetaClassHelper.java:537)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:772)
      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:614)
      at org.codehaus.groovy.runtime.Invoker.invokePogoMethod (Invoker.java:98)
      at org.codehaus.groovy.runtime.Invoker.invokeMethod (Invoker.java:79)
      at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod (InvokerHelper.java:74)
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN (ScriptBytecodeAdapter.java:158)
      at org.codehaus.groovy.tools.shell.Groovysh.main (Groovysh.groovy:591)
      at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke (Method.java:597)
      at org.codehaus.groovy.tools.GroovyStarter.rootLoader (GroovyStarter.java:101)
      at org.codehaus.groovy.tools.GroovyStarter.main (GroovyStarter.java:130)
      groovy:(0):000> exit
      Bye!

      Attachments

        Activity

          People

            user57 Jason Dillon
            guillaume Guillaume Sauthier
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: