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 201412040001) VM: Java HotSpot(TM) 64-Bit Server VM, 25.25-b02, Java(TM) SE Runtime Environment, 1.8.0_25-b17 OS: Mac OS X User Comments: GUEST: editing java file bfanger: Selected a piece of javascript and pressed <backspace> to delete the selection. Stacktrace: java.lang.NullPointerException at javax.swing.text.JTextComponent.getCaretPosition(JTextComponent.java:1644) at org.netbeans.editor.Abbrev.isAbbrevDisabled(Abbrev.java:85) at org.netbeans.lib.editor.codetemplates.AbbrevDetection.isAbbrevDisabled(AbbrevDetection.java:317) at org.netbeans.lib.editor.codetemplates.AbbrevDetection.removeUpdate(AbbrevDetection.java:243) at org.openide.util.WeakListenerImpl$Document.removeUpdate(WeakListenerImpl.java:309) at org.netbeans.lib.editor.util.swing.PriorityDocumentListenerList.removeUpdate(PriorityDocumentListenerList.java:116)
Created attachment 150877 [details] stacktrace
Created attachment 151005 [details] stacktrace Trying to edit file
This bug already has 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=213792
Created attachment 151406 [details] stacktrace used "alt + left-arrow" to navigate to latest changed code (java)
*** Bug 248814 has been marked as a duplicate of this bug. ***
Created attachment 151510 [details] stacktrace Started editing a Java source file after a hiatus. As I typed, the document appeared with a bold tab (modified), but the new text did not appear, nor did the caret move. I closed the tab (Ctrl-W), agreeing to discard modifications, and reopened the file. Now it is behaving normally.
Created attachment 151623 [details] stacktrace Started CodeCompletion?
This bug already has 20 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=213792
Created attachment 151814 [details] stacktrace TRied to delete line (ctrl+e)
Created attachment 151850 [details] stacktrace NPE during duplication line using CTRL+SHIFT+arrow
Seems like a JDK problem - JTextComponent's public method called from AWT EDT. Workarounded in jet-main. http://hg.netbeans.org/jet-main/rev/df3d807bf501
Dusan, The NPE is being thrown when caret is null. caret is only set by JTextComponent.setCaret(). Who invoking this method? Maybe there is a race condition between the method that invokes the setter and Abbrev.isAbbrevDisabled()?
Integrated into 'main-silver', will be available in build *201502070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/df3d807bf501 User: Dusan Balek <dbalek@netbeans.org> Log: Issue #249108 - NullPointerException at javax.swing.text.JTextComponent.getCaretPosition - workarounded.