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.
Build: NetBeans IDE Dev (Build 20130716-aa12654ceedd) VM: Java HotSpot(TM) 64-Bit Server VM, 23.6-b04, Java(TM) SE Runtime Environment, 1.7.0_10-b31 OS: Mac OS X User Comments: mfukala: just tried to find usages on a class or id selector in plain css code pmaselkowski: Right clicked on css class definition (on selector name) in css file and then selected "Find usages" Stacktrace: java.lang.NullPointerException at org.netbeans.modules.css.refactoring.CssActionsImplementationProvider$TextComponentTask.run(CssActionsImplementationProvider.java:343) at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:593) at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:155) at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:139) at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:206) at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:203)
Created attachment 137545 [details] stacktrace
The css file remained in some weird state of being half way initialized (no semantic coloring for example, but CC, navigator worked I think) and I was able to reproduce the issue until I modified the file. Then it started working properly.
Another issue where ResultIterator obtained for css file returns null parser result. An invalidated CssParser instance seems to be reused by a new parsing task created by ParserManager.parse(Collections.singleton(source), ...); Seems to quite easily reproducible by starting the IDE, opening any css file and choosing "Find Usages" on any of the selectors in the file. Until the file is modified the problem remains. Passing to Tomas instead of duplicating as I'm not 100% sure this is the same problem as in issue 232789 and 233133
The problem is in CssParser, fixed jet-main a5ad1336c0c2 1st) The cancel has to check event.sourceChanged() 2nd) the cancel is written by other thread than it's accessed.
(In reply to comment #4) > The problem is in CssParser, fixed jet-main a5ad1336c0c2 > > 1st) The cancel has to check event.sourceChanged() > 2nd) the cancel is written by other thread than it's accessed. Thank you very much Tome! As for the SourceModificationEvent.sourceChanged() -- it's bit unintuitive and not much javadoc there. I'd assume that when I get such event the source was really modified. So does it mean that such change event can be obtained when "active" editor is changed?
Integrated into 'main-silver', will be available in build *201307242300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/a5ad1336c0c2 User: Tomas Zezula <tzezula@netbeans.org> Log: #233164:NullPointerException at org.netbeans.modules.css.refactoring.CssActionsImplementationProvider$TextComponentTask.run