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 201505130001) VM: Java HotSpot(TM) 64-Bit Server VM, 25.45-b02, Java(TM) SE Runtime Environment, 1.8.0_45-b14 OS: Windows 7 User Comments: cezariusz: Closed a platform source file, after playing with collapse/expand. Stacktrace: java.lang.NullPointerException at javax.swing.text.JTextComponent.getCaretPosition(JTextComponent.java:1644) at org.netbeans.api.java.source.support.CaretAwareJavaSourceTaskFactory$ChangeListenerImpl.stateChanged(CaretAwareJavaSourceTaskFactory.java:187) at org.netbeans.api.java.source.support.OpenedEditors.fireChangeEvent(OpenedEditors.java:121) at org.netbeans.api.java.source.support.OpenedEditors.stateChanged(OpenedEditors.java:177) at org.netbeans.api.java.source.support.OpenedEditors$1.propertyChange(OpenedEditors.java:91) at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
Created attachment 153629 [details] stacktrace
Created attachment 153681 [details] stacktrace Edit java code. Set caret somewhere in text then scroll code down, so caret is goes beyond visible part. Close Editor
Created attachment 154224 [details] stacktrace Closed a bunch of tabs by repeatedly pressing ctrl+w
This bug already has 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=217274
Created attachment 154303 [details] stacktrace Closed last editor tab. Exception thrown.
Created attachment 154318 [details] stacktrace Closed last open code window
Created attachment 154643 [details] stacktrace Edit source code
Created attachment 155156 [details] stacktrace closed all open editors
This bug already has 10 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=217274
Created attachment 155213 [details] stacktrace Closing GUI design window
It seems that JTextField.caret is null for some reasons during JTextComponent.getCaretPosition() call: --------------- //TODO: are we in AWT Thread?: setLastPosition(OpenedEditors.getFileObject(c), c.getCaretPosition()); ---------------
Created attachment 155988 [details] stacktrace Closing some java source files open in the Editor by clicking on the x on the document tabs.
Fixed. http://hg.netbeans.org/jet-main/rev/08fe68440e4d
Integrated into 'main-silver', will be available in build *201509100002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/08fe68440e4d User: Miloslav Metelka <mmetelka@netbeans.org> Log: #252378 - NullPointerException at javax.swing.text.JTextComponent.getCaretPosition.