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

Bug 172975

Summary: if target platform has an existing configuration two workbenches will launch
Product: [Eclipse Project] PDE Reporter: Mik Kersten <mik.kersten>
Component: UIAssignee: PDE-UI-Inbox <pde-ui-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, david_williams, ekuleshov
Version: 3.3   
Target Milestone: 3.3 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Mik Kersten CLA 2007-02-05 20:21:26 EST
It appears that with eclipse-SDK-I20070205-1300-win32 PDE "Eclipse Application" launch configurations can easily get into a state where two workbenches are launched instead of one.  Steps to reproduce:
* Download eclipse-SDK-I20070205-1300 and unzip to "eclipse-test"
* Create an eclipse-test/workspace folder within it
* Run eclipse.exe, set that folder as the workspace when prompted
* Close this Eclipse instance
* Run another workbench (e.g. your normal development workbench)
* Set the target platform to "eclipse-test"
* Create a launch configuration with a workspace location other than "eclipse-test"
* Run that launch configuration

The behavior that I see is that first the "eclipse-test" workspace will launch, then the one specified.

I did not do much testing of this, but if I delete the "eclipse-test/configuration" directory everything works as expected.  So perhaps both PDE and the configuration setting are telling the workspace to open to a particular location.
Comment 1 David Williams CLA 2007-02-08 09:53:59 EST
Honestly, I didn't believe this until I saw it with my own eyes (with recent I-build) ... weeiiirrrd stuff! 

Comment 2 Brian Bauman CLA 2007-02-08 11:26:02 EST
I am having problems reproducing this.  In the steps listed, for "Run another workbench (e.g. your normal development workbench)", was the development workbench I20070205-1300 or was it a previous build?  If it was a previous build, which build?  

I talked to David Williams and found when he saw the problem he was using M4 with the target platform pointed to I20070207-1800.  I have been unsuccessful running M4 and I20070206-0010 with the target platform being I20070206-0010.  I am downloading I20070207-1800 to try to reproduce on that build.  
Comment 3 Mik Kersten CLA 2007-02-08 11:40:05 EST
In my steps I was always using I20070205-1300, no other Eclipse versions.  When I said "run another workbench" I should have mentioned via "-data".  let me know if you can't reproduce, and I can try again with I20070207-1800.  As David points out the effect of this is *really* weird and causes a way longer runtime workbench startup time with no clear work-around, so if the bug is reproducible I think it would be very good to have this fixed for M5.
Comment 4 Brian Bauman CLA 2007-02-08 12:09:16 EST
Mik, thanks for your quick response.  I would imagine the problem didn't magically get fixed in the past couple days, so don't worry too much about trying the latest version (though if you have time, you might try it on the outside chance we get lucky).  

First, do you mind attaching the config.ini from the runtime workbench.  It will be in <workspace>/.metadata/.plugins/org.eclipse.pde.core/<workbench name>.  We did some config.ini work that reads the config.ini file of the target platform.  I was hoping to see if that might have caused the problem.

Second, I want to confirm how many java process are launched.  This should be in the Debug perspective.  Want to double check we aren't kicking off two different java processes.

Third, I just want to make sure I have the steps right.
1. Download the zip file (I20060205)
2. Unzip it into a directory
3. start the installation, and choose an arbitrary workspace (wasn't sure if it HAD to be a subfolder)
4. Close the running instance.  This should have created the configuration directory.

5. Run the installation again, with a -data to specify a workspace other than the one used in step 3.
6. Create a runtime workbench with unique workspace
7. Run.  Then two instances lauch.

Does that sounds right?  I left out resetting the target platform since it should automatically be set right when self hosting.
Comment 5 Mik Kersten CLA 2007-02-08 19:17:50 EST
I moved to eclipse-SDK-I20070208-1200 today and I can no longer reproduce this problem.  I'm not sure if this is a good or a bad thing!  I'm certain that I was not using M4 because that is not possible for me (due to working self-hosted).  There is on thing I was was doing differently on step 3 when I was able to reproduce this: 
* I would create an eclipse/workspace folder
* I would then run eclipse/eclipse.exe, point the dialog that came up at that (empty) folder, and click the option to always use that folder
* I would then do exactly what you say in steps 5, 6, 7

Unfortunate I no longer have the config.ini corresponding to the failure.  Sorry that I can't provide more information.  I'm confused now as to why this is no longer happening.  But if other people aren't reporting it perhaps there was something peculiar about my configuration.  The only interesting things I can think of is that I do have an extension directory (subclipse, findbugs and target management installed).  The only change between when when I was seeing this behavior and today is that I removed RSE (http://www.eclipse.org/dsdp/tm/) from my install.
Comment 6 Wassim Melhem CLA 2007-05-12 18:20:30 EDT
from the timing of the bug report, I suspect it had something to do with the new Equinox launching story, which has stabilized since.
Comment 7 Mik Kersten CLA 2007-05-14 11:29:52 EDT
Fyi, I haven't seen this problem on any workspaces since posting comment#5.