Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 192302

Summary: null pointer exception while saving from a comparison editor
Product: [Eclipse Project] Platform Reporter: Andrew Bachmann <AndrewBachmann>
Component: CompareAssignee: Platform-Compare-Inbox <platform-compare-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: minor    
Priority: P3    
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Andrew Bachmann CLA 2007-06-12 18:36:22 EDT
I was performing a CVS synchronize and I had a comparison editor open on a single file.  I made an edit to the file, saved it, made another edit and tried to save.  At this point the save failed and the log had this error message.  I had to close the comparison editor and reopen it in order to be able to save from there again.

-- Error Log --
Date: Mon Jun 11 17:13:59 PDT 2007
Message: An internal error occurred during: "Update comparison Compare (filename-filename)".
Severity: Error
Plugin ID: org.eclipse.core.jobs
Stack Trace:
java.lang.NullPointerException
	at org.eclipse.jface.text.AbstractDocument.computeIndexInPositionList(AbstractDocument.java:472)
	at org.eclipse.jface.text.AbstractDocument.addPosition(AbstractDocument.java:356)
	at org.eclipse.compare.structuremergeviewer.DocumentRangeNode.registerPositionUpdater(DocumentRangeNode.java:105)
	at org.eclipse.compare.structuremergeviewer.DocumentRangeNode.<init>(DocumentRangeNode.java:98)
	at org.eclipse.jdt.internal.ui.compare.PropertiesStructureCreator$PropertyNode.<init>(PropertiesStructureCreator.java:57)
	at org.eclipse.jdt.internal.ui.compare.PropertiesStructureCreator.parsePropertyFile(PropertiesStructureCreator.java:261)
	at org.eclipse.jdt.internal.ui.compare.PropertiesStructureCreator.createStructureComparator(PropertiesStructureCreator.java:115)
	at org.eclipse.compare.structuremergeviewer.StructureCreator.getStructure(StructureCreator.java:66)
	at org.eclipse.compare.structuremergeviewer.StructureCreator.createStructure(StructureCreator.java:97)
	at org.eclipse.compare.structuremergeviewer.StructureDiffViewer$StructureInfo.createStructure(StructureDiffViewer.java:157)
	at org.eclipse.compare.structuremergeviewer.StructureDiffViewer$StructureInfo.refresh(StructureDiffViewer.java:135)
	at org.eclipse.compare.structuremergeviewer.StructureDiffViewer$3.run(StructureDiffViewer.java:88)
	at org.eclipse.compare.internal.Worker.performNextTask(Worker.java:116)
	at org.eclipse.compare.internal.Worker.run(Worker.java:63)
	at org.eclipse.compare.internal.WorkerJob.run(WorkerJob.java:30)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 1 Andrew Bachmann CLA 2007-06-12 18:38:19 EDT
I neglected to mention that this is Eclipse 3.3 RC 4.
Comment 2 Michael Valenta CLA 2007-06-18 11:52:31 EDT

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