Markdown files truncated. Missing text

Steps to reproduce

Unfortunately, this is probably not reproducable for others. It happens randomly to me every day.

I add a dozen or so notes. When I come back to review them later on, they are missing text at the end of the markdown file.

Expected result

I expect that there would be no missing text.

Actual result

Text is missing.

Environment

  • Operating system: Linux Ubuntu 20.04
  • Obsidian version: 0.8.14

Additional information

My vault is inside a Dropbox managed directory. Using Dropbox version control history, I can see that the files are being changed on my desktop (the only computer I have using Dropbox). Here is an example. You can see that the file was truncated around 45 minutes after I edited it:

I don’t believe there is any other process on my computer that would cause the files to change. I only edit them using Obsidian, and I’ve never seen this issue with any other editors that I use.

This looks pretty serious. If in the future you have better repro step. Let me know.

Was obsidian open when the file got trimmed?
Were you editing the note when part of it got deleted?

Do you notice any patterns with the truncation? Is the file being truncated to the fixed size or number of characters?

Without repro steps that might give us a good idea as to where to look.

Yes, I leave Obsidian open all day. I was not editing the note when it was trimmed. I always come back to the file to check on it later, and notice that it is cut off.

I haven’t noticed if it is a fixed number of characters. I’ll try to capture some more details.

I just tried a test. I opened three files, one after another using Ctrl-O. I named them “Test File 1”, “Test File 2”, and Test File 3". I pasted the same contents into each file.

Then, I created three files using Ctrl-Z (my shortcut for the Zettelkasten plugin). Named them “Test Zettel 1”, “Test Zettel 2”, and “Test Zettel 3”.

Right after doing this, I went back to each note and found that several of the new files were completely empty.

Test File 1 and Test File 2 had the full content. Test File 3 was now empty.

Test Zettel 1 and 2 were both empty, and Test Zettel 3 had the full content.

In my Dropbox version control, I can see that the file was truncated right after I ran the Ctrl-Z command.

Any chance that Ctrl-Z triggers anything else on your computer?

Ctrl-z is the undo command (universally).

Try to remaap your new zettel to another shortcut and see what happens.

In Linux Ctrl-Z is a shell command stopping a running job

Remapping does seem a sensible first step. If problem stops, we know its something to do with that command.

it’s not a linux thing. Ctrl\Cmd-z is the shortcut for undo in almost any aditor.

I think @mattjbarlow is sending an undo command to the current open note and then it creates a new zettel.

I am 99% sure this is another case of

Yes! It works now. I remapped the new zetteltkasten to a different shortcut and ran the tests again. Mystery solved. Thank you so much for the help :grinning:

4 Likes