#1412 DirtyGutter + Save All reverts some files

closed-out-of-date
None
5
2013-10-08
2011-04-21
Steve
No

Save All has recently started failing. Rather than saving all the dirty buffers, some buffers are saved correctly while others seem to have been reverted, saved part way through the revert, and are still marked dirty. The file on drive may have, for example, one of three edits done and the other two not done, while the open buffer shows none of the edits done, but all of the edit lines marked dirty using the DirtyGutter plugin. If I use the Redo function, the edits all reappear, one by one. There seems to be no correlation with file type, folder location, etc. as I have seen two files of the same type (.c) in the same directory where one has the problem and the other does not.

I am using jEdit 4.5.pre1, daily builds from April 5, with Java 1.6.0_24 on WinXP64. I updated to the latest daily (April 13) and still see the same problem.

Discussion

  • Alan Ezust

    Alan Ezust - 2011-04-21

    is this a bug with the dirty gutter plugin or jedit itself?
    Can you describe the problem without using dirtygutter?

     
  • Steve

    Steve - 2011-04-21

    Sorry for the confusion. This has nothing to do with the DirtyGutter plugin, I was simply noting that it seems to indicate that some lines were actually changed AFTER the save, which is a symptom, not a cause. The problem happens with or without the plugin turned on.

     
  • Steve

    Steve - 2011-04-27

    I am beginning to wonder if my statement was correct. I turned off the DirtyGutter plugin a couple days ago, and I don't believe I have seen this happen since. So, this may indeed be a plugin bug. I am using version 0.2 of DirtyGutter, April 5 daily build.

     
  • Alan Ezust

    Alan Ezust - 2011-04-27
    • labels: 102668 -->
    • assigned_to: kpouer --> shlomy
    • summary: Save All reverts some files --> DirtyGutter + Save All reverts some files
     
  • Alan Ezust

    Alan Ezust - 2011-04-27

    Please describe some easy steps to reproduce with 2 test files, if possible.

     
  • Anonymous - 2011-04-28

    This might be caused by DirtyGutter, if you use the "simple" mode (i.e. "Dirty line provider" in the option pane is set to 'simple'). DirtyGutter (in "simple" mode only) actually runs an undo/redo procedure every time the buffer is saved in order to build its own support for undo/redo - since the core does not expose the undo list to plugins.
    I will try to check & fix this soon, but in the mean time you can switch to "Diff" mode - which does not perform any undo/redo, but instead compares the buffer to the file on disk.

     
  • Alan Ezust

    Alan Ezust - 2011-04-28

    perhaps diff mode should be the default in DirtyGutter for future versions until this is fixed?

     
  • Anonymous - 2011-04-29

    Thanks Alan.
    I just tried to reproduce this, but couldn't. Instead, I got another strange behavior of "save all" which is not related to DirtyGutter - it happens even when DirtyGutter is not installed. I have two buffers open. I make a change to one of them and select 'Save all'. I get a dialog asking me to verify that I want to save all. I answer 'Yes'. Then, a new untitled buffer is created automatically, and the "save all" action that I started before tried to save it, and opens the "save file as" dialog because this buffer is untitled... Neither of this should happen as a result of 'save all'.

     
  • Anonymous - 2011-04-29

    Steve, I just thought of something. Can you turn on the macro recorder,and try to reproduce this? Then you can submit the macro, it may give a clue of what happened.
    Alternatively, it would be useful to have a screencast showing the problem.

     
  • Steve

    Steve - 2011-05-06

    Sorry, I've been offline for a week. I've been using the daily build of DirtyGutter plugin, using Diff mode, for several days and have not seen this problem. I'll switch back to simple mode (temporarily, as I find I like the Diff mode better now) and see if I can reproduce the problem. If not, do you want me to revert to the prior daily I was using so I can capture the macro?

     
  • Anonymous - 2011-05-07

    No need, thanks. If you can't reproduce the problem, it is probably fixed.

     
  • Steve

    Steve - 2011-05-09

    Yes, simple mode still has the bug with the May 5th daily.

     
  • Anonymous - 2011-05-09

    Can you capture a macro until you get the buggy behavior?
    Also, can you specify the steps to reproduce?
    Thanks.

     
  • Steve

    Steve - 2011-05-09

    Steps to reproduce:

    Select 'Simple' mode in the Dirty Gutter plugin options
    Restart jEdit <=== Yes, I have found this step to be necessary, reload didn't seem to work the same.
    Open a bunch of buffers and edit several of them without saving.
    Issue the Save All command.
    Some of the time this works, other times it fails.
    Observe that one or more buffers is still "dirty" (I can spot it quickly because the Buffer Tabs plugin shows me dirty vs. clean on every buffer.)
    Of the buffers that are NOT marked dirty, observe that some are saved, but without some of the changes. In these buffers, issuing the Redo command will redo the edits that are missing.
    Of the buffers that ARE marked dirty, some will be in various states of editing, with some edits missing but others present. Again, Redo will bring the buffer up to where it was when you issued Save All.

    I will turn on macro record and post the result under separate cover.

     
  • Steve

    Steve - 2011-05-09

    source files, macro and 1st half of screenies

     
  • Steve

    Steve - 2011-05-09

    2nd half of screenines

     
  • Anonymous - 2012-02-29
    • assigned_to: shlomy --> nobody
     
  • Alan Ezust

    Alan Ezust - 2013-06-14
    • assigned_to: nobody --> shlomy
     
  • Anonymous - 2013-10-08

    Removed the "Simple" provider until the problems are resolved (if ever).
    I will add it again after some enhancement in the core APIs for exposing the undo/redo list for plugins.

     
  • Anonymous - 2013-10-08
    • status: open --> closed-out-of-date
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks