Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      3

      Description

      I have written a very simple looping application to begin to use
      a-jar-stdio-terminal. I am running Java 1.05_11 on the Windows
      platform (but getting similar unpredictable behavior on Mac OS X with
      Java 1.5). Am including my source files (it is very basic). Is there some
      issue with the JTextPane area not being locked for read/write operations. I
      also read on the WWW that the setCaret method for one was not "thread-safe".
      I am somewhat new to Java and I would really really like to use the
      a-jar-stdio-terminal code, but I don't have the slightest idea what is wrong.
      (The a-jar-stdio-terminal demo also behaved in a similar manner, sometimes
      would work and then would produce an Exception. If you have any other tests
      you would like me to run, please let me know. Thanks in advance.

      import java.io.*;

      public class TerminalDemo {

      public static void main(String args[]) {
      String line;
      boolean not_exit = true;
      BufferedReader br = new BufferedReader(new InputStreamReader
      (System.in));
      while (not_exit) {
      System.out.print('>');
      try

      { line = br.readLine(); if ( line.equalsIgnoreCase("exit") || line.equalsIgnoreCase("quit") ) not_exit = false; System.out.println(line); }

      catch (IOException e)

      { // TODO Auto-generated catch block e.printStackTrace(); }

      } // end while

      } // end main

      } // end class TerminalDemo

      >some very simple inputs
      some very simple inputs
      >just a few more inputs
      just a few more inputs
      >and another set of inputs
      and another set of inputs
      >and yet another set of inputs
      and yet another set of inputs
      Exception in thread "AWT-EventQueue-0"
      java.lang.ArrayIndexOutOfBoundsException: 0>
      at javax.swing.text.BoxView.layoutMajorAxis(Unknown Source)
      at javax.swing.text.BoxView.setSpanOnAxis(Unknown Source)
      at javax.swing.text.BoxView.layout(Unknown Source)
      at javax.swing.text.FlowView.layout(Unknown Source)
      at javax.swing.text.BoxView.setSize(Unknown Source)
      at javax.swing.text.BoxView.updateChildSizes(Unknown Source)
      at javax.swing.text.BoxView.setSpanOnAxis(Unknown Source)
      at javax.swing.text.BoxView.layout(Unknown Source)
      at javax.swing.text.BoxView.setSize(Unknown Source)Exception in
      thread "AWT-EventQueue-0" Exception

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            sanjay_dasgupta
            Reporter:
            ankhman
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: