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 144258 - [65cat] AssertionError: startOffset=-1073719903, endOffset=21476, inputSourceText.length()=21476
Summary: [65cat] AssertionError: startOffset=-1073719903, endOffset=21476, inputSource...
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Lexer (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Miloslav Metelka
URL: http://statistics.netbeans.org/except...
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2008-08-18 13:25 UTC by dafreels
Modified: 2008-09-24 05:58 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 93405


Attachments
stacktrace (4.13 KB, text/plain)
2008-08-18 13:25 UTC, dafreels
Details
stacktrace (4.37 KB, text/plain)
2008-09-05 14:47 UTC, goeh
Details
stacktrace (4.03 KB, text/plain)
2008-09-09 20:16 UTC, _ cgarcia
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dafreels 2008-08-18 13:25:20 UTC
Build: NetBeans IDE Dev (Build 200808170243)
VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_04-b12
OS: Windows XP, 5.1, x86

User Comments: 
The exception occirred while editting a javascript function embedded in an HTML file. I had just typed a variable name and then . plus the next character (c) when the exception occurred.

Stacktrace: 
java.lang.AssertionError: startOffset=-1073719903, endOffset=21476, inputSourceText.length()=21476
        at org.netbeans.lib.lexer.TextLexerInputOperation.<init>(TextLexerInputOperation.java:81)
        at org.netbeans.lib.lexer.inc.IncTokenList.createLexerInputOperation(IncTokenList.java:275)
        at org.netbeans.lib.lexer.inc.TokenListUpdater.updateRegular(TokenListUpdater.java:262)
        at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate$UpdateItem.update(TokenHierarchyUpdate.java:336)
        at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.processLevelInfos(TokenHierarchyUpdate.java:215)
        at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.updateImpl(TokenHierarchyUpdate.java:187)
Comment 1 dafreels 2008-08-18 13:25:36 UTC
Created attachment 67700 [details]
stacktrace
Comment 2 dafreels 2008-08-18 13:30:29 UTC
After the exception occurred, I cannot save the file or type any additional characters. I had to close the editor and
reopen the file. While closing the editor, Netbeans prompted me to save my work but reported the exception when I
clicked save. Attempting to close the editor again and choosing discard allowed me to close and reopen. Once reopened, I
was able to continue working.
Comment 3 Miloslav Metelka 2008-08-25 15:55:33 UTC
Could you please check whether you can reproduce in a dev build from Aug 24 or later? I've done several bugfixes since
2008/08/17 that might cause that this issue would possibly no longer appear. Thanks.
Comment 4 dafreels 2008-08-25 16:02:00 UTC
I am not able to reproduce this.
Comment 5 Exceptions Reporter 2008-09-04 02:59:11 UTC
This issue has already 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=93405
Comment 6 Martin Grebac 2008-09-04 11:25:44 UTC
I got the same exception in today's build. I did edit just Java files.
Comment 7 goeh 2008-09-05 14:47:55 UTC
Build: NetBeans IDE Dev (Build 200809050201)
VM: Java HotSpot(TM) Client VM, 10.0-b23, Java(TM) SE Runtime Environment, 1.6.0_07-b06
OS: Windows XP, 5.1, x86

User Comments: 
Editing GSP/HTML

Stacktrace: 
java.lang.AssertionError: startOffset=-1073737005, endOffset=2409, inputSourceText.length()=2409
        at org.netbeans.lib.lexer.TextLexerInputOperation.<init>(TextLexerInputOperation.java:81)
        at org.netbeans.lib.lexer.inc.IncTokenList.createLexerInputOperation(IncTokenList.java:275)
        at org.netbeans.lib.lexer.inc.TokenListUpdater.updateRegular(TokenListUpdater.java:264)
        at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate$UpdateItem.update(TokenHierarchyUpdate.java:346)
        at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.processLevelInfos(TokenHierarchyUpdate.java:221)
        at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.updateImpl(TokenHierarchyUpdate.java:193)
Comment 8 goeh 2008-09-05 14:47:59 UTC
Created attachment 69156 [details]
stacktrace
Comment 9 Exceptions Reporter 2008-09-08 22:05:58 UTC
This issue has already 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=93405
Comment 10 _ cgarcia 2008-09-09 20:15:53 UTC
Build: NetBeans IDE Dev (Build 080908)
VM: Java HotSpot(TM) Client VM, 10.0-b22, Java(TM) SE Runtime Environment, 1.6.0_06-b02
OS: Linux, 2.6.24-19-generic, i386

User Comments: 


Stacktrace: 
java.lang.AssertionError: startOffset=-1073730641, endOffset=7898, inputSourceText.length()=7898
        at org.netbeans.lib.lexer.TextLexerInputOperation.<init>(TextLexerInputOperation.java:81)
        at org.netbeans.lib.lexer.inc.IncTokenList.createLexerInputOperation(IncTokenList.java:275)
        at org.netbeans.lib.lexer.inc.TokenListUpdater.updateRegular(TokenListUpdater.java:264)
        at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate$UpdateItem.update(TokenHierarchyUpdate.java:346)
        at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.processLevelInfos(TokenHierarchyUpdate.java:221)
        at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.updateImpl(TokenHierarchyUpdate.java:193)
Comment 11 _ cgarcia 2008-09-09 20:16:02 UTC
Created attachment 69450 [details]
stacktrace
Comment 12 Miloslav Metelka 2008-09-10 09:48:19 UTC
So the issue seems to be random, right?
I'll try to inspect the code - looks like the tokens' offset gap length gets wrongly subtracted from the lexer restart info.
Comment 13 Miloslav Metelka 2008-09-11 16:39:57 UTC
I did not find the problem in the code so far so I've improved a logging that should hopefully give us more information.
http://hg.netbeans.org/main/rev/0466c3a9e22b
Comment 14 Quality Engineering 2008-09-12 06:04:50 UTC
Integrated into 'main-golden', will be available in build *200809120201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/0466c3a9e22b
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #144258 - AssertionError: startOffset=-1073719903, endOffset=21476, inputSourceText.length()=21476 - improved logging
Comment 15 Miloslav Metelka 2008-09-12 13:49:04 UTC
Text logging debugging improvement.
http://hg.netbeans.org/main/rev/c286b71559ff
Comment 16 Quality Engineering 2008-09-13 05:21:01 UTC
Integrated into 'main-golden', will be available in build *200809130201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/c286b71559ff
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #144258 - AssertionError: startOffset=-1073719903, endOffset=21476, inputSourceText.length()=21476 - log text
Comment 17 abetomohiro 2008-09-19 03:21:07 UTC
Build: NetBeans IDE Dev (Build 200808311401)
VM: Java HotSpot(TM) Client VM, 10.0-b23, Java(TM) SE Runtime Environment, 1.6.0_07-b06
OS: Windows XP, 5.1, x86

User Comments:
abetomohiro: I just clicked a source on source editor

patchinko: i was just editing php source code, and cursor just goes outside the line

pvercesi: Replacing parameter in a java function code.

goeh: Editing GSP/HTML

abetomohiro: I just clicked a source on source editor



Stacktrace: 
java.lang.AssertionError: startOffset=-1073737315, endOffset=7482, inputSourceText.length()=7482
        at org.netbeans.lib.lexer.TextLexerInputOperation.<init>(TextLexerInputOperation.java:81)
        at org.netbeans.lib.lexer.inc.IncTokenList.createLexerInputOperation(IncTokenList.java:275)
        at org.netbeans.lib.lexer.inc.TokenListUpdater.updateRegular(TokenListUpdater.java:264)
        at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate$UpdateItem.update(TokenHierarchyUpdate.java:346)
        at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.processLevelInfos(TokenHierarchyUpdate.java:221)
        at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.updateImpl(TokenHierarchyUpdate.java:193)
Comment 18 abetomohiro 2008-09-19 03:22:34 UTC
Build: NetBeans IDE Dev (Build 200808311401)
VM: Java HotSpot(TM) Client VM, 10.0-b23, Java(TM) SE Runtime Environment, 1.6.0_07-b06
OS: Windows XP, 5.1, x86

User Comments:
abetomohiro: when I was trying to save.

patchinko: i was just editing php source code, and cursor just goes outside the line

pvercesi: Replacing parameter in a java function code.

goeh: Editing GSP/HTML

abetomohiro: I just clicked a source on source editor

abetomohiro: when I was trying to save.



Stacktrace: 
java.lang.AssertionError: startOffset=-1073737315, endOffset=7482, inputSourceText.length()=7482
        at org.netbeans.lib.lexer.TextLexerInputOperation.<init>(TextLexerInputOperation.java:81)
        at org.netbeans.lib.lexer.inc.IncTokenList.createLexerInputOperation(IncTokenList.java:275)
        at org.netbeans.lib.lexer.inc.TokenListUpdater.updateRegular(TokenListUpdater.java:264)
        at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate$UpdateItem.update(TokenHierarchyUpdate.java:346)
        at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.processLevelInfos(TokenHierarchyUpdate.java:221)
        at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.updateImpl(TokenHierarchyUpdate.java:193)
Comment 19 Miloslav Metelka 2008-09-23 14:31:05 UTC
I have implemented automatic rebuilding of the token hierarchy upon a runtime exception which should eliminate this problem.
http://hg.netbeans.org/main/rev/821759b3ca39
Comment 20 Quality Engineering 2008-09-24 05:58:35 UTC
Integrated into 'main-golden', will be available in build *200809240201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/821759b3ca39
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #144258 - AssertionError: startOffset=-1073719903, endOffset=21476, inputSourceText.length()=21476 - implemented automatic rebuild of token hierarchy.