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 229747

Summary: StringIndexOutOfBoundsException: String index out of range: 4095
Product: editor Reporter: janario
Component: LexerAssignee: Miloslav Metelka <mmetelka>
Status: RESOLVED WONTFIX    
Severity: normal CC: chrisbad, ethermion, misterm, rodrigorsantos
Priority: P3    
Version: 7.4   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 200404
Attachments: stacktrace
stacktrace
stacktrace
stacktrace

Description janario 2013-05-14 17:59:10 UTC
Build: NetBeans IDE Dev (Build 20130514-e00842d1ecae)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.21-b01, Java(TM) SE Runtime Environment, 1.7.0_21-b11
OS: Linux

User Comments:
GUEST: .

janario: .

janario: .

ethermion: random background scanning of project.  Happens from time to time, especially on startup opening projects.

chrisbad: editing xhtml

janario: Right click on a maven project




Stacktrace: 
java.lang.StringIndexOutOfBoundsException: String index out of range: 4095
   at java.lang.String.substring(String.java:1907)
   at java.lang.String.subSequence(String.java:1946)
   at org.netbeans.lib.lexer.token.DefaultToken.text(DefaultToken.java:142)
   at org.netbeans.modules.html.HtmlDataObject.findEncodingOffsets(HtmlDataObject.java:285)
   at org.netbeans.modules.html.HtmlDataObject.findEncoding(HtmlDataObject.java:269)
   at org.netbeans.modules.html.HtmlDataObject.getFileEncoding(HtmlDataObject.java:250)
Comment 1 janario 2013-05-14 17:59:12 UTC
Created attachment 134441 [details]
stacktrace
Comment 2 Exceptions Reporter 2013-05-16 18:46:59 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=200404
Comment 3 misterm 2013-05-24 11:54:54 UTC
Created attachment 134859 [details]
stacktrace

Opening a project
Comment 4 misterm 2013-05-24 11:57:54 UTC
Created attachment 134860 [details]
stacktrace

.
Comment 5 misterm 2013-05-24 12:00:54 UTC
Created attachment 134861 [details]
stacktrace

.
Comment 6 Martin Balin 2015-09-17 10:59:40 UTC
Report from old NetBeans version. Due to code changes since it was reported likely to not happen. Feel free to reopen if happens in 8.0.2 or 8.1.