Community
Participate
Working Groups
There is a user said When I open a PHP file, a "Semantic Highlighting Job" task appears in the Progress view (if I have "Show sleeping and system operations" turned on). If I close the file before the job has completed, I get that error. If I wait for the job to complete, I don't. It doesn't seem to depend on the file's content. here is the stackprace: java.lang.NullPointerException at org.eclipse.wst.sse.ui.internal.style.SemanticHighlightingReconciler.addPosition(SemanticHighlightingReconciler.java:184) at org.eclipse.wst.sse.ui.internal.style.SemanticHighlightingReconciler.addPosition(SemanticHighlightingReconciler.java:166) at org.eclipse.wst.sse.ui.internal.style.SemanticHighlightingReconciler.reconcile(SemanticHighlightingReconciler.java:129) at org.eclipse.wst.sse.ui.internal.style.SemanticHighlightingReconciler$1.run(SemanticHighlightingReconciler.java:279) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) I think here should synchronized the block and then judge if fPresenter is null.
Created attachment 168278 [details] patch Cleans up the code to use the fJob* fields as was intended. Also added was some extra checks to make sure we don't continue processing regions after the reconciler's been uninstalled.
Nitin, could you review this for RC1? I think the reconciler running after the editor's been shutdown is a performance drag and we should also clean up this NPE to prevent unnecessary log messages.
Code checked in for RC1.