Bug 562812 - Two NPEs thorwn during save in some cases
Summary: Two NPEs thorwn during save in some cases
Status: CLOSED DUPLICATE of bug 560525
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.14   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-05 04:31 EDT by Arthur Daussy CLA
Modified: 2020-05-05 04:48 EDT (History)
0 users

See Also:


Attachments
NPE 1 (9.18 KB, text/plain)
2020-05-05 04:31 EDT, Arthur Daussy CLA
no flags Details
NPE2 (5.96 KB, text/plain)
2020-05-05 04:32 EDT, Arthur Daussy CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arthur Daussy CLA 2020-05-05 04:31:09 EDT
Hello,

In some case I get the two following NPEs when editing java files. When I reach a particular state, it prevents me from saving the file and each time I try to save it 2 NPEs are thrown. This state can't be reproduced easily (at least I have not succeeded yet to give you more information). Last time I have encountered it, I was editing the file in "Horizontal Split" mode. I don't know if it is linked because I think I already encountered this state without it.

I'm sorry I can't give more information. I have created this bug so those NPE are traced and maybe someone will recognize them and provide a nice, "step to reproduce".

----
java.lang.NullPointerException
	at org.eclipse.jdt.internal.ui.text.LineComparator.<init>(LineComparator.java:47)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility$2.getChangedLineRegions(EditorUtility.java:833)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility$2.run(EditorUtility.java:809)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.calculateChangedLineRegions(EditorUtility.java:782)
	at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.commitWorkingCopy(CompilationUnitDocumentProvider.java:1413)
----

----
java.lang.NullPointerException
	at org.eclipse.ui.texteditor.SelectMarkerRulerAction.includesRulerLine(SelectMarkerRulerAction.java:293)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaSelectAnnotationRulerAction.findJavaAnnotation(JavaSelectAnnotationRulerAction.java:160)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaSelectAnnotationRulerAction.update(JavaSelectAnnotationRulerAction.java:111)
	at org.eclipse.ui.texteditor.AbstractRulerActionDelegate.update(AbstractRulerActionDelegate.java:130)
	at org.eclipse.ui.texteditor.AbstractRulerActionDelegate.setActiveEditor(AbstractRulerActionDelegate.java:90)
	at org.eclipse.ui.internal.EditorPluginAction.editorChanged(EditorPluginAction.java:69)
	at org.eclipse.ui.internal.EditorActionBuilder$EditorContribution.editorChanged(EditorActionBuilder.java:78)
----

Complete logs in attachment
Comment 1 Arthur Daussy CLA 2020-05-05 04:31:41 EDT
Created attachment 282700 [details]
NPE 1
Comment 2 Arthur Daussy CLA 2020-05-05 04:32:08 EDT
Created attachment 282701 [details]
NPE2
Comment 3 Arthur Daussy CLA 2020-05-05 04:33:40 EDT
Extra information:

eclipse.application=org.eclipse.ui.ide.workbench
eclipse.buildId=4.14.0.I20191210-0610
eclipse.commands=-os
win32
-ws
win32
-arch
x86_64
-product
org.eclipse.epp.package.dsl.product
-vm
C:/dev/java/jdk-11.0.4+11/bin\client\jvm.dll
Comment 4 Noopur Gupta CLA 2020-05-05 04:48:22 EDT

*** This bug has been marked as a duplicate of bug 560525 ***