Bug 443427 - Undo/redo and Save Actions corrupting files (REOPEN 353379)
Summary: Undo/redo and Save Actions corrupting files (REOPEN 353379)
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.4   Edit
Hardware: PC Windows 8
: P3 critical with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2014-09-05 13:10 EDT by Robert Platt CLA
Modified: 2015-01-30 06:43 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Platt CLA 2014-09-05 13:10:39 EDT
There have been lots of fresh reports of "Bug 353379 - Undo/redo in java editor causes unrecoverable file corruption" since May 2012.

However, there's no feedback from Eclipse team since then. I suspect it is being overlooked because the issue is "RESOLVED WORKSFORME". Originally the issue was one reporter and one developer, but with numerous reports I don't think an individual "Works for me" really sticks anymore. It may be something that is only easy to see in real-world use.

I'm opening a new issue to ensure that this is acted upon, as there is definitely an issue, and extremely serious one. Irreversibly corrupting work is about as bad as it gets.

Please do not close this issue as a duplicate until 353379 is reopened!
Comment 1 Dani Megert CLA 2014-09-05 13:27:23 EDT
In which version do you see it?
Is there anything in the .log?
Can you provide steps to reproduce it or help in any other way to debug/fix it?
Comment 2 Robert Platt CLA 2014-09-05 13:31:34 EDT
I'll try to, but the original bug has lots of new logs and information already...
Comment 3 Dani Megert CLA 2014-09-15 10:15:36 EDT
(In reply to Robert Platt from comment #2)
> I'll try to,

Yes, please.


> but the original bug has lots of new logs and information
> already...

Yes,  but no steps.
Comment 4 Robert Platt CLA 2014-09-15 12:42:25 EDT
> > but the original bug has lots of new logs and information
> > already...
> 
> Yes,  but no steps.

Well, there are many efforts to provide steps in a number of comments; clearly there is more to it, since not everyone can follow those steps and see the bug.

I've working on a cut-down project to reproduce this, and will even video it when successful, but starting I haven't reproduced it as a minimal project so far -- I need to try a adding back in whatever else I'm using (egit, maven, aspectj...) Needless to say this is slow going and I have many other demands on my time.

BUT the important thing is that this bug not be closed just because it is difficult to isolate. I'm willing to do my best, I just ask the Eclipse dev team to respect that this bug is REAL.
Comment 5 Palmer Eldritch CLA 2014-09-15 12:52:33 EDT
It's a race condition - and those are difficult if not impossible to reproduce - you know that

Undo redo is interrupted by building workspace or organize imports or whatnot and once in a while boom.
Comment 6 Robert Platt CLA 2014-09-15 13:14:35 EDT
Absolutely, but it seems that unless somebody provides a test case written in blood, nothing is going to happen :-(
Comment 7 Dani Megert CLA 2014-10-14 04:11:57 EDT
(In reply to Robert Platt from comment #4)
> BUT the important thing is that this bug not be closed just because it is
> difficult to isolate. I'm willing to do my best, I just ask the Eclipse dev
> team to respect that this bug is REAL.

Yes, we can keep it open and help to reproduce it is very welcome, since we never ran into it so far, which would allow us to debug the problem.

Can you answer the following questions:
- In which version do you see it?
- You say "Irreversibly corrupting work"
  You can get the previous version(s) of the file from the local history. Did
  that not work?
Comment 8 Dani Megert CLA 2015-01-30 04:28:01 EST
Sorry, we can't do anything without further information.
Comment 9 Robert Platt CLA 2015-01-30 05:28:36 EST
Hi Dani,

I think this has got confused. Information about steps to reproduce were provided in the original bug #353379. As commented there the issue was observed in 4.4. The reason this new issue was opened was because I couldn't reopen the original issue myself, and there was no evidence that the Eclipse devs were looking at the comments on an issue marked "RESOLVED WORKSFORME". If this new report is where new comments should go, that is fine, but even so the previous comments for the original bug report should be taken into consideration before changing the status of this issue.

Regards restoring from local history, this can only recover changes that have been saved. Last time we had this during real work, we were pair programming during a major refactor, we hadn't actively saved much, so the local history wasn't much use.

That provides the further information requested.
Comment 10 Robert Platt CLA 2015-01-30 05:38:40 EST
As a general point, the problem we have is that the workaround is to disable the feature in eclipse which is related to the issue: reformatting on save. There is no evidence that Eclipse corrupts even with that feature disabled.

This workaround prevents the issue. It is too risky to use the save reformatting feature in a real project on a day-to-day basis. You won't find many volunteers masochistic enough to have their real work corrupted at a random point just to reproduce this bug and prove it still exists -- especially as the issue has now been thoroughly described by several different users IMHO (in the original issue).

I think you have to use the feature in the real world for a while before marking that this works for you.

So the question to the Eclipse devs: do you use automatic reformatting on save on a daily basis, i.e. do you use these Eclipse features, and have you used it for real-world refactoring? If a few Eclipse devs do so for a month or two and still no sign of the issue, then I can support marking this resolved again...
Comment 11 Dani Megert CLA 2015-01-30 05:49:15 EST
(In reply to Robert Platt from comment #10)
> So the question to the Eclipse devs: do you use automatic reformatting on
> save on a daily basis, i.e. do you use these Eclipse features, and have you
> used it for real-world refactoring? If a few Eclipse devs do so for a month
> or two and still no sign of the issue, then I can support marking this
> resolved again...


Robert, I did what you outlined in bug 353379 comment 25. I have over two hundred projects in my workspace and tried several times (formatting all, and also formatting only edited lines), plus I have format edited lines on save enabled during my daily work. Most Eclipse projects/devs in the top-level project (the SDK), have format edited lines on save enabled, and some even have that stored in their project settings.

Leaving this bug open sends the wrong signal: other people will think that the bug is open, and will get some attention, but it won't. However, if it is closed, and someone sees the same problem he might add some steps.
Comment 12 Robert Platt CLA 2015-01-30 06:13:06 EST
What refactoring steps did you try?
Comment 13 Dani Megert CLA 2015-01-30 06:15:12 EST
(In reply to Robert Platt from comment #12)
> What refactoring steps did you try?

For the concrete tests I used rename (type and method) and inline. But during my work I use many of the existing refactorings.
Comment 14 Robert Platt CLA 2015-01-30 06:43:35 EST
Right, now that's a lot clearer and I feel a bit more confident about this being marked resolved. I've just spoken to a colleague, they've been using the feature successfully with 4.4.1. Who knows, maybe this fixed it -- we'll monitor and see.

In terms of sending the wrong signal with an open bug report, I understand your reasoning but I'm not so sure you want people to think a long-standing issue isn't getting attention. I think that just annoys people, especially if there is no response. If you see in the original #353379 you'll understand why I've been hesitant to close this again:

- Palmer Eldritch October 2013. Reopen this please as it is certainly an issue... [followed by detailed report]

[No Response]

- Nicolas Bros October 2013. I'm seeing the same issue on Kepler SR 1 (Build id: 20130919-0819) I already opened Bug 332653 for this a long time ago...

[No Response]

- M F September 2014. It's near end of 2014 and this bug still exists. Hard to reproduce, but certainly an existing bug. And as this is annoying as hell it really needs to be fixed...

[No Response]

- Nicoloas Bros September 2014. I can confirm the issue still exists. When I undo redo many changes quickly the buffer often gets corrupted...

[No Response]

This ended with me opening a new issue and pestering you ;-)