Uploaded image for project: 'Aesh'
  1. Aesh
  2. AESH-96

recalling the history with the 'up' key is broken on Windows when the screen buffer size is breached

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 0.56, 0.33.14
    • 0.33.3, 0.33.5
    • main
    • None
    • Hide

      On windows, open a cmd.exe
      Open it's property window, then move to "layout"

      set, for example:

      screen buffer size - and same for Window Size

      • width 80
      • height 50

      Now run "jboss-cli.bat". No need to connect.

      Enter a number of random lines, so the windows content starts scrolling.
      At a given time, hitting the "up" key will trigger the exception.

      It's not entirely sure, but it seems the issue is triggered when a long line, e.g. one that wraps over more then one screen line, is recalled.

      Show
      On windows, open a cmd.exe Open it's property window, then move to "layout" set, for example: screen buffer size - and same for Window Size width 80 height 50 Now run "jboss-cli.bat". No need to connect. Enter a number of random lines, so the windows content starts scrolling. At a given time, hitting the "up" key will trigger the exception. It's not entirely sure, but it seems the issue is triggered when a long line, e.g. one that wraps over more then one screen line, is recalled.
    • Workaround Exists
    • Hide
      • increase the size of your command prompt buffer
        or
      • exit/restart your command prompt window once you have reached the number of lines in the buffer
      Show
      increase the size of your command prompt buffer or exit/restart your command prompt window once you have reached the number of lines in the buffer

      If the number of lines in the history gets larger then the screen buffer size and you use the "up" key to recall previous lines you get:

      [disconnected /] java.lang.NumberFormatException: For input string: "1B"
      at java.lang.NumberFormatException.forInputString(NumberFormatException.
      java:48)
      at java.lang.Integer.parseInt(Integer.java:458)
      at java.lang.Integer.<init>(Integer.java:660)
      at org.fusesource.jansi.AnsiOutputStream.write(AnsiOutputStream.java:120
      )
      at java.io.FilterOutputStream.write(FilterOutputStream.java:108)
      at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
      at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
      at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
      at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
      at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
      at java.io.PrintWriter.flush(PrintWriter.java:276)
      at org.jboss.aesh.terminal.WindowsTerminal.writeToStdOut(WindowsTerminal
      .java:88)
      at org.jboss.aesh.console.Console.drawLine(Console.java:953)
      at org.jboss.aesh.console.Console.redrawLine(Console.java:932)
      at org.jboss.aesh.console.Console.getHistoryElement(Console.java:695)
      at org.jboss.aesh.console.Console.parseOperation(Console.java:498)
      at org.jboss.aesh.console.Console.read(Console.java:389)
      at org.jboss.aesh.console.Console.read(Console.java:341)
      at org.jboss.as.cli.impl.Console$Factory$1.readLine(Console.java:177)
      at org.jboss.as.cli.impl.CommandContextImpl.interact(CommandContextImpl.
      java:1182)
      at org.jboss.as.cli.impl.CliLauncher.main(CliLauncher.java:259)
      at org.jboss.as.cli.CommandLineMain.main(CommandLineMain.java:34)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.modules.Module.run(Module.java:270)
      at org.jboss.modules.Main.main(Main.java:411)

              spederse@redhat.com Stale Pedersen
              tfonteyn Tom Fonteyne (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: