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 267354 - NullPointerException at org.netbeans.lib.lexer.inc.TokenListListUpdate.createJoinTokenListChange
Summary: NullPointerException at org.netbeans.lib.lexer.inc.TokenListListUpdate.create...
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Lexer (show other bugs)
Version: 8.2
Hardware: All All
: P1 normal with 5 votes (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-29 06:43 UTC by zmirc
Modified: 2019-02-03 15:49 UTC (History)
50 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 225493


Attachments
stacktrace (4.67 KB, text/plain)
2016-07-29 06:43 UTC, zmirc
Details
stacktrace (4.67 KB, text/plain)
2016-09-05 05:06 UTC, mihai
Details
stacktrace (4.78 KB, text/plain)
2016-09-15 14:36 UTC, mrpc
Details
message.log on crash with requested configuration on netbeans.conf (592.93 KB, application/octet-stream)
2016-09-22 01:35 UTC, amobilia
Details
message.log on Dev 201610020002 (46.72 KB, application/octet-stream)
2016-10-03 00:58 UTC, amobilia
Details
IDE log (147.26 KB, text/plain)
2016-11-06 14:15 UTC, zmirc
Details
IDE log with NB 201701030001 (136.57 KB, text/plain)
2017-01-03 15:42 UTC, zmirc
Details
UI log with NB 201701030001 (118.91 KB, text/plain)
2017-01-03 15:42 UTC, zmirc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zmirc 2016-07-29 06:43:37 UTC
This bug was originally marked as duplicate of bug 238292, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 201607230002)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.74-b02, Java(TM) SE Runtime Environment, 1.8.0_74-b02
OS: Windows 8

User Comments:
zmirc: I simply wrote "{" (1 character) in an HTML file containing a template view for AngualarJS.




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.lib.lexer.inc.TokenListListUpdate.createJoinTokenListChange(TokenListListUpdate.java:284)
   at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate$UpdateItem.update(TokenHierarchyUpdate.java:327)
   at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.processLevelInfos(TokenHierarchyUpdate.java:225)
   at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.updateImpl(TokenHierarchyUpdate.java:196)
   at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.update(TokenHierarchyUpdate.java:134)
   at org.netbeans.lib.lexer.TokenHierarchyOperation.textModified(TokenHierarchyOperation.java:605)
Comment 1 zmirc 2016-07-29 06:43:39 UTC
Created attachment 161490 [details]
stacktrace
Comment 2 amobilia 2016-08-31 16:14:18 UTC
Still available on dev 201608290002.
Break angular.js support

Netcat test [Web Client] AngularJS support -> Completion inside expressions

Type first {, when typing the second one, the exception reporter appears
Comment 3 amobilia 2016-08-31 16:16:53 UTC
Same problem when typing two "}"
Comment 4 Exceptions Reporter 2016-09-02 11:24:34 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=225493
Comment 5 mihai 2016-09-05 05:06:43 UTC
Created attachment 161904 [details]
stacktrace

type {{  in html file.
Comment 6 amobilia 2016-09-14 13:56:03 UTC
Still occurs on 8.2 RC
Comment 7 Christian Lenz 2016-09-14 14:20:26 UTC
I got this error by typing {{

java.lang.IndexOutOfBoundsException: index=1 >= size()=1
	at org.netbeans.lib.lexer.JoinTokenList.tokenList(JoinTokenList.java:195)
	at org.netbeans.lib.lexer.JoinLexerInputOperation.tokenList(JoinLexerInputOperation.java:215)
	at org.netbeans.lib.lexer.JoinLexerInputOperation.fetchActiveTokenList(JoinLexerInputOperation.java:208)
	at org.netbeans.lib.lexer.JoinLexerInputOperation.createJoinToken(JoinLexerInputOperation.java:272)
	at org.netbeans.lib.lexer.JoinLexerInputOperation.createPropertyTokenInstance(JoinLexerInputOperation.java:247)
	at org.netbeans.lib.lexer.LexerInputOperation.createPropertyToken(LexerInputOperation.java:362)
	at org.netbeans.spi.lexer.TokenFactory.createPropertyToken(TokenFactory.java:165)
	at org.netbeans.lib.html.lexer.HtmlLexer.token(HtmlLexer.java:1529)
	at org.netbeans.lib.html.lexer.HtmlLexer.createCssValueToken(HtmlLexer.java:1514)
	at org.netbeans.lib.html.lexer.HtmlLexer.resolveValueToken(HtmlLexer.java:1482)
	at org.netbeans.lib.html.lexer.HtmlLexer.nextToken(HtmlLexer.java:1429)
	at org.netbeans.lib.lexer.LexerInputOperation.nextToken(LexerInputOperation.java:215)
	at org.netbeans.lib.lexer.JoinTokenList.init(JoinTokenList.java:691)
	at org.netbeans.lib.lexer.JoinTokenList.create(JoinTokenList.java:99)
	at org.netbeans.lib.lexer.TokenListList.checkCreateJoinTokenList(TokenListList.java:172)
	at org.netbeans.lib.lexer.TokenListList.<init>(TokenListList.java:131)
	at org.netbeans.lib.lexer.TokenHierarchyOperation.tokenListList(TokenHierarchyOperation.java:498)
	at org.netbeans.lib.lexer.EmbeddingOperation.embeddedTokenList(EmbeddingOperation.java:197)
	at org.netbeans.api.lexer.TokenSequence.embeddedImpl(TokenSequence.java:373)
	at org.netbeans.api.lexer.TokenSequence.embedded(TokenSequence.java:320)
	at org.netbeans.modules.editor.lib2.highlighting.SyntaxHighlighting$HSImpl.moveTheSequence(SyntaxHighlighting.java:449)
	at org.netbeans.modules.editor.lib2.highlighting.SyntaxHighlighting$HSImpl.moveNext(SyntaxHighlighting.java:427)
	at org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$Wrapper.fetchNextHighlight(DirectMergeContainer.java:623)
	at org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$HlSequence.updateMergeVars(DirectMergeContainer.java:360)
	at org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$HlSequence.nextMerge(DirectMergeContainer.java:326)
	at org.netbeans.modules.editor.lib2.highlighting.DirectMergeContainer$HlSequence.moveNext(DirectMergeContainer.java:257)
	at org.netbeans.modules.editor.lib2.highlighting.HighlightsReader.readUntil(HighlightsReader.java:82)
	at org.netbeans.modules.editor.lib2.view.HighlightsViewFactory.restart(HighlightsViewFactory.java:191)
	at org.netbeans.modules.editor.lib2.view.ViewBuilder$FactoryState.init(ViewBuilder.java:1324)
	at org.netbeans.modules.editor.lib2.view.ViewBuilder.createViews(ViewBuilder.java:724)
	at org.netbeans.modules.editor.lib2.view.ViewBuilder.createReplaceRepaintViews(ViewBuilder.java:685)
	at org.netbeans.modules.editor.lib2.view.ViewUpdates.initParagraphs(ViewUpdates.java:231)
	at org.netbeans.modules.editor.lib2.view.DocumentViewOp.initParagraphs(DocumentViewOp.java:657)
	at org.netbeans.modules.editor.lib2.view.DocumentViewChildren.ensureParagraphsChildrenAndLayoutValid(DocumentViewChildren.java:537)
	at org.netbeans.modules.editor.lib2.view.DocumentViewChildren.paint(DocumentViewChildren.java:595)
	at org.netbeans.modules.editor.lib2.view.DocumentView.paint(DocumentView.java:720)
	at org.netbeans.modules.editor.lib2.view.EditorView.paint(EditorView.java:160)
	at javax.swing.plaf.basic.BasicTextUI$RootView.paint(BasicTextUI.java:1434)
	at javax.swing.plaf.basic.BasicTextUI.paintSafely(BasicTextUI.java:737)
	at javax.swing.plaf.basic.BasicTextUI.paint(BasicTextUI.java:881)
	at javax.swing.plaf.basic.BasicTextUI.update(BasicTextUI.java:860)
	at javax.swing.JComponent.paintComponent(JComponent.java:780)
	at javax.swing.JComponent.paint(JComponent.java:1056)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JViewport.paint(JViewport.java:728)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JLayer.paint(JLayer.java:433)
	at javax.swing.plaf.LayerUI.paint(LayerUI.java:79)
	at org.netbeans.core.multiview.SplitLayerUI.paint(SplitLayerUI.java:157)
	at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
	at javax.swing.JComponent.paintComponent(JComponent.java:780)
	at javax.swing.JLayer.paint(JLayer.java:428)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintToOffscreen(JComponent.java:5210)
	at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1579)
	at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1502)
	at javax.swing.RepaintManager.paint(RepaintManager.java:1272)
	at javax.swing.JComponent._paintImmediately(JComponent.java:5158)
	at javax.swing.JComponent.paintImmediately(JComponent.java:4969)
	at javax.swing.JLayer.paintImmediately(JLayer.java:415)
	at javax.swing.plaf.LayerUI.paintImmediately(LayerUI.java:717)
	at javax.swing.JLayer.paintImmediately(JLayer.java:410)
	at javax.swing.JComponent.paintImmediately(JComponent.java:4950)
	at javax.swing.RepaintManager$4.run(RepaintManager.java:831)
	at javax.swing.RepaintManager$4.run(RepaintManager.java:814)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:789)
	at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:738)
	at javax.swing.RepaintManager.access$1200(RepaintManager.java:64)
	at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1732)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Comment 8 mrpc 2016-09-15 14:36:51 UTC
Created attachment 162062 [details]
stacktrace

Editing a mix of html/javascript/php code.
Tried to type: 
placeholder_text_single: "<?php l('Please select an option');?>"

but when I was trying to type <?php, the last "p" could not be entered.
I pasted it from somewhere else, and then I couldn't close the php tag, my code was looking like:
placeholder_text_single: "<?php l('Please select an option');?
and when I was entering ">" nothing happened. I pasted it from somewhere else again and it was accepted.
Comment 9 mrpc 2016-09-15 15:43:10 UTC
(In reply to mrpc from comment #8)
> Created attachment 162062 [details]
> stacktrace
> 
> Editing a mix of html/javascript/php code.
> Tried to type: 
> placeholder_text_single: "<?php l('Please select an option');?>"
> 
> but when I was trying to type <?php, the last "p" could not be entered.
> I pasted it from somewhere else, and then I couldn't close the php tag, my
> code was looking like:
> placeholder_text_single: "<?php l('Please select an option');?
> and when I was entering ">" nothing happened. I pasted it from somewhere
> else again and it was accepted.

Running on:
Product Version: NetBeans IDE 8.2 RC (Build 201609131119)
Java: 1.8.0_101; Java HotSpot(TM) 64-Bit Server VM 25.101-b13
Runtime: Java(TM) SE Runtime Environment 1.8.0_101-b13
System: Mac OS X version 10.11.6 running on x86_64; UTF-8; en_US (
Comment 10 Miloslav Metelka 2016-09-20 08:36:01 UTC
I've been trying to reproduce the problem for several days including the AngularJS projects testing but no luck so far :(
If anyone who can reproduce consistently could run the IDE with the following loggers in netbeans.conf it should give us more info of what is wrong:

-J-Dorg.netbeans.lib.lexer.TokenList.level=FINER -J-Dorg.netbeans.lib.lexer.inc.TokenHierarchyUpdate.level=FINEST
-J-Dorg.netbeans.lib.lexer.inc.TokenListUpdater.level=FINEST
-J-Dorg.netbeans.lib.lexer.EmbeddingOperation.level=FINER

If the problem happens please attach the messages.log to the issue. Thanks.

During the search for the problem I've also fixed an access of token hierarchy without a read-lock from a template instantiation but that likely is not a culprit of the problem.
http://hg.netbeans.org/jet-main/rev/6627a4fc3e3f
Comment 11 Christian Lenz 2016-09-20 08:42:42 UTC
I can reproduce it again in 8.2 RC. I will test it with your info soon. I type { and when I type the second {, I got the NPE.
Comment 12 Miloslav Metelka 2016-09-20 14:03:33 UTC
Improved logging of identity hashcode for embedded token lists (in case the starting offset of ETL would get updated during reporting).
http://hg.netbeans.org/jet-main/rev/c60dd6895a6f
Comment 13 Quality Engineering 2016-09-21 02:00:13 UTC
Integrated into 'main-silver', will be available in build *201609210002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/6627a4fc3e3f
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #267354 - NullPointerException at org.netbeans.lib.lexer.inc.TokenListListUpdate.createJoinTokenListChange - fixed missing read lock during template instantiation problem.
Comment 14 amobilia 2016-09-22 01:35:44 UTC
Created attachment 162162 [details]
message.log on crash with requested configuration on netbeans.conf

Hi,

With the requested configuration on netbeans.conf & doing the same as I describe on comment #2 => crash :
- Exception reporter : http://statistics.netbeans.org/analytics/exception.do?id=831282

- message.log attached

Product Version = NetBeans IDE Dev (Build 201609210002)
Operating System = Windows 10 version 10.0 running on amd64
Java; VM; Vendor = 1.8.0_101
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.101-b13


-----
Maybe nothing to do with, I go a bug on the creation of the JS file => http://statistics.netbeans.org/analytics/exception.do?id=831281
Comment 15 Miloslav Metelka 2016-09-30 08:30:50 UTC
(In reply to amobilia from comment #14)
> Created attachment 162162 [details]
> message.log on crash with requested configuration on netbeans.conf
Thank you.
Recently I've fixed issue #243651 which might be a cause for this issue too I think.
Could you please test this problem in a daily build #201609280002 or later whether it's still reproducible? Thank you in advance.
Comment 16 amobilia 2016-10-03 00:58:48 UTC
Created attachment 162311 [details]
message.log on Dev 201610020002

(In reply to Miloslav Metelka from comment #15)
> (In reply to amobilia from comment #14)
> > Created attachment 162162 [details]
> > message.log on crash with requested configuration on netbeans.conf
> Thank you.
> Recently I've fixed issue #243651 which might be a cause for this issue too
> I think.
> Could you please test this problem in a daily build #201609280002 or later
> whether it's still reproducible? Thank you in advance.

The issue is still reproductible on Dev 201610020002
Comment 17 Jiri Kovalsky 2016-10-03 11:51:22 UTC
Candidate for NetBeans 8.2 Patch 1.
Comment 18 NBFan 2016-11-01 16:52:48 UTC
News about this bug?
Comment 19 Christian Lenz 2016-11-01 16:56:56 UTC
See the comment from Jirka: Candidate for NetBeans 8.2 Patch 1.
Comment 20 NBFan 2016-11-03 13:55:55 UTC
I want to know about the solution. This comment is old news.
Comment 21 zmirc 2016-11-06 14:15:09 UTC
Unfortunately it still happens in DEV 201611010002
Error happened after I wrote "{" inside an HTML file with Liquid template


---
layout: default-en
title: XXX Blog {
---
Comment 22 zmirc 2016-11-06 14:15:17 UTC
Created attachment 162801 [details]
IDE log
Comment 23 Miloslav Metelka 2016-12-06 17:53:13 UTC
(In reply to zmirc from comment #22)
> Created attachment 162801 [details]
> IDE log

Could you please test with the following extra logging (once it gets into nightly build)? Thanks.
http://hg.netbeans.org/jet-main/rev/1752c74110dd
Comment 24 zmirc 2016-12-07 16:16:52 UTC
(In reply to Miloslav Metelka from comment #23)
> Could you please test with the following extra logging (once it gets into
> nightly build)? Thanks.
> http://hg.netbeans.org/jet-main/rev/1752c74110dd

After a few quick tries, it doesn't seem to happen with build 20161207001. 
I'll pay attention next days to see if I can trigger it again, when I'll work again more intensively with Liquid templates.
Comment 25 Jenselme 2017-01-03 10:49:32 UTC
I just did some quick tests on an updated 8.2 with patch 1 and with build 201701030001. The error doesn't seem to occur. I see nothing in the log related to this.
Comment 26 zmirc 2017-01-03 15:30:09 UTC
It seems to happen again in NetBeans 201612070001, the version with which I tried after the debug log was added.
I simply wrote "{" (1 character) in an HTML file containing a template view for AngualarJS.

LOG:
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /media/mircea/Data/NetBeansProjects/wordmaps3-api/src/main/webapp took: 216 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 1 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /media/mircea/Data/NetBeansProjects/wordmaps4-desktop-uploader/src/main/resources took: 199 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /media/mircea/Data/NetBeansProjects/wordmaps4-desktop-uploader/src/main/java took: 262 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /media/mircea/Data/NetBeansProjects/wordmaps4-worker/src/main/java took: 22 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 1 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /media/mircea/Data/NetBeansProjects/wordmaps4-worker/src/main/resources took: 15 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /media/mircea/Data/NetBeansProjects/wordmaps4-worker/src/test/java took: 43 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /home/mircea/Documents/netbeans-dev-201612070001/webcommon/jsstubs/reststubs.zip took: 75 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /home/mircea/Documents/netbeans-dev-201612070001/webcommon/jsstubs/domstubs.zip took: 29 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /media/mircea/Data/NetBeansProjects/wordmaps4-desktop-uploader/src/test/resources took: 0 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /media/mircea/Data/NetBeansProjects/wordmaps3-spa/app took: 33 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /media/mircea/Data/NetBeansProjects/wordmaps4-spa/test took: 17 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /media/mircea/Data/NetBeansProjects/wordmaps4-worker/src/test/resources took: 14 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /media/mircea/Data/NetBeansProjects/wordmaps4-migration/src/test/resources took: 0 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /home/mircea/Documents/netbeans-dev-201612070001/webcommon/jsstubs/corestubs.zip took: 18 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
WARNING [org.netbeans.modules.javascript2.editor.parser.JsErrorManager]: No document found
WARNING [null]: Last record repeated 2 more times.
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /media/mircea/Data/NetBeansProjects/wordmaps4-spa/app took: 4,386 ms (New or modified files: 138, Deleted files: 16) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /media/mircea/Data/NetBeansProjects/wordmaps4-api/src/test/resources took: 25 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /media/mircea/Data/NetBeansProjects/wordmaps4-website took: 73 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /media/mircea/Data/NetBeansProjects/wordmaps4-shared/src/test/java took: 29 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /media/mircea/Data/NetBeansProjects/wordmaps4-api/src/main/webapp took: 142 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /media/mircea/Data/NetBeansProjects/wordmaps4-desktop-uploader/src/test/java took: 30 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 1 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /media/mircea/Data/NetBeansProjects/wordmaps4-shared/src/test/resources took: 33 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /media/mircea/Data/NetBeansProjects/wordmaps3-api/src/test/java took: 51 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: /media/mircea/Data/NetBeansProjects/wordmaps3-api/src/test/resources took: 23 ms (New or modified files: 0, Deleted files: 0) [Adding listeners took: 0 ms]
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Complete indexing of 35 source roots took: 6,303 ms (New or modified files: 138, Deleted files: 16) [Adding listeners took: 6 ms]
WARNING [org.netbeans.modules.versioning.util.Utils]: associateEncoding() no file object available for /tmp/vcs-1483456506959/vcs-1483456519224/action-token-cloud.html
log4j:WARN No appenders could be found for logger (nu.validator.source.LocationRecorder).
log4j:WARN Please initialize the log4j system properly.
INFO [org.netbeans.modules.parsing.impl.TaskProcessor]: Task: org.netbeans.modules.csl.hints.infrastructure.SuggestionsTask@4d3564bf : class org.netbeans.modules.csl.hints.infrastructure.SuggestionsTask ignored cancel for 3,152 ms.
SEVERE [global]
java.lang.NullPointerException
	at org.netbeans.lib.lexer.inc.TokenListListUpdate.createJoinTokenListChange(TokenListListUpdate.java:284)
	at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate$UpdateItem.update(TokenHierarchyUpdate.java:327)
	at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.processLevelInfos(TokenHierarchyUpdate.java:225)
	at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.updateImpl(TokenHierarchyUpdate.java:196)
	at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.update(TokenHierarchyUpdate.java:134)
	at org.netbeans.lib.lexer.TokenHierarchyOperation.textModified(TokenHierarchyOperation.java:605)
	at org.netbeans.spi.lexer.TokenHierarchyControl.textModified(TokenHierarchyControl.java:96)
	at org.netbeans.lib.lexer.inc.DocumentInput.textModified(DocumentInput.java:152)
	at org.netbeans.lib.lexer.inc.DocumentInput.removeUpdate(DocumentInput.java:145)
	at org.netbeans.lib.editor.util.swing.PriorityDocumentListenerList.removeUpdate(PriorityDocumentListenerList.java:116)
	at javax.swing.text.AbstractDocument.fireRemoveUpdate(AbstractDocument.java:259)
	at org.netbeans.editor.BaseDocument.fireRemoveUpdate(BaseDocument.java:1668)
	at org.netbeans.editor.BaseDocumentEvent.undo(BaseDocumentEvent.java:289)
	at org.netbeans.editor.GuardedDocumentEvent.undo(GuardedDocumentEvent.java:72)
	at org.netbeans.modules.editor.lib2.document.StableCompoundEdit.undo(StableCompoundEdit.java:93)
	at org.netbeans.editor.BaseDocument$AtomicCompoundEdit.undo(BaseDocument.java:2328)
	at org.netbeans.editor.BaseDocument.undoAtomicEdits(BaseDocument.java:2234)
	at org.netbeans.editor.BaseDocument.breakAtomicLock(BaseDocument.java:1841)
	at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:362)
	at org.netbeans.editor.BaseKit$DefaultKeyTypedAction.actionPerformed(BaseKit.java:1256)
	at org.netbeans.editor.ext.ExtKit$ExtDefaultKeyTypedAction.actionPerformed(ExtKit.java:1080)
	at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:347)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1663)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2882)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2929)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2845)
	at java.awt.Component.processEvent(Component.java:6310)
	at java.awt.Container.processEvent(Container.java:2236)
	at java.awt.Component.dispatchEventImpl(Component.java:4889)
	at java.awt.Container.dispatchEventImpl(Container.java:2294)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:806)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1074)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:945)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:771)
	at java.awt.Component.dispatchEventImpl(Component.java:4760)
	at java.awt.Container.dispatchEventImpl(Container.java:2294)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.awt.EventQueue$4.run(EventQueue.java:729)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Comment 27 zmirc 2017-01-03 15:42:21 UTC
Created attachment 163331 [details]
IDE log with NB 201701030001
Comment 28 zmirc 2017-01-03 15:42:47 UTC
Created attachment 163332 [details]
UI log with NB 201701030001
Comment 29 Christian Lenz 2017-01-04 16:26:06 UTC
With Patch 8.1 it still happens in this case:

<my-component data-test="{"></my-component>

when you try to type two times {{ you got the exception:

java.lang.NullPointerException
	at org.netbeans.lib.lexer.inc.TokenListListUpdate.createJoinTokenListChange(TokenListListUpdate.java:284)
	at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate$UpdateItem.update(TokenHierarchyUpdate.java:327)
	at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.processLevelInfos(TokenHierarchyUpdate.java:225)
	at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.updateImpl(TokenHierarchyUpdate.java:196)
	at org.netbeans.lib.lexer.inc.TokenHierarchyUpdate.update(TokenHierarchyUpdate.java:134)
	at org.netbeans.lib.lexer.TokenHierarchyOperation.textModified(TokenHierarchyOperation.java:605)
	at org.netbeans.spi.lexer.TokenHierarchyControl.textModified(TokenHierarchyControl.java:96)
	at org.netbeans.lib.lexer.inc.DocumentInput.textModified(DocumentInput.java:152)
	at org.netbeans.lib.lexer.inc.DocumentInput.removeUpdate(DocumentInput.java:145)
	at org.netbeans.lib.editor.util.swing.PriorityDocumentListenerList.removeUpdate(PriorityDocumentListenerList.java:116)
	at javax.swing.text.AbstractDocument.fireRemoveUpdate(AbstractDocument.java:259)
	at org.netbeans.editor.BaseDocument.fireRemoveUpdate(BaseDocument.java:1662)
	at org.netbeans.editor.BaseDocumentEvent.undo(BaseDocumentEvent.java:287)
	at org.netbeans.editor.GuardedDocumentEvent.undo(GuardedDocumentEvent.java:72)
	at org.netbeans.modules.editor.lib2.document.StableCompoundEdit.undo(StableCompoundEdit.java:93)
	at org.netbeans.editor.BaseDocument$AtomicCompoundEdit.undo(BaseDocument.java:2322)
	at org.netbeans.editor.BaseDocument.undoAtomicEdits(BaseDocument.java:2228)
	at org.netbeans.editor.BaseDocument.breakAtomicLock(BaseDocument.java:1835)
	at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:362)
	at org.netbeans.editor.BaseKit$DefaultKeyTypedAction.actionPerformed(BaseKit.java:1256)
	at org.netbeans.editor.ext.ExtKit$ExtDefaultKeyTypedAction.actionPerformed(ExtKit.java:1080)
	at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:339)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1663)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2882)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2929)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2845)
	at java.awt.Component.processEvent(Component.java:6312)
	at java.awt.Container.processEvent(Container.java:2236)
	at java.awt.Component.dispatchEventImpl(Component.java:4891)
	at java.awt.Container.dispatchEventImpl(Container.java:2294)
	at java.awt.Component.dispatchEvent(Component.java:4713)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:806)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1074)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:945)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:771)
	at java.awt.Component.dispatchEventImpl(Component.java:4762)
	at java.awt.Container.dispatchEventImpl(Container.java:2294)
	at java.awt.Window.dispatchEventImpl(Window.java:2750)
	at java.awt.Component.dispatchEvent(Component.java:4713)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.awt.EventQueue$4.run(EventQueue.java:729)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Comment 30 Christian Lenz 2017-02-23 10:32:15 UTC
This bug is really a pain in the ass, I have to type { space { and }} to remove the first space, I can't use the HTML editor for the angular2 template properly. It worked before in NB 8.1
Comment 31 Miloslav Metelka 2017-04-04 12:48:02 UTC
I've added token hierarchy restoration 
http://hg.netbeans.org/jet-main/rev/50c74c5ab2f6

Since almost all the failures are thrown during breakAtomicLock() and the original exception is not logged it looks like there was not a RuntimeException but an Error instance (or other Throwable successor) thrown in runAtomicAsUser() so I've fixed the runAtomicAsUser() to only catch RuntimeExceptions.
http://hg.netbeans.org/jet-main/rev/7b342d848273
Comment 32 Quality Engineering 2017-04-05 01:43:48 UTC
Integrated into 'main-silver', will be available in build *201704050002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/50c74c5ab2f6
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #267354 - NullPointerException at org.netbeans.lib.lexer.inc.TokenListListUpdate.createJoinTokenListChange - added token hierarchy recreation upon failure.
Comment 33 Quality Engineering 2017-04-06 02:52:23 UTC
Integrated into 'main-silver', will be available in build *201704060002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/7b342d848273
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #267354 - NullPointerException at org.netbeans.lib.lexer.inc.TokenListListUpdate.createJoinTokenListChange - only catching RuntimeExceptions in runAtomicLockAsUser().
Comment 34 Miloslav Metelka 2017-04-06 13:01:12 UTC
Anyone who is able to reproduce the problem with a high probability could you please attempt to reproduce with dev build *201704060002* or later and attach the messages.log to this issue?
Now you probably won't get the NPE in TokenListListUpdate.createJoinTokenListChange() but some sort of java.lang.Error e.g. an AssertionError.
The patch http://hg.netbeans.org/main-silver/rev/7b342d848273 improves the document handling in runAtomicAsUser() to reveal the original Throwable for errors rather than just calling the breakAtomicLock() which can throw another exception (e.g. in case the lexer processing was not copmleted for the original error) and it then hides the original exception.
Thanks.
Comment 35 batsk8 2019-02-03 15:17:17 UTC
The bug is still there as of 2019-02-03!

Netbeans was the only program in Java in the world that actually worked without crashing and eating all the memory. That's true. All Java programs are shit, only Netbeans was working fine. Until this bug came up!

It is so much pain that makes me want to switch to other IDE and dump Netbeans after 8 years of happy use.

This drives me crazy everyday. If you guys cannot fix such simple thing then how can I disable HTML/CSS/JS validation completely? It will be much easier than not being able to:
- type { two times {{
- type quotes in attributes after exception happens (for example <div data-ng-click= and here I cannot type quote after the = sign)
- use other template engines attributes outside HTML tags, inside HTML tags or HTML attributes.

For example, it's always a problem when I create a template for a 3rd-party system, like this:

<ul class="item-list{{?is_active}} active{{/?is_active}}">
{{#items}}
<li class="{{status}}"{{?is_disabled}} disabled{{/?is_disabled}}">{{name}}</li>
{{/#items}}
</ul>

Netbeans 8.2 GOES CRAZY with the above.

I don't need any HTML validation at all, only syntax highlighting. In fact, no one needs HTML validation!

Please fix this or give users the option to NOT PARSE HTML FILES.

Thank you!
Comment 36 Christian Lenz 2019-02-03 15:49:02 UTC
Hey batsk8,

please use NB 10, it should be fixed there. And if you still have problems with NB 10, create a ticket here: https://issues.apache.org/jira/projects/NETBEANS

NB 8.2 will not be supported anymore, it is Oracle, NetBeans is now a Apache product since NB 9.


Cheers

Chris