| Summary: | PDE launcher deletes EVERY FILE in HOME DIR (and potentially on DISK) if configuration directory changed | ||
|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Eric Estievenart <eric.estievenart> |
| Component: | UI | Assignee: | Curtis Windatt <curtis.windatt.public> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | critical | ||
| Priority: | P3 | CC: | curtis.windatt.public, Michael_Rennie, remy.suen, tgdahle, thatnitind |
| Version: | 4.2 | ||
| Target Milestone: | 3.8 M4 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Bug Depends on: | 352808 | ||
| Bug Blocks: | |||
Note: after reopening the workspace, it seems that the config location was stored as empty in the preference page... Probably related to Bug 352808. The configuration area is not stored correctly. If this problem is also rooted in the changed on bug 309701, we will have to revert those changes in both 3.8 and 3.7.2. (In reply to comment #2) > Probably related to Bug 352808. The configuration area is not stored > correctly. If this problem is also rooted in the changed on bug 309701, we > will have to revert those changes in both 3.8 and 3.7.2. Using the steps provided I do not get the home directory being deleted and my stacktrace is slightly different: java.io.FileNotFoundException: /eclipse/eclipse/org.eclipse.update/platform.xml.tmp (No such file or directory) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:194) at java.io.FileOutputStream.<init>(FileOutputStream.java:145) at org.eclipse.update.internal.configurator.PlatformConfiguration.save(PlatformConfiguration.java:641) at org.eclipse.pde.internal.core.UpdateManagerHelper.createPlatformConfiguration(UpdateManagerHelper.java:88) at org.eclipse.pde.core.plugin.TargetPlatform.createPlatformConfiguration(TargetPlatform.java:208) at org.eclipse.pde.internal.launching.launcher.LaunchConfigurationHelper.createConfigIniFile(LaunchConfigurationHelper.java:192) at org.eclipse.pde.launching.EclipseApplicationLaunchConfiguration.getProgramArguments(EclipseApplicationLaunchConfiguration.java:105) at org.eclipse.pde.launching.AbstractPDELaunchConfiguration.launch(AbstractPDELaunchConfiguration.java:72) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:855) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:704) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:942) at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1146) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) I did notice that successive edits to my RCP launch configuration were being stung by bug 352808. Fixed as part of bug 352808, which will be backported to 3.7.2. http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=3c8b8ad36762f2efc95070079b0421118b542b76 On top of fixing how the config area is saved, I added a safeguard against deleting the home directory. Before the change, if no config area attribute was found in the config, we could potentially default to "" which can resolve to the home directory. Now we will default to the same area as we would if the 'use default config area' button was checked. We were never able to reproduce the home directory deletion. Though I am sure we have corrected the incorrect validation (bug 352808), it would be appreciated if the bug reporter (Eric) could verify. |
Build Identifier: 20110615-0604 trying to change the storage path for a pde runtime configuration makes the RCP launcher delete all files in a wrong folder (e.g. home folder). Reproducible: Always Steps to Reproduce: *** BEWARE DO NOT TRY TO REPRODUCE WITH A USER WHICH HAS ALL RIGHTS ON WHOLE FILESYSTEMS *** 1. Create a new user on your system, ensure it has only access on a reduced part of your disks (e.g. do not attempt to run on a fat32 filesystem. last warning!) 2. create some files/folders on the home dir just to verify they will disappear 3. launch eclipse (RCP/RAP build) 4. new / plugin project project name: rcp create rich client appication: yes template: "Hello RCP" finish 5. launch it once: right-click on project; run as eclipse app 6. open run configurations, and edit the last run config: in configuration tab, - uncheck "Use default location" - and set location to: ${workspace_loc}/rcp/config - check "Clear configuration area before launching" 7. click apply at that point the home folder looks like: $tree -d ~ ├── Desktop ├── NEW_FOLDER │ └── F2 └── WS └── rcp ├── bin │ └── rcp ├── icons ├── META-INF └── src └── rcp 8. click run => eclipse says "Failed to launch..." java.lang.RuntimeException: Application "rcp.application" could not be found in the registry. The applications available are: org.eclipse.equinox.app.error. at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:248) at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) 9. now list the home folder again: $tree -d ~ /tmp/etesthome ├── org.eclipse.core.runtime ├── org.eclipse.equinox.app ├── org.eclipse.osgi ├── org.eclipse.update └── WS ===> THE WHOLE HOME FOLDER HAS BEEN SCRAPPED