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.
Attaching. Start happening to me after bigger refactoring of my project with broken sources. After IDE restart it start to work. I do not have any particular steps to reproduce.
Created attachment 38965 [details] NPE
Was it happening consistently after each redraw of screen in a particular source or was it just thrown each time when pressing Ctrl+F3?
I think that in all source files when pressed Ctrl-F3. But it did not happened to me since the restart.
It started to happen again. Always when I move cursor to some *unselected* word, like this: public static fi|nal String... and press Ctrl-F3 no the final the NPE is thrown. Pressing it again it works until I choose another *unselected* word.
It's happening quite often (P2). I've put debugging info into the culprit method. Is is due to "component.getUI().getEditorKit(component) == null" in TextSearchHighlighting.getMimeType()
I can't reporoduce it, but the change below should make the mime type detection more robust. AFAIK "component.getUI().getEditorKit(component) == null" can only happen after the UI is unistalled from the component, which would suggest that the NPE was thrown from a stale layer that should have already been GCed, but for some reason was not. There is no explicit call that would tell a layer that its job's done and it can safely unregister listeners, etc and quietly wait for GC to kill it, so it's hard to tell what happened - memory leak, lazy GC, ... When you said that it was happening quite often, did you find any way how to reproduce it? At least with certain probability ... Checking in TextSearchHighlighting.java; /cvs/editor/lib2/src/org/netbeans/modules/editor/lib2/highlighting/TextSearchHighlighting.java,v <-- TextSearchHighlighting.java new revision: 1.3; previous revision: 1.2 done
> When you said that it was happening quite often, did you find any way how to > reproduce it? At least with certain probability ... I didn't. It just started happening after some time working in the IDE. I'll update and try to watch closely the cause if something similar happens again. Actually I have a little old userdir and "semi-installed" Ruby support. Not sure if it could be somehow relative.