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.
Created attachment 113143 [details] stack trace I don't know how to reproduce it in NetBeans itself, so far it happens in Oracle Solaris Studio. Here is the top of the stack (see full stack in the attachment) java.lang.NullPointerException: Invalid doc parameter. Document may not be null! org.openide.text.NbDocument.checkDocParameter(NbDocument.java:462) org.openide.text.NbDocument.createPosition(NbDocument.java:208) org.openide.text.PositionRef$Manager$DocumentRenderer.run(PositionRef.java:976) org.openide.text.PositionRef$Manager$DocumentRenderer.render(PositionRef.java:895) org.openide.text.PositionRef$Manager$DocumentRenderer.renderToObject(PositionRef.java:913) org.openide.text.PositionRef$Manager$Kind.toMemory(PositionRef.java:487) org.openide.text.PositionRef.getPosition(PositionRef.java:155)
As I understand, the NPE is guaranteed as soon we reach PositionRef.java:894 with opCode == KIND_TO_MEMORY: DOCUMENT.set(mgr); this.run(); And in run we call NbDocument.createPosition(mgr.getDoc(), ...) And getDoc() is guaranteed to return null since DOCUMENT field contains mgr
It is 100% reproducible with Studio with Blacktie plugin, I can not share the code right here but can create a Studio w/plugin distribution and a demo project and send you a pointer.
OK, it would be nice to have the build available today since tomorrow we are branching the trunk. BTW could you please also check whether issue #21237 influences the problem or not? Thanks.
The only thing that I've found potentially wrong is not holding the document reference inside PositionRef.getPosition(). Hopefully it was the cause of the NPE. If not please reopen the issue. http://hg.netbeans.org/jet-main/rev/adfd6a18f9a1
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/adfd6a18f9a1 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #205026 - NPE in PositionRef.getPosition().