Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315203 - [Compatibility] Cannot close a workspace with editor missing
Summary: [Compatibility] Cannot close a workspace with editor missing
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.0 RC0   Edit
Assignee: Remy Suen CLA
QA Contact: Remy Suen CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-01 08:39 EDT by Paul Webster CLA
Modified: 2010-06-01 10:52 EDT (History)
1 user (show)

See Also:


Attachments
Full stack traces (13.45 KB, text/plain)
2010-06-01 08:39 EDT, Paul Webster CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Webster CLA 2010-06-01 08:39:51 EDT
Created attachment 170628 [details]
Full stack traces

I opened my workspace with the 4.0 SDK I20100531-2039, but I had not installed XML editors and tools.

On startup I got an error message:

2010-06-01 08:23:05.341 Log ErrorException while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/Context/context/SET] to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@57c757c7
org.eclipse.e4.core.di.InjectionException: org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException
...
Caused by: java.lang.NullPointerException
        at org.eclipse.ui.internal.EditorReference.<init>(EditorReference.java:87)
        at org.eclipse.ui.internal.WorkbenchPage.createEditorReferenceForPart(WorkbenchPage.java:546)
        at org.eclipse.ui.internal.WorkbenchPage.setup(WorkbenchPage.java:1673)


but eclipse came up.  But it would not shut down, it just opened an error dialog and stayed up:

!ENTRY org.eclipse.ui.workbench 4 2 2010-06-01 08:31:22.794
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.ui.internal.ide.WorkbenchActionBuilder.dispose(WorkbenchActionBuilder.java:774)
	at org.eclipse.ui.internal.WorkbenchWindow.hardClose(WorkbenchWindow.java:982)
	at org.eclipse.ui.internal.WorkbenchWindow.busyClose(WorkbenchWindow.java:694)
	at org.eclipse.ui.internal.WorkbenchWindow.access$3(WorkbenchWindow.java:673)

The full stack traces are in the attachment.

PW
Comment 1 Remy Suen CLA 2010-06-01 08:51:08 EDT
(In reply to comment #0)
> Caused by: java.lang.NullPointerException
>         at
> org.eclipse.ui.internal.EditorReference.<init>(EditorReference.java:87)

This happens if we don't have an editor descriptor. In this case, this is a perfectly valid state. I'll check what happens in 3.x and try to implement something similar in the 4.0 side.
Comment 2 Remy Suen CLA 2010-06-01 09:30:45 EDT
We have a similar problem for views, I'll fix that too.
Comment 3 Remy Suen CLA 2010-06-01 09:39:16 EDT
(In reply to comment #2)
> We have a similar problem for views, I'll fix that too.

Actually, in 3.x, the view just doesn't show up (instead of having an "error editor") so this'll require additional changes.
Comment 4 Remy Suen CLA 2010-06-01 10:52:12 EDT
I've opened bug 315232 for views and delivered a fix for editors.