public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug AWT/19862] New: Swing JTextField fails with StringIndexOutOfBoundsException
@ 2005-02-09 17:50 hendrich at informatik dot uni-hamburg dot de
  2005-02-09 18:27 ` [Bug AWT/19862] " hendrich at informatik dot uni-hamburg dot de
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: hendrich at informatik dot uni-hamburg dot de @ 2005-02-09 17:50 UTC (permalink / raw)
  To: java-prs

Entering text into a JTextField fails with an StringIndexOutOfBoundsException,
triggered by a problem in GapContent or AbstractDocument.getText().
Tested with gcc-4.0-20050130 snapshot and a current (2005.02.09) cvs
checkout of gui-branch-20040128:

java.lang.StringIndexOutOfBoundsException
   at java.lang.StringBuffer.substring(int, int) (/usr/lib/libgcj.so.6.0.0)
   at javax.swing.text.GapContent.getString(int, int)
(/usr/lib/lib-javax-swing.so.0.0.0)
   at javax.swing.text.AbstractDocument.getText(int, int)
(/usr/lib/lib-javax-swing.so.0.0.0)
   at javax.swing.text.FieldView.getPreferredSpan(int)
(/usr/lib/lib-javax-swing.so.0.0.0)


Testcase attached. Note that the calculator functionality is stripped off
to make the testcase shorter. (This is slightly unfair for gcj, because
the expression parser does work with gcj.)

-- 
           Summary: Swing JTextField fails with
                    StringIndexOutOfBoundsException
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: AWT
        AssignedTo: fitzsim at redhat dot com
        ReportedBy: hendrich at informatik dot uni-hamburg dot de
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19862


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug AWT/19862] Swing JTextField fails with StringIndexOutOfBoundsException
  2005-02-09 17:50 [Bug AWT/19862] New: Swing JTextField fails with StringIndexOutOfBoundsException hendrich at informatik dot uni-hamburg dot de
@ 2005-02-09 18:27 ` hendrich at informatik dot uni-hamburg dot de
  2005-02-13  0:20 ` [Bug SWING/19862] " pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: hendrich at informatik dot uni-hamburg dot de @ 2005-02-09 18:27 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From hendrich at informatik dot uni-hamburg dot de  2005-02-09 17:43 -------
Created an attachment (id=8158)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8158&action=view)
testcase

Just compile the class, then try entering an expression into the
JTextField on the bottom of the main window and press <return> or
press the <Execute> button.

Note that the program also triggers a few other bugs; it can be
tricky to tranfer the keyboard focus to the textfield in the 
first place....


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19862


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug SWING/19862] Swing JTextField fails with StringIndexOutOfBoundsException
  2005-02-09 17:50 [Bug AWT/19862] New: Swing JTextField fails with StringIndexOutOfBoundsException hendrich at informatik dot uni-hamburg dot de
  2005-02-09 18:27 ` [Bug AWT/19862] " hendrich at informatik dot uni-hamburg dot de
@ 2005-02-13  0:20 ` pinskia at gcc dot gnu dot org
  2005-06-03 14:54 ` roman at kennke dot org
  2005-08-24 19:30 ` [Bug swing/19862] " fitzsim at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-13  0:20 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-12 22:35 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|AWT                         |SWING
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-02-12 22:35:51
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19862


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug SWING/19862] Swing JTextField fails with StringIndexOutOfBoundsException
  2005-02-09 17:50 [Bug AWT/19862] New: Swing JTextField fails with StringIndexOutOfBoundsException hendrich at informatik dot uni-hamburg dot de
  2005-02-09 18:27 ` [Bug AWT/19862] " hendrich at informatik dot uni-hamburg dot de
  2005-02-13  0:20 ` [Bug SWING/19862] " pinskia at gcc dot gnu dot org
@ 2005-06-03 14:54 ` roman at kennke dot org
  2005-08-24 19:30 ` [Bug swing/19862] " fitzsim at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: roman at kennke dot org @ 2005-06-03 14:54 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From roman at kennke dot org  2005-06-03 14:54 -------
I have mostly fixed JTextArea in GNU Classpath. I think this can be close as
soon as it is merged into GCJ.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19862


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug swing/19862] Swing JTextField fails with StringIndexOutOfBoundsException
  2005-02-09 17:50 [Bug AWT/19862] New: Swing JTextField fails with StringIndexOutOfBoundsException hendrich at informatik dot uni-hamburg dot de
                   ` (2 preceding siblings ...)
  2005-06-03 14:54 ` roman at kennke dot org
@ 2005-08-24 19:30 ` fitzsim at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: fitzsim at redhat dot com @ 2005-08-24 19:30 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From fitzsim at redhat dot com  2005-08-24 19:30 -------
Fixed.  Closing.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19862


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-08-24 19:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-09 17:50 [Bug AWT/19862] New: Swing JTextField fails with StringIndexOutOfBoundsException hendrich at informatik dot uni-hamburg dot de
2005-02-09 18:27 ` [Bug AWT/19862] " hendrich at informatik dot uni-hamburg dot de
2005-02-13  0:20 ` [Bug SWING/19862] " pinskia at gcc dot gnu dot org
2005-06-03 14:54 ` roman at kennke dot org
2005-08-24 19:30 ` [Bug swing/19862] " fitzsim at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).