Bug 396852 - -clean option in target platform does not get cleaned up restoring defaults
Summary: -clean option in target platform does not get cleaned up restoring defaults
Status: CLOSED WONTFIX
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.3   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-18 10:51 EST by Michael Rennie CLA
Modified: 2019-09-03 12:34 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Rennie CLA 2012-12-18 10:51:43 EST
Version: 4.3.0
Build id: I20121214-0730

Somehow I ended up with VM arguments in my target platform for my target workspace that contained '-clean'. Going to the target platform pref page and restoring defaults always makes the problem go away until the next time I launch my target workkspace. 

Poking around in the pde preferences for my target workspace I found:

vm_args=-clean -Xms40m -Xmx1024m -Xdock\:icon\=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
workspace_target_handle=local\:1352406207082.target

So even though I restore the defaults, it seems to not save that back to the preferences (in .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.pde.core.prefs)

Also note that:
1. the -clean option is not in my host launch configuration for the target workspace
2. the -clean option is not in my host eclipse
3. the -clean option is not in my eclipse.ini file
Comment 1 Michael Rennie CLA 2012-12-18 11:08:03 EST
Removing all target platforms, saving, reopening pref page and restoring defaults makes the preferences update corrrectly
Comment 2 Curtis Windatt CLA 2012-12-18 14:09:15 EST
When the PDE model loads if no default target exists yet (the preference page hasn't been opened) one is created from the preferences values.  Since the preferences had a -clean argument, the target would (and new launch configurations would as well).

The problem isn't consistently reproducible.  In new target workspaces the created target platform is equivalent to the default target platform.  Only when the ${eclipse_home} location had a bad configuration directory did the problem show.  This suggests that org.eclipse.pde.internal.launching.launcher.LaunchArgumentsHelper.getInitialVMArguments() at least some of the time is unable to get the vm args from framework admin and instead falls back on the preference value.

Restoring defaults on the preference page and pressing ok should overwrite the preferences.  Perhaps the preferences weren't flushed, though we do call org.eclipse.pde.internal.core.PDEPreferencesManager.savePluginPreferences() which flushes the instance scope preferences.
Comment 3 Eclipse Genie CLA 2019-09-03 12:34:16 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.