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.
Summary: | NullPointerException at javax.swing.text.JTextComponent.getCaretPosition | ||
---|---|---|---|
Product: | editor | Reporter: | bfanger |
Component: | Completion & Templates | Assignee: | Dusan Balek <dbalek> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | abalint21, akobberup, gtzabari, jglick, marfous, markiewb, tbrunhoff |
Priority: | P2 | ||
Version: | 8.1 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 213792 |
Attachments: |
stacktrace
stacktrace stacktrace stacktrace stacktrace stacktrace stacktrace |
Description
bfanger
2014-12-04 13:43:31 UTC
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. |