Bug 561348 - Eclipse will fail to start after activating bundle for some new search proposals
Summary: Eclipse will fail to start after activating bundle for some new search proposals
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.12   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 4.16 M1   Edit
Assignee: Andrey Loskutov CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 561926
  Show dependency tree
 
Reported: 2020-03-22 23:08 EDT by Jin Shi CLA
Modified: 2020-05-15 12:59 EDT (History)
5 users (show)

See Also:


Attachments
Eclipse fail to start after activating bundle for some new search proposals (15.42 KB, image/png)
2020-03-22 23:08 EDT, Jin Shi CLA
no flags Details
eclipse log (45.97 KB, text/plain)
2020-03-22 23:09 EDT, Jin Shi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jin Shi CLA 2020-03-22 23:08:42 EDT
Created attachment 282183 [details]
Eclipse fail to start after activating bundle for some new search proposals

How to reproduce:
1. English build, default empty workspace
2. Start eclipse, press Ctrl+3 to open quick access panel, and input "t"
3. Click to activate "Activate bundle for 'Run' proposal"
4. Close and start eclipse again
then we get the error as attached
Comment 1 Jin Shi CLA 2020-03-22 23:09:32 EDT
Created attachment 282184 [details]
eclipse log

attaching log
Comment 2 Rolf Theunissen CLA 2020-03-23 12:46:50 EDT
A workaround [1] to get your eclipse launched is to comment the next line out in your eclipse.ini:

-Dosgi.dataAreaRequiresExplicitInit=true

[1] https://stackoverflow.com/questions/55245607/cannot-launch-eclipse-because-the-instance-data-location-has-not-been-specified/57688529#57688529
Comment 3 Andrey Loskutov CLA 2020-03-23 13:00:33 EDT
(In reply to Rolf Theunissen from comment #2)
> A workaround [1] to get your eclipse launched is to comment the next line
> out in your eclipse.ini:
> 
> -Dosgi.dataAreaRequiresExplicitInit=true
> 
> [1]
> https://stackoverflow.com/questions/55245607/cannot-launch-eclipse-because-
> the-instance-data-location-has-not-been-specified/57688529#57688529

This is not a workaround, it will start Eclipse always with *default* workspace in user home.
Comment 4 Rolf Theunissen CLA 2020-03-24 05:58:57 EDT
(In reply to Andrey Loskutov from comment #3)
> (In reply to Rolf Theunissen from comment #2)
> > A workaround [1] to get your eclipse launched is to comment the next line
> > out in your eclipse.ini:
> > 
> > -Dosgi.dataAreaRequiresExplicitInit=true
> > 
> > [1]
> > https://stackoverflow.com/questions/55245607/cannot-launch-eclipse-because-
> > the-instance-data-location-has-not-been-specified/57688529#57688529
> 
> This is not a workaround, it will start Eclipse always with *default*
> workspace in user home.

Indeed, I misunderstood that one. What does help is using the '-data' option on the command-line to specify the workspace.
Comment 5 Kalyan Prasad Tatavarthi CLA 2020-03-24 09:28:11 EDT
I have been able to reproduce this issue with the steps below using 4.15

Steps to reproduce.
1. Launch Eclipse. 
2. In "Eclipse SDK Launcher" Dialog set the workspace as "workspace"
3. Once Eclipse is launched, press Ctrl+3 to open quick access panel, and input "t"
4. Click to activate "Activate bundle for 'Run' proposal"
5. Close Eclipse
6. Launch Eclipse again

We get the error as attached.
Comment 6 Kalyan Prasad Tatavarthi CLA 2020-03-24 09:53:55 EDT
(In reply to Kalyan Prasad Tatavarthi from comment #5)
> I have been able to reproduce this issue with the steps below using 4.15
> 
> Steps to reproduce.
> 1. Launch Eclipse. 
> 2. In "Eclipse SDK Launcher" Dialog set the workspace as "workspace"
> 3. Once Eclipse is launched, press Ctrl+3 to open quick access panel, and
> input "t"
> 4. Click to activate "Activate bundle for 'Run' proposal"
> 5. Close Eclipse
> 6. Launch Eclipse again
> 
> We get the error as attached.

for step 6, launching eclipse from command prompt with -data option launches eclipse successfully.
Comment 7 Kalyan Prasad Tatavarthi CLA 2020-03-24 10:26:15 EDT
(In reply to Kalyan Prasad Tatavarthi from comment #6)
> (In reply to Kalyan Prasad Tatavarthi from comment #5)
> > I have been able to reproduce this issue with the steps below using 4.15
> > 
> > Steps to reproduce.
> > 1. Launch Eclipse. 
> > 2. In "Eclipse SDK Launcher" Dialog set the workspace as "workspace"
> > 3. Once Eclipse is launched, press Ctrl+3 to open quick access panel, and
> > input "t"
> > 4. Click to activate "Activate bundle for 'Run' proposal"
> > 5. Close Eclipse
> > 6. Launch Eclipse again
> > 
> > We get the error as attached.
> 
> for step 6, launching eclipse from command prompt with -data option launches
> eclipse successfully.

Also launching Eclipse with -clean option opens the workspace, without the error.
Comment 8 Andrey Loskutov CLA 2020-03-26 04:53:40 EDT
The problem originates in the bug 547250 that added possibility to start bundles on demand. The problem is, that bundle start options are *persisted* via this stack:

	at org.eclipse.osgi.container.Module.persistStartOptions(Module.java:685)
	at org.eclipse.osgi.container.Module.start(Module.java:427)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:439)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:458)
	at org.eclipse.ui.internal.quickaccess.QuickAccessExtensionManager$QuickAccessProviderExtensionProxy$1.execute(QuickAccessExtensionManager.java:77)

and because the bundle.start() caller doesn't provide any options, the settings are changed to 

settings.remove(Settings.USE_ACTIVATION_POLICY);

I have a fix.
Comment 9 Andrey Loskutov CLA 2020-03-26 04:55:20 EDT
Note: the right workaround is to run Eclipse once with "-clean" argument, to reset osgi settings to defaults.
Comment 10 Eclipse Genie CLA 2020-03-26 05:04:01 EDT
New Gerrit change created: https://git.eclipse.org/r/160021
Comment 12 Eclipse Genie CLA 2020-03-27 07:12:09 EDT
New Gerrit change created: https://git.eclipse.org/r/160090
Comment 13 Andrey Loskutov CLA 2020-03-27 07:37:22 EDT
Verified with I20200326-1800