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

Crash on paste to JShell

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 24
    • 23
    • tools
    • b07
    • windows

        Please see the original report here:
        https://mail.openjdk.org/pipermail/kulla-dev/2024-July/005258.html

        JShell may crash on paste on Windows with:
        $ jshell
        | Welcome to JShell -- Version 23-ea
        | For an introduction type: /help intro

        jshell> import java.util.Scanner;

        jshell>

        Exception in thread "main" java.lang.AssertionError: should not reach here
           ...> at jdk.internal.le/jdk.internal.org.jline.terminal.impl.ffm.Kernel32.ScrollConsoleScreenBuffer(Kernel32.java:241)
           ...> at jdk.internal.le/jdk.internal.org.jline.terminal.impl.ffm.WindowsAnsiWriter.processDeleteLine(WindowsAnsiWriter.java:394)> public static void main(String[] args) {
           ...> at jdk.internal.le/jdk.internal.org.jline.utils.AnsiWriter.processEscapeCommand(AnsiWriter.java:300)
           ...> at jdk.internal.le/jdk.internal.org.jline.utils.AnsiWriter.write(AnsiWriter.java:114)
           ...> at java.base/java.io.PrintWriter.implWrite(PrintWriter.java:536)
           ...> at java.base/java.io.PrintWriter.write(PrintWriter.java:528)
           ...> at java.base/java.io.PrintWriter.append(PrintWriter.java:1374)
           ...> at java.base/java.io.PrintWriter.append(PrintWriter.java:64)
           ...> at jdk.internal.le/jdk.internal.org.jline.utils.Curses.doTputs(Curses.java:468)
           ...> at jdk.internal.le/jdk.internal.org.jline.utils.Curses.tputs(Curses.java:59)
           ...> at jdk.internal.le/jdk.internal.org.jline.terminal.impl.AbstractTerminal.puts(AbstractTerminal.java:188)
           ...> at jdk.internal.le/jdk.internal.org.jline.utils.Display.perform(Display.java:370)
           ...> at jdk.internal.le/jdk.internal.org.jline.utils.Display.deleteLines(Display.java:343)
           ...> at jdk.internal.le/jdk.internal.org.jline.utils.Display.update(Display.java:167)
           ...> at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.redisplay(LineReaderImpl.java:4010)
           ...> at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.doCleanup(LineReaderImpl.java:2601)
           ...> at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.cleanup(LineReaderImpl.java:2592)
           ...> at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:777)
           ...> at jdk.internal.le/jdk.internal.org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:512)
           ...> at jdk.jshell/jdk.internal.jshell.tool.ConsoleIOContext.readLine(ConsoleIOContext.java:225)
           ...> at jdk.jshell/jdk.internal.jshell.tool.JShellTool.getInput(JShellTool.java:1295)
           ...> at jdk.jshell/jdk.internal.jshell.tool.JShellTool.run(JShellTool.java:1229)
           ...> at jdk.jshell/jdk.internal.jshell.tool.JShellTool.start(JShellTool.java:1014)
           ...> at jdk.jshell/jdk.internal.jshell.tool.JShellToolBuilder.start(JShellToolBuilder.java:261)
           ...> at jdk.jshell/jdk.internal.jshell.tool.JShellToolProvider.main(JShellToolProvider.java:120)
        Caused by: java.lang.invoke.WrongMethodTypeException: handle's method type (MemorySegment,MemorySegment,MemorySegment,MemorySegment,MemorySegment)int but found (MemorySegment,SMALL_RECT,SMALL_RECT,COORD,CHAR_INFO)int
                at java.base/java.lang.invoke.Invokers.newWrongMethodTypeException(Invokers.java:521)
                at java.base/java.lang.invoke.Invokers.checkExactType(Invokers.java:530)
                at jdk.internal.le/jdk.internal.org.jline.terminal.impl.ffm.Kernel32.ScrollConsoleScreenBuffer(Kernel32.java:239)
                ... 24 more

              jlahoda Jan Lahoda
              jlahoda Jan Lahoda
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: