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.

Bug 253031 - NullPointerException at javax.swing.text.JTextComponent.getSelectionStart
Summary: NullPointerException at javax.swing.text.JTextComponent.getSelectionStart
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-16 21:22 UTC by _ gtzabari
Modified: 2015-07-03 01:19 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 217993


Attachments
stacktrace (1.51 KB, text/plain)
2015-06-16 21:22 UTC, _ gtzabari
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2015-06-16 21:22:43 UTC
Build: NetBeans IDE Dev (Build 201506100001)
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:
gtzabari: Attempted to close IDE. Exception thrown.




Stacktrace: 
java.lang.NullPointerException
   at javax.swing.text.JTextComponent.getSelectionStart(JTextComponent.java:1770)
   at org.netbeans.lib.editor.codetemplates.CodeTemplateCompletionProvider$Query.canFilter(CodeTemplateCompletionProvider.java:115)
   at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.refreshImpl(AsyncCompletionTask.java:197)
   at org.netbeans.spi.editor.completion.support.AsyncCompletionTask$1.run(AsyncCompletionTask.java:236)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
Comment 1 _ gtzabari 2015-06-16 21:22:45 UTC
Created attachment 154257 [details]
stacktrace
Comment 2 Dusan Balek 2015-07-01 14:37:39 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/b8fb2434cbf4

If you have reproducible steps to find why caret is null, I would like to investigate it more. I couldn't reproduce this issue.
Comment 3 _ gtzabari 2015-07-01 15:46:09 UTC
Perhaps it makes sense to add an assert() in front of "return false" to help you get future reports of how to reproduce this...
Comment 4 Quality Engineering 2015-07-03 01:19:40 UTC
Integrated into 'main-silver', will be available in build *201507030001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/b8fb2434cbf4
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #253031 - NullPointerException at javax.swing.text.JTextComponent.getSelectionStart - fixed.