Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-ordering items in the outline causes data loss/text overwritting #1001

Closed
bnichs opened this issue Jan 19, 2022 · 1 comment
Closed

Re-ordering items in the outline causes data loss/text overwritting #1001

bnichs opened this issue Jan 19, 2022 · 1 comment
Labels
Milestone

Comments

@bnichs
Copy link

bnichs commented Jan 19, 2022

This one has been really hard to reproduce so I apologize for however vague this is, but the symptoms are that text is unrecoverably deleted so it seems important.

What I'm seeing is that if I have a structure like:

  • Folder
    • Chapter 1.md
    • Chapter 2.md

sometimes if i drag Chapter 2 to be in front of Chapter 1, Chapter 1 will be deleted and replaced with chapter 1. This does not happen every time or even in every project, but it happens. I suspect it has to do with the filenames colliding, but repro has been fairly hard to do with a blank project so something else is happening in the background which i dont understand.

The log I provide below is for a blank project but in order to repro, i did have to copy in actual text and actual titles, "Chapter 1" and "Chapter 2" wont do it, but for some reason my chapter titles do. In the log I had a chapter "Pressure drop" and then a few just called "New." When I dragged pressure drop to be at the top, it replaced "New." I was then able to continue until all 3 Texts were the same "Pressure Drop" chapter and all the "new" were gone.

Details that might matter:

  • AFAIK, this only happens with "revision mode" on, i haven't had enough luck reproducing to test otherwise.
  • I use folder save mode. Not sure if it matters, but the overlapping IDs log makes me wonder if the save format matters.
  • Every time it happens, the project is saved immediately. I'm sure this is just an event hook, but it makes irrevocable bugs like this a lot more painful because you can't even ctrl-z your way to safety.
  • I think this might be a symptom of the file names having the order in their name. I get that this is part of the file format chosen, but as a user, when I re-arrange texts, i don't ever expect the contents to change, just the metadata (names, order, etc).
OpenJDK Runtime Environment (build 11.0.13+8-Ubuntu-0ubuntu1.21.04)
OpenJDK 64-Bit Server VM (build 11.0.13+8-Ubuntu-0ubuntu1.21.04, mixed mode, sharing)
openjdk version "11.0.13" 2021-10-19
OpenJDK Runtime Environment (build 11.0.13+8-Ubuntu-0ubuntu1.21.04)
OpenJDK 64-Bit Server VM (build 11.0.13+8-Ubuntu-0ubuntu1.21.04, mixed mode, sharing)
Saving to: zip
Project ordering-test.msk saved.
Saving to: zip
Prose has been renamed (outline/0-New → outline/0-Prose)
 → We mark for moving: outline/0-New
Project ordering-test.msk saved.
Saving to: zip
New has been renamed (outline/0-Prose/0-New.md → outline/0-Prose/0-New-2.md)
 → We mark for moving: outline/0-Prose/0-New.md
Project ordering-test.msk saved.
Saving to: zip
Sunset has been renamed (outline/0-Prose/0-New-2.md → outline/0-Prose/0-Sunset.md)
 → We mark for moving: outline/0-Prose/0-New-2.md
New has been renamed (outline/0-Prose/1-New-3.md → outline/0-Prose/1-New.md)
 → We mark for moving: outline/0-Prose/1-New-3.md
Project ordering-test.msk saved.
Saving to: zip
Pressure drop has been renamed (outline/0-Prose/1-New.md → outline/0-Prose/1-Pressure_drop.md)
 → We mark for moving: outline/0-Prose/1-New.md
Project ordering-test.msk saved.
Saving to: zip
Project ordering-test.msk saved.
Saving to: zip
Project ordering-test.msk saved.
Saving to: zip
Sunset has been renamed (outline/0-Prose/0-Sunset.md → outline/0-Prose/0-Sunset-2.md)
 → We mark for moving: outline/0-Prose/0-Sunset.md
Pressure drop has been renamed (outline/0-Prose/1-Pressure_drop.md → outline/0-Prose/1-Pressure_drop-3.md)
 → We mark for moving: outline/0-Prose/1-Pressure_drop.md
Sunset has been renamed (outline/0-Prose/0-Sunset.md → outline/0-Prose/2-Sunset-2.md)
 → We mark for moving: outline/0-Prose/0-Sunset.md
Pressure drop has been renamed (outline/0-Prose/1-Pressure_drop.md → outline/0-Prose/3-Pressure_drop-3.md)
 → We mark for moving: outline/0-Prose/1-Pressure_drop.md
Project ordering-test.msk saved.
Saving to: zip
Pressure drop has been renamed (outline/0-Prose/1-Pressure_drop.md → outline/0-Prose/0-Pressure_drop-3.md)
 → We mark for moving: outline/0-Prose/1-Pressure_drop.md
Sunset has been renamed (outline/0-Prose/0-Sunset-2.md → outline/0-Prose/1-Sunset-2.md)
 → We mark for moving: outline/0-Prose/0-Sunset-2.md
Pressure drop has been renamed (outline/0-Prose/1-Pressure_drop-3.md → outline/0-Prose/3-Pressure_drop-3.md)
 → We mark for moving: outline/0-Prose/1-Pressure_drop-3.md
Project ordering-test.msk saved.
Loading: /home/ben/Documents/sleeping-thru.msk
Detected file format version: 1. Zip: True.
Loading /home/ben/Documents/sleeping-thru.msk (zip)
Reading labels:
* Add status: Idea (#ffff00)
* Add status: Note (#00ff00)
* Add status: Chapter (#0000ff)
* Add status: Scene (#ff0000)
* Add status: Research (#00ffff)
Reading status:
* Add status: TODO
* Add status: First draft
* Add status: Second draft
* Add status: Final
Reading plots:
* Add plot: Asher reincarnation
* Add plot: Asher ex gf
Reading World:
* Add worldItem: Baseline
* Add worldItem: New Orleans
Reading Characters:
* Adds Asher (0)
* Adds Nora (1)
* Adds The kid (2)
* Adds Bethany (3)
* Adds Leana (4)
Reading outline:
* Adds 0-New.md to Root (file)
* Adds 1-Prose to Root (folder)
* Adds 0-Pressure_drop-14.md to Prose (file)
* Adds 1-Pressure_drop-14.md to Prose (file)
* Adds 2-New.md to Prose (file)
Strange things in file %s
* Adds 2-Notes to Root (folder)
* Adds 0-Original_Notes.md to Notes (file)
* Adds 1-Trick_Reveal.md to Notes (file)
Strange things in file %s
* Appends revision (1642561519) to New
* Appends revision (1642555402) to Original Notes
* Appends revision (1642555445) to Original Notes
There are some items with overlapping IDs: ['14', '14']
WARNING> There are some items with overlapping IDs: ['14', '14']
Project /home/ben/Documents/sleeping-thru.msk loaded.
openjdk version "11.0.13" 2021-10-19
OpenJDK Runtime Environment (build 11.0.13+8-Ubuntu-0ubuntu1.21.04)
OpenJDK 64-Bit Server VM (build 11.0.13+8-Ubuntu-0ubuntu1.21.04, mixed mode, sharing)
openjdk version "11.0.13" 2021-10-19
OpenJDK Runtime Environment (build 11.0.13+8-Ubuntu-0ubuntu1.21.04)
OpenJDK 64-Bit Server VM (build 11.0.13+8-Ubuntu-0ubuntu1.21.04, mixed mode, sharing)
QPainter::begin: Paint device returned engine == 0, type: 2
WARNING> QPainter::begin: Paint device returned engine == 0, type: 2
Saving to: zip
Project sleeping-test.msk saved.
Saving to: zip
New has been renamed (outline/1-Prose/2-New.md → outline/1-Prose/0-New.md)
 → We mark for moving: outline/1-Prose/2-New.md
Pressure drop has been renamed (outline/1-Prose/1-Pressure_drop-14.md → outline/1-Prose/2-Pressure_drop-14.md)
 → We mark for moving: outline/1-Prose/1-Pressure_drop-14.md
Project sleeping-test.msk saved.
Saving to: zip
Project sleeping-test.msk saved.
Saving to: zip
Pressure drop has been renamed (outline/1-Prose/1-Pressure_drop-14.md → outline/1-Prose/0-Pressure_drop-14.md)
 → We mark for moving: outline/1-Prose/1-Pressure_drop-14.md
Project sleeping-test.msk saved.
@TheJackiMonster
Copy link
Collaborator

This might be related to issue #719 as well. I assume we definitely have to fix this drag & drop code before the next release. It seems to cause crashes as well (#918).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants