This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 55330 - Stringindexoutofbounds exception loop
Summary: Stringindexoutofbounds exception loop
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-22 03:56 UTC by ghbean
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Netbeans log (89.23 KB, text/plain)
2005-02-22 04:01 UTC, ghbean
Details
Extraction of snippet of source file containing long statement (32.24 KB, text/plain)
2005-02-22 14:15 UTC, ghbean
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ghbean 2005-02-22 03:56:45 UTC
When opening a specific xx.java file that has a
[Form] netbeans repeatedly displays window showing
Stringindexoutofbounds exception and requesting
report problem here. Does not stop until netbeans
is closed.
Comment 1 ghbean 2005-02-22 04:01:30 UTC
Created attachment 20446 [details]
Netbeans log
Comment 2 Martin Roskanin 2005-02-22 08:21:42 UTC
First exception already fixed - issue #43954
And StringIndexOutOfBoundsException seems to be a problem in java
module. Reassigning.
java.lang.StringIndexOutOfBoundsException: String index out of range:
-1283
	at java.lang.String.<init>(String.java:192)
	at java.lang.String.copyValueOf(String.java:2185)
	at
org.netbeans.modules.java.parser.DocumentModelBuilder.setBodyBounds(DocumentModelBuilder.java:105)
	at
org.netbeans.modules.java.gj.V8TreeTranslator._case(V8TreeTranslator.java:437)
... 
Comment 3 Martin Matula 2005-02-22 09:37:47 UTC
The code the exception stacktrace refers to was completely replaced in
NB 4.0 and is no longer called.
Comment 4 ghbean 2005-02-22 14:12:40 UTC
Thank you for the quick response.
For your information:
I found the apparant cause of the problem. There is a source line that
is 32,406 bytes long.  It has approx 32,380 blanks (0x20) appended to
the beginning of a statement, that had been in the file and not
modified for several weeks. I have no idea how these blanks were inserted.

When the problem appeared I had bee running a different application 
for several hours, netbeans was minimized and the source file with the
long statement was the focus file of the editor. The exception window
popped up as focus window.

I will attach a snipet of the source file containig the long
statement.       
Comment 5 ghbean 2005-02-22 14:15:00 UTC
Created attachment 20457 [details]
Extraction of snippet of source file containing long statement
Comment 6 Jiri Prox 2005-07-14 09:57:46 UTC
No longer relevant, verified.