Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8270943

jshell crashes with StringIndexOutOfBoundsException in the rxvt terminal emulator

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 11.0.11, 18
    • Fix Version/s: 18
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • OS:
      linux

      Description

      Using jshell with the rxvt terminal emulator causes it to crash with an StringIndexOutOfBoundsException:

      Exception in thread "main" java.io.IOError: java.lang.StringIndexOutOfBoundsException: String index out of range: 5
      at jdk.internal.le/jdk.internal.org.jline.utils.Curses.tputs(Curses.java:62)
      at jdk.internal.le/jdk.internal.org.jline.utils.Curses.tputs(Curses.java:45)
      at jdk.internal.le/jdk.internal.org.jline.keymap.KeyMap.key(KeyMap.java:243)
      at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.key(LineReaderImpl.java:6095)
      at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
      at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
      at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
      at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
      at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
      at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.bindKeys(LineReaderImpl.java:6103)
      at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.emacs(LineReaderImpl.java:5813)
      at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.defaultKeyMaps(LineReaderImpl.java:5789)
      at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.<init>(LineReaderImpl.java:293)
      at jdk.jshell/jdk.internal.jshell.tool.ConsoleIOContext$1.<init>(ConsoleIOContext.java:122)
      at jdk.jshell/jdk.internal.jshell.tool.ConsoleIOContext.<init>(ConsoleIOContext.java:122)
      at jdk.jshell/jdk.internal.jshell.tool.JShellTool.start(JShellTool.java:970)
      at jdk.jshell/jdk.internal.jshell.tool.JShellToolBuilder.start(JShellToolBuilder.java:254)
      at jdk.jshell/jdk.internal.jshell.tool.JShellToolProvider.main(JShellToolProvider.java:120)
      Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 5
      at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:47)
      at java.base/java.lang.String.charAt(String.java:693)
      at jdk.internal.le/jdk.internal.org.jline.utils.Curses.doTputs(Curses.java:359)
      at jdk.internal.le/jdk.internal.org.jline.utils.Curses.tputs(Curses.java:60)
      ... 21 more

      This is a know issue within Jline (https://github.com/jline/jline3/issues/533) and seems to be fixed in Jline 3.15.0 https://github.com/jline/jline3/issues/532.
      We should consider upgrading Jline to fix this issue.

      The same issue is noted on the Graal known issues (https://www.graalvm.org/release-notes/known-issues), but I couldn't find anything within the OpenJDK bug tracker.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jlahoda Jan Lahoda
              Reporter:
              cgo Christoph Göttschkes
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: