Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 215519 - [Preferences] Some preferences are not crash safe
Summary: [Preferences] Some preferences are not crash safe
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Compendium (show other bugs)
Version: 3.3   Edit
Hardware: All All
: P3 blocker (vote)
Target Milestone: 3.3.2   Edit
Assignee: equinox.compendium-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 195073
Blocks:
  Show dependency tree
 
Reported: 2008-01-16 11:57 EST by DJ Houghton CLA
Modified: 2008-01-18 15:43 EST (History)
26 users (show)

See Also:
Mike_Wilson: pmc_approved+


Attachments
patch (1.04 KB, patch)
2008-01-16 13:18 EST, DJ Houghton CLA
no flags Details | Diff
patch + version increment (1.71 KB, patch)
2008-01-16 17:52 EST, Thomas Watson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description DJ Houghton CLA 2008-01-16 11:57:29 EST
+++ This bug was initially created as a clone of Bug #195073 +++

Build ID: 3.3

Steps To Reproduce:
1. Start Eclipse on a new workspace
2. Modify some preferences
3. Export the preferences to a file
4. Switch to a new workspace
5. Import the preferences
6. Restart Eclipse


More information:

I've also had cases where I change a preference, then restart eclipse and the preference is not remembered, but I don't have exact steps to reproduce.  The steps above should be reproducible and will hopefully lead to root cause.
Comment 1 DJ Houghton CLA 2008-01-16 12:00:42 EST
Opened for consideration for 3.3.2.

Summary is that there are 2 methods to import preferences and one of them automatically saves right after the import, and the other doesn't. Therefore if you crash after importing, you might not have your values saved to disk.

Fix is low-risk and essentially one-line.

Adding Jeff as PMC member for approval.
Comment 2 Thomas Watson CLA 2008-01-16 12:54:40 EST
DJ, do you have a patch available to review for 3.3.2?
Comment 3 DJ Houghton CLA 2008-01-16 13:18:10 EST
Created attachment 87071 [details]
patch

Patch for org.eclipse.equinox.preferences for the 3.3.x stream.
Comment 4 Mike Wilson CLA 2008-01-16 15:11:34 EST
Seems like it's worth putting into 3.3.2.

Comment 5 Thomas Watson CLA 2008-01-16 17:52:14 EST
Created attachment 87113 [details]
patch + version increment

+1 to the code fix but, must also increment the bundle-version.
Comment 6 DJ Houghton CLA 2008-01-17 05:54:49 EST
Oops, thanks Tom. I incremented the bundle version in the patch for 3.2.2 but forgot in this one.
Comment 7 DJ Houghton CLA 2008-01-17 09:30:06 EST
Patch released to 3.3.x stream.

Mike I took your note in comment #4 as a +1 but could you add it officially in the pmc approval flag?

Thanks.