File data sometimes silently erased when the tangler fails!!!
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
leo-editor |
Fix Released
|
High
|
Edward K. Ream |
Bug Description
It seems that Leo doesn't always store file data inside the outline when the tangler fails to write the file data --- e.g., when the file pathname does not exist, when undefined sections are present, etc. Instead, sometimes Leo ***marks the file nodes as no longer being saved but silently discards the data so that it won't appear the next time the outline is opened!***
To experience this for yourself, try opening either of the attached files which contain examples of cases where the tangler can fail, and change file to @file. Save and quit Leo, and then open the file again. If you still see the children and content in bug.py, make a trivial change to it (to make bug.py dirty), save, quit, and open it again. Repeat this process a few times and you will eventually see that bug.py no longer has any content! The bug is nondeterministic, so sometimes its contents are lost on the first save (i.e., just after changing file to @file), sometimes it takes many iterations of this process for the contents to be lost.
And this isn't just a strange corner case bug that is unlikely to trip up users in practice, but one that has actually caused me to lose data and have to recreate a file from scratch *twice* so far, which is what led me to investigate what was going on.
Changed in leo-editor: | |
importance: | Undecided → High |
assignee: | nobody → Edward K. Ream (edreamleo) |
Changed in leo-editor: | |
status: | New → Fix Released |
On Tue, Jun 14, 2011 at 7:53 PM, Gregory Crosswhite
<email address hidden> wrote:
> It seems that Leo doesn't always store file data inside the outline when
> the tangler fails to write the file data
Many thanks for this report. I'll fix it today, with one or more unit tests.
Edward