Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357065 - NPE thrown after closing a commit editor while it's calculating a diff
Summary: NPE thrown after closing a commit editor while it's calculating a diff
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 1.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Kevin Sawicki CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-08 08:00 EDT by Remy Suen CLA
Modified: 2011-10-11 04:45 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.