Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError, Exception in thread "AWT-EventQ

843810Dec 27 2005
hi, i have a recursive method.. it works fine (it's when using wordWrap=true) when the StringBuffer input contains 2KB file. When parsing larger file (600KB) i got this exception:

Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
at xtext.breakLines(xtext.java:308)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:318)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breforumID=423, hi, i have a recursive method.. it works fine (it's when using wordWrap=true) when the StringBuffer input contains 2KB file. When parsing larger file (600KB) i got this exception:

Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
at xtext.breakLines(xtext.java:308)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:318)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:315)
at xtext.breakLines(xtext.java:318)

then it just repeats from line 318 to another ...

method source:

305 public String breakLines (StringBuffer input,int pos,int lineLength) {
306
307 if (wordWrap) {
308 if (input.length()>lineLength && pos <= input.length()) {
309 if (pos > 1) {
310 boolean currSpace = Character.isSpaceChar(input.charAt(pos));
311 if (currSpace) {
312 input.setCharAt(pos,eol);
313 breakLines (input%2
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 24 2006
Added on Dec 27 2005
0 comments
182 views