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.
Caused: java.lang.IllegalArgumentException: languagePath cannot be null at org.netbeans.lib.lexer.TokenHierarchyOperation.tokenSequenceList(TokenHierarchyOperation.java:340) at org.netbeans.api.lexer.TokenHierarchy.tokenSequenceList(TokenHierarchy.java:226) at org.netbeans.modules.html.editor.gsf.embedding.HtmlModel.extractHtml(HtmlModel.java:176) at org.netbeans.modules.html.editor.gsf.embedding.HtmlModel.getHtmlCode(HtmlModel.java:136) at org.netbeans.modules.html.editor.gsf.embedding.HtmlTranslatedSource.getSource(HtmlTranslatedSource.java:67) at org.netbeans.napi.gsfret.source.Source.moveToPhase(Source.java:880) at org.netbeans.napi.gsfret.source.Source$CompilationJob.run(Source.java:1206) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [catch] at java.lang.Thread.run(Thread.java:619) Caused: java.lang.NullPointerException at org.netbeans.lib.lexer.TextLexerInputOperation.<init>(TextLexerInputOperation.java:71) at org.netbeans.lib.lexer.batch.TextTokenList.createLexerInputOperation(TextTokenList.java:75) at org.netbeans.lib.lexer.batch.BatchTokenList.init(BatchTokenList.java:121) at org.netbeans.lib.lexer.batch.BatchTokenList.tokenOrEmbeddingContainerImpl(BatchTokenList.java:181) at org.netbeans.lib.lexer.batch.BatchTokenList.tokenOrEmbeddingContainer(BatchTokenList.java:176) at org.netbeans.api.lexer.TokenSequence.moveNext(TokenSequence.java:405) at org.netbeans.editor.ext.html.parser.SyntaxParser.parseDocument(SyntaxParser.java:354) at org.netbeans.editor.ext.html.parser.SyntaxParser.parseImmutableSource(SyntaxParser.java:169) at org.netbeans.modules.html.editor.gsf.HtmlGSFParser.parseFiles(HtmlGSFParser.java:75) at org.netbeans.napi.gsfret.source.Source.moveToPhase(Source.java:883) at org.netbeans.napi.gsfret.source.Source$CompilationJob.run(Source.java:1206) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [catch] at java.lang.Thread.run(Thread.java:619)
Not happening often, lowering priority.
looks like SyntaxParser.create(buffer) in HtmlGSFParser passed null as the argument. The buffer is got from Job.reader.read(file). Likely the first exception caused the virtual source not to be created and hence the second problem appeared. It looks like TokenHierarchy for the JSP document returned a list of possible language paths from TH.languagePaths() which didn't contain any html path. Since the paths are static AFAIK, the TokenHierarchy hasn't been active already. This is strange since the TH is created under readlock. Can the TH be inactive during the readlock in such case??? I'll add a check for the TH activity and test the found html path to null. fixed in revision 811ba2019848
Marek, you're right, the TH.languagePaths() returns Collections.emptySet() when TH is inactive. I'll change that - issue 129534.
Sorry, I was wrong the TH.languagePaths() SHOULD attempt TH activation. I've added an extra test to verify that (see issue 129534).