Bug 18820 - Unable to restore editor when restarting
Summary: Unable to restore editor when restarting
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Update (deprecated - use Eclipse>Equinox>p2) (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 major (vote)
Target Milestone: ---   Edit
Assignee: Christophe Elek CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 18561 18958 21638 23484 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-06-03 13:24 EDT by Eduardo Pereira CLA
Modified: 2002-11-18 10:21 EST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eduardo Pereira CLA 2002-06-03 13:24:59 EDT
Build F2

1) Start F2 with new workspace.
2) Close it.
3) Start it again.

Got the dialog with the error message:
-An error has occurred while restoring the workbench: Serr error log for more 
details.

Contents from log file:
!ENTRY org.eclipse.ui 4 4 Jun 03, 2002 13:33:10.265
!MESSAGE Unable to restore editor - createElement returned null for input elemen
t factory: org.eclipse.ui.internal.dialogs.WelcomeEditorInputFactory
Unable to restore editor - createElement returned null for input element factory
: org.eclipse.ui.internal.dialogs.WelcomeEditorInputFactory
Comment 1 Nick Edgar CLA 2002-06-03 13:52:38 EDT
The error is probably for bug 18561.
Does this actually keep you from coming up the second time?
If so it sounds like a problem in our error handling as well.
Comment 2 Eduardo Pereira CLA 2002-06-03 13:59:14 EDT
Yes, it looks like a dup of bug 18561.
Just reproduced it and yes, it does not keep eclipse from starting up. 
Comment 3 Nick Edgar CLA 2002-06-03 14:21:28 EDT
What command line are you using?
Comment 4 Nick Edgar CLA 2002-06-03 14:22:49 EDT
*** Bug 18561 has been marked as a duplicate of this bug. ***
Comment 5 Nick Edgar CLA 2002-06-03 23:01:06 EDT
*** Bug 18958 has been marked as a duplicate of this bug. ***
Comment 6 Nick Edgar CLA 2002-06-05 16:54:48 EDT
Eduardo, what command line were you using?
Does this happen in the host or just the target?
Comment 7 Eduardo Pereira CLA 2002-06-06 09:28:10 EDT
** Command line:
D:\eduardo\desktop\eclipseDev\eclipse.exe -dev bin -data 
D:\eduardo\desktop\comp-workspace -debug -consoleLog -vm D:\ibm-jdk1.3
\jre\bin\java

** In the host. 
Comment 8 Randy Giffen CLA 2002-06-06 09:59:52 EDT
This may be due to the old workspace
1) Do you have any features listed in your Help>About>Feature Details dialog?
2) Does the problem go away if you exit, delete 
the .workspace/.config/platform.cfg file, restart?
Comment 9 Randy Giffen CLA 2002-06-06 11:31:26 EDT
We discovered that the features dialog is empty indicating that in the error 
case install/update is not reporting any features.
The problem is repoducable in the host simply by 
1) supplying the -dev bin parameter, 
2) starting a new workspace, exiting and restarting.
Moving to Update
Comment 10 Vlad Klicnik CLA 2002-06-06 12:09:02 EDT
-dev mode. Reducing priority, but will keel on F3 candidates list
Comment 11 Nick Edgar CLA 2002-07-22 13:03:57 EDT
*** Bug 21638 has been marked as a duplicate of this bug. ***
Comment 12 Nick Edgar CLA 2002-07-22 13:04:36 EDT
This is still confusing people.  Should consider for 2.1, if not for 2.0.1.
Comment 13 Knut Radloff CLA 2002-08-23 14:31:26 EDT
Update not reporting features when running with -dev parameter is causing grief 
when displaying welcome pages of new features. See bug 21041.
Running with -dev -update works.
Comment 14 Dejan Glozic CLA 2002-10-07 11:53:01 EDT
PDE and Update do not work well together. When launching the run-time workbench 
instance, PDE passes the list of plug-ins to run. It therefore takes over the 
role from the Update Core because in the 'normal' situation it is the Update 
Core that creates a list of plug-ins to run based on the configured features. 

When '-dev' switch is used, Update will automatically assume '-noupdate' 
switch. The Update team is NOT using PDE for selfhosting for this reason 
(nothing wrong with PDE in itself - it is just this fight over the plug-in path 
control that makes it a problem). We use the following:

1) Make a directory called 'update-area' or something in the Eclipse driver
2) Copy the 'features' folder into this directory
3) Copy the .eclipseproduct file into this directory
4) Make a 'plugins' folder in this directory
5) Start Eclipse by using -data <driver-location>/update-area/plugins
6) Set up the workspace
7) Create a Java project 'Update Launcher'
8) Import startup.jar file into this project and add it to the classpath
9) Launch this Java project by running 'main' method in the 'Main' class
found in startup.jar
10) Pass the following command line arguments:

-dev bin -debug -install file:/<driver-location>/update-area/ -update -data 
<driver-location>/update-ws

where 'driver-location' is your Eclipse installation (including eclipse 
directory e.g. d:/driver123/eclipse).

The mechanism above is of course much less user-friendly but helps when
self-hosting during any development that depends on features. Once
it is set up, it is maintenance-free. When debugging, you will be asked
for the source code locations - add your projects and it will work.
This is the closest you can get to running the instance on its own
when it comes to Install/Update.
Comment 15 Dejan Glozic CLA 2002-10-07 15:32:57 EDT
Note that when set up as above, the ad-hoc launcher does not know anything 
about restarts. When Update asks you if you want to restart the workbench, the 
process will terminate and nothing will happen. This is OK - our 'launcher' is 
not sophisticated enough to restart when a special value is returned from the 
second instance. Just restart the instance manually.
Comment 16 Andrew Irvine CLA 2002-10-07 16:26:57 EDT
*** Bug 23484 has been marked as a duplicate of this bug. ***
Comment 17 Dejan Glozic CLA 2002-11-18 10:21:43 EST
We will not address this problem due to a limitation in PDE self-hosting that 
will will probably not be addressed in 2.1.

In general, when self-hosting code that accesses features in any way, you must 
not use PDE launcher. Instead, use the mechanism defined on this defect. Update 
team uses this to self-host an debug Update Manager and related code.