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 259065 - NullPointerException at javax.swing.text.JTextComponent.getCaretPosition
Summary: NullPointerException at javax.swing.text.JTextComponent.getCaretPosition
Status: RESOLVED WORKSFORME
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Completion (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-29 14:54 UTC by soldatov
Modified: 2016-07-11 11:16 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 223807


Attachments
stacktrace (3.93 KB, text/plain)
2016-04-29 14:54 UTC, soldatov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2016-04-29 14:54:22 UTC
Build: IDE for C, C++, and Fortran (Oracle Developer Studio 12.5 [2016/04/22 59975fe2d5d6])
VM: Java HotSpot(TM) 64-Bit Server VM, 25.92-b14, Java(TM) SE Runtime Environment, 1.8.0_92-b14
OS: SunOS

User Comments:
soldatov: modify c++ file




Stacktrace: 
java.lang.NullPointerException
   at javax.swing.text.JTextComponent.getCaretPosition(JTextComponent.java:1644)
   at org.netbeans.modules.cnd.completion.cplusplus.CsmCompletionProvider$ToolTipQuery.canFilter(CsmCompletionProvider.java:507)
   at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.refreshImpl(AsyncCompletionTask.java:197)
   at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.refresh(AsyncCompletionTask.java:149)
   at org.netbeans.modules.editor.completion.CompletionImpl.refreshResultSets(CompletionImpl.java:1751)
   at org.netbeans.modules.editor.completion.CompletionImpl.access$2800(CompletionImpl.java:111)
Comment 1 soldatov 2016-04-29 14:54:24 UTC
Created attachment 159480 [details]
stacktrace
Comment 2 Alexander Simon 2016-07-11 11:16:12 UTC
I believe that NPE is consequence of:
INFO [org.netbeans.spi.lexer.MutableTextInput]: !!WARNING!! Missing READ-LOCK when accessing TokenHierarchy: input-source:org.netbeans.modules.editor.NbEditorDocument@2b26d83a, mimeType='text/x-c++', kitClass=null, length=97, version=10, file=org.netbeans.modules.cnd.source.CCDataObject@3ca2471d[/export/files/NB/CppApplication_1/main.cpp@da0e3936:4e7ece75]
It should be fixed in the bug 262248.