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 154440 - NullPointerException at org.netbeans.modules.java.editor.semantic.TokenList$2.run
Summary: NullPointerException at org.netbeans.modules.java.editor.semantic.TokenList$2...
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Vitezslav Stejskal
URL: http://statistics.netbeans.org/except...
Keywords:
: 154751 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-12-03 12:08 UTC by Jindrich Sedek
Modified: 2009-02-19 21:09 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 143193


Attachments
stacktrace (3.19 KB, text/plain)
2008-12-03 12:08 UTC, Jindrich Sedek
Details
stacktrace (3.19 KB, text/plain)
2008-12-17 09:54 UTC, Petr Blaha
Details
stacktrace (7.29 KB, text/plain)
2008-12-19 16:19 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jindrich Sedek 2008-12-03 12:08:09 UTC
Build: NetBeans IDE Dev (Build 200812030201)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-rc2-b32
OS: SunOS, 5.11, x86

User Comments:
jsedek: Paste this code into JSP page:
---------------------------
    <%
            for (int i = 0; i < 100; i++) {
    %>
    h<%= i %>{
      color: <%=
    }
    <%  }%>
-----------------------------
NPE is thrown after opening and after every edit action in the JSP page

jsedek: Paste this code into JSP page:
---------------------------
    <%
            for (int i = 0; i < 100; i++) {
    %>
    h<%= i %>{
      color: <%=
    }
    <%  }%>
-----------------------------
NPE is thrown after opening and after every edit action in the JSP page



Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.java.editor.semantic.TokenList$.run(TokenList.java:127)
        at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1362)
        at org.netbeans.modules.java.editor.semantic.TokenList.moveToOffset(TokenList.java:95)
        at org.netbeans.modules.java.editor.semantic.SemanticHighlighter$DetectorVisitor.visitVariable(SemanticHighlighter.java:1095)
        at org.netbeans.modules.java.editor.semantic.SemanticHighlighter$DetectorVisitor.visitVariable(SemanticHighlighter.java:440)
        at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:724)
Comment 1 Jindrich Sedek 2008-12-03 12:08:21 UTC
Created attachment 74472 [details]
stacktrace
Comment 2 Jindrich Sedek 2008-12-03 12:21:29 UTC
the NPE is thrown pretty often while editing different JSPs -> P2
Comment 3 Jan Lahoda 2008-12-08 15:37:18 UTC
*** Issue 154751 has been marked as a duplicate of this issue. ***
Comment 4 Jindrich Sedek 2008-12-16 11:34:20 UTC
The exception is thrown pretty often - files are event not editable - the NPE is thrown after each key stroke -> P1
Comment 5 Vitezslav Stejskal 2008-12-17 09:05:03 UTC
I'm looking into it.
Comment 6 Petr Blaha 2008-12-17 09:54:45 UTC
Build: NetBeans IDE Dev (Build 081211)
VM: Java HotSpot(TM) 64-Bit Server VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33
OS: Linux, 2.6.27-9-generic, amd64

User Comments: 
Paste follwoging code snippet in jsp editor:
<%
            for (int i = 0; i < 100; i++) {
    %>
    h<%= i %>{
      color: <%=
    }
    <%  }%>


Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.java.editor.semantic.TokenList$2.run(TokenList.java:127)
        at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1362)
        at org.netbeans.modules.java.editor.semantic.TokenList.moveToOffset(TokenList.java:95)
        at org.netbeans.modules.java.editor.semantic.SemanticHighlighter$DetectorVisitor.visitVariable(SemanticHighlighter.java:1095)
        at org.netbeans.modules.java.editor.semantic.SemanticHighlighter$DetectorVisitor.visitVariable(SemanticHighlighter.java:440)
        at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:724)
Comment 7 Petr Blaha 2008-12-17 09:54:53 UTC
Created attachment 75074 [details]
stacktrace
Comment 8 Dusan Balek 2008-12-17 11:00:22 UTC
Fixed.

changeset 535c3efa4283 in main
details: http://hg.netbeans.org/main?cmd=changeset;node=535c3efa4283
Comment 9 Jindrich Sedek 2008-12-17 13:35:06 UTC
verified.
Comment 10 Petr Blaha 2008-12-17 13:37:46 UTC
Dusane, would merge the changes in release70_m1 clone? thanks Petr
Comment 11 Dusan Balek 2008-12-17 17:24:31 UTC
Integrated into release70_m1.

changeset 87f119a41573 in release70_m1
details: http://hg.netbeans.org/release70_m1?cmd=changeset;node=87f119a41573
Comment 12 Jindrich Sedek 2008-12-18 07:44:38 UTC
verified in M1
Thanks
Comment 13 Exceptions Reporter 2008-12-19 16:18:53 UTC
Build: NetBeans IDE Dev (Build 200812160201)
VM: Java HotSpot(TM) Client VM, 1.6.0_03-b05, Java(TM) SE Runtime Environment, 1.6.0_03-b05
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.java.editor.semantic.TokenList$2.run(TokenList.java:127)
        at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1362)
        at org.netbeans.modules.java.editor.semantic.TokenList.moveToOffset(TokenList.java:95)
        at org.netbeans.modules.java.editor.semantic.SemanticHighlighter$DetectorVisitor.visitIdentifier(SemanticHighlighter.java:875)
        at org.netbeans.modules.java.editor.semantic.SemanticHighlighter$DetectorVisitor.visitIdentifier(SemanticHighlighter.java:440)
        at com.sun.tools.javac.tree.JCTree$JCIdent.accept(JCTree.java:1689)
Comment 14 Exceptions Reporter 2008-12-19 16:19:03 UTC
Created attachment 75194 [details]
stacktrace
Comment 15 Quality Engineering 2008-12-22 15:10:24 UTC
Integrated into 'main-golden', will be available in build *200812221122* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/535c3efa4283
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #154440: NullPointerException at org.netbeans.modules.java.editor.semantic.TokenList$2.run - fixed.