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.
In an internal program based on Netbeans platform 8.0.2, after opening and closing a CSS file several times, the syntax highlighting may not be executed (only comments are in gray) and/or the navigator is stuck with "Please wait". Doing any modification in the text editor updates both of them properly. I could only reproduce it once with Netbeans IDE 8.0.2 and 8.1. It look like the old bugs 175576 (2009) and 215180 (2012). == Investigation details == I don't know much about the editors design, and I tried to understand the logic as much as I could. === Traces === With the following command line parameter -J-Dorg.netbeans.modules.parsing.impl.TaskProcessor.level=100 , I can see that some tasks related to the parsing are cancelled: Finished CANCELED Task: Periodic request 867408075 to perform: org.netbeans.modules.csl.navigation.ClassMemberNavigatorSourceFactory$ProxyElementScanningTask@2edd3cec on: SourceCache 874077146: application-page.css There are similar lines for CssCaretAwareSourceTask, CaretListeningTask, SuggestionsTask, SelectionHintsTask, HintsTask, MarkOccurrencesHighlighter, etc... === Navigator issue === As far as I understand, the navigator is updated ("ClassMemberPanelUI.refresh") when "ClassMemberNavigatorSourceFactory$ProxyElementScanningTask" is completed. But in my case this task is cancelled because "CssParser" is also canceeled. === CssParser issue === I put some traces for methods of the class "Cssparser", and I got these two scenarios when opening a CSS. - OK: CssParser#parse CssParser#parse CssParser#cancel() CssParser#cancel() CssParser#parse CssParser#parse - KO CssParser#parse CssParser#parse CssParser#cancel() CssParser#cancel() CssParser#parse CssParser#parse CssParser#cancel() <=== added CssParser#cancel() In org.netbeans.modules.parsing.impl::TaskProcessor::CompilationJob::run(), currentResult = sourceCache.getResult(r.task) is null many times I tried to find when this "cancel()" is called, and it seems that it is triggered by "org.openide.text.DocumentOpenClose$DocumentLoad$1.run". Stack trace in attachment.
Created attachment 163807 [details] Stack traces when CssParser is cancelled Attached 2 stack traces showing that the CssParser is cancelled, in the case the bug is reproduced.