Bug 270745 - NullPointerException at org.netbeans.api.editor.caret.EditorCaret.maybeSaveCaretOffset
NullPointerException at org.netbeans.api.editor.caret.EditorCaret.maybeSaveCa...
Product: editor
Classification: Unclassified
Component: Painting & Printing
All All
: P2 (vote)
: Dev
Assigned To: Dusan Balek
: 270761 270762 270854 270967 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2017-05-26 11:02 UTC by muellermi
Modified: 2017-07-22 05:47 UTC (History)
15 users (show)

See Also:
Issue Type: DEFECT

stacktrace (2.54 KB, text/plain)
2017-05-26 11:02 UTC, muellermi
stacktrace (2.54 KB, text/plain)
2017-05-26 11:04 UTC, muellermi
stacktrace (1.43 KB, text/plain)
2017-05-26 11:07 UTC, muellermi
stacktrace (1.43 KB, text/plain)
2017-06-01 21:04 UTC, alied
stacktrace (3.87 KB, text/plain)
2017-06-01 21:07 UTC, alied
stacktrace (1.43 KB, text/plain)
2017-06-02 18:22 UTC, alied
stacktrace (1.43 KB, text/plain)
2017-06-13 10:19 UTC, Alexander Simon
stacktrace (1.43 KB, text/plain)
2017-06-13 16:28 UTC, athompson
stacktrace (1.43 KB, text/plain)
2017-06-13 16:31 UTC, athompson
stacktrace (1.43 KB, text/plain)
2017-07-04 14:16 UTC, Michel Graciano
stacktrace (1.43 KB, text/plain)
2017-07-07 17:01 UTC, Michel Graciano
stacktrace (1.43 KB, text/plain)
2017-07-12 18:46 UTC, Michel Graciano

Note You need to log in before you can comment on or make changes to this bug.
Description muellermi 2017-05-26 11:02:12 UTC
Build: NetBeans IDE Dev (Build 201705260001)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.131-b11, Java(TM) SE Runtime Environment, 1.8.0_131-b11
OS: Windows 7

User Comments:
muellermi: start NB

   at org.netbeans.api.editor.caret.EditorCaret.maybeSaveCaretOffset(EditorCaret.java:1071)
   at org.netbeans.api.editor.caret.EditorCaret.update(EditorCaret.java:2000)
   at org.netbeans.api.editor.caret.EditorCaret.access$400(EditorCaret.java:169)
   at org.netbeans.api.editor.caret.EditorCaret$7.run(EditorCaret.java:1945)
   at org.netbeans.api.editor.caret.EditorCaret.dispatchUpdate(EditorCaret.java:1954)
   at org.netbeans.api.editor.caret.EditorCaret.access$2500(EditorCaret.java:169)
Comment 1 muellermi 2017-05-26 11:02:13 UTC
Created attachment 164412 [details]
Comment 2 muellermi 2017-05-26 11:04:50 UTC
Created attachment 164413 [details]

Start NB
Comment 3 muellermi 2017-05-26 11:07:50 UTC
Created attachment 164414 [details]

switching to other source file
Comment 4 Exceptions Reporter 2017-05-31 11:16:55 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=229278
Comment 5 alied 2017-06-01 21:04:54 UTC
Created attachment 164449 [details]

placed the cursor mouse over a collapsed javadoc block
Comment 6 alied 2017-06-01 21:07:54 UTC
Created attachment 164450 [details]

tried to delete blank lines from a java source file in git source control
Comment 7 alied 2017-06-02 18:22:55 UTC
Created attachment 164456 [details]

placed the mouse cursor over a collapsed block of code
Comment 8 Alexander Simon 2017-06-13 10:19:17 UTC
Created attachment 164520 [details]

Open class file from library
Comment 9 athompson 2017-06-13 16:28:17 UTC
Created attachment 164527 [details]

opened class
Comment 10 athompson 2017-06-13 16:31:17 UTC
Created attachment 164528 [details]

happens when hovering mouse over collapsed javadoc
Comment 11 muellermi 2017-06-20 12:55:31 UTC
This bug occurs every few minutes or more. Thus I increased priority to P2. Might be better P1?
Comment 12 athompson 2017-06-23 15:13:19 UTC
(In reply to muellermi from comment #11)

It's very annoying but doesn't result in data loss so P2 is appropriate.
Comment 13 muellermi 2017-06-26 14:44:19 UTC
If this bug occurs and you send the bug report, it will occur again and you'll get stuck in an endless loop.
Workarround: Cancel exeption reporter twice and then it is finally possible to edit a source file.
Comment 14 Michel Graciano 2017-07-04 14:16:34 UTC
Created attachment 164689 [details]

Nothing out of ordinary
Comment 15 Peter Nabbefeld 2017-07-04 21:37:38 UTC
I've got the exception several times already, usually at startup, so I'd guess it has to do with some tasks performed during/after deserialization.

It's obviously happeding to the active window:
When I get the exception, it helps to close the active window to be able to work with NB. So it's probably caused by code during setting the active TopWindow after deserialization.
Comment 16 Michel Graciano 2017-07-07 17:01:36 UTC
Created attachment 164721 [details]

Just scrolling a Java file
Comment 17 Michel Graciano 2017-07-12 18:46:40 UTC
Created attachment 164749 [details]

Just scrolling a Java file
Comment 18 Dusan Balek 2017-07-21 09:08:54 UTC
*** Bug 270967 has been marked as a duplicate of this bug. ***
Comment 19 Dusan Balek 2017-07-21 09:09:43 UTC
*** Bug 270854 has been marked as a duplicate of this bug. ***
Comment 20 Dusan Balek 2017-07-21 09:11:02 UTC
*** Bug 270762 has been marked as a duplicate of this bug. ***
Comment 21 Dusan Balek 2017-07-21 09:11:37 UTC
*** Bug 270761 has been marked as a duplicate of this bug. ***
Comment 22 Dusan Balek 2017-07-21 09:28:39 UTC
Fixed in jet-main.

Comment 23 Quality Engineering 2017-07-22 02:32:35 UTC
Integrated into 'main-silver', will be available in build *201707220001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/a4159dc167d8
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #270745 - NullPointerException at org.netbeans.api.editor.caret.EditorCaret.maybeSaveCaretOffset - fixed.
Comment 24 alied 2017-07-22 05:47:40 UTC
interestingly, with Java 9 this doesn't happen:

Product Version: NetBeans IDE Dev (Build 201707050001)
Java: 9-internal; OpenJDK 64-Bit Server VM 9-internal+0-adhoc.alied.jdk9
Runtime: OpenJDK Runtime Environment 9-internal+0-adhoc.alied.jdk9
System: Linux version 4.11.11 running on amd64; UTF-8; en_US (nb)
User directory: /home/alied/.netbeans/dev
Cache directory: /home/alied/.cache/netbeans/dev

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo