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

Bug 357065

Summary: NPE thrown after closing a commit editor while it's calculating a diff
Product: [Technology] EGit Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Kevin Sawicki <kevin>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, matthias.sohn
Version: 1.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Remy Suen CLA 2011-09-08 08:00:43 EDT
1. Open a large commit in the commit editor with a lot of changes.
2. Open the 'Diff' page.
3. Immediately hit Ctrl+W to close the editor.
4. An NPE will be thrown after the diff calculation is complete.

java.lang.NullPointerException
	at org.eclipse.egit.ui.internal.commit.DiffEditorPage$1$1.runInUIThread(DiffEditorPage.java:132)
	at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4140)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
Comment 1 Remy Suen CLA 2011-09-08 12:58:55 EDT
Technically, it shouldn't return null (see bug 357068) but it is what it is.
Comment 2 Kevin Sawicki CLA 2011-09-08 13:08:37 EDT
Proposed fix pushed to http://egit.eclipse.org/r/#change,4203
Comment 3 Matthias Sohn CLA 2011-09-08 19:11:17 EDT
merged as d6fc3769a79338c1d7fbfe9f370b116f36113c30
Comment 4 Dani Megert CLA 2011-10-11 04:45:56 EDT
(In reply to comment #1)
> Technically, it shouldn't return null (see bug 357068) but it is what it is.

I've fixed that.