0-byte file (again) - note completely destroyed - v0.13.19 (Installer 0.13.14)

I know it’s a rare condition, but it’s not unique to my system. Others have reported it too. I would love to find the root cause of course. I suppose I could disable SIP and run dtruss for days, weeks, or longer to try to hit that bug…all the while eroding my system’s performance by tracing everything 24x7.

But I feel like this post I made above would be a better intermediate step and still be useful. Obsidian should be able to tell on its own accord whether file writes are successful. If it can’t even do that, then I don’t see how we can trust it for any serious data storage.

The dtruss command looks useful, it looks like it could be shortened to simply

dtruss -p $(pgrep ^Obsidian$)

or even possibly just

dtruss -n Obsidian

Why is the Renderer process not worth tracing? I thought I remember reading that a lot of the I/O was handled by that subprocess…

…all the while eroding my system’s performance by tracing everything 24x7.

Just dtrace obsidian. You actively use Obsidian 24x7?

Why is the Renderer process not worth tracing?

I never said the renderer process wasn’t worth tracing. Maybe develop a case of curiosity and try it? I’m not seeing what you and some others are seeing, but if I were and I was inclined to keep using obsidian, I would do what I could to figure out what was going on. I’m not sure waiting around for your suggestions to happen is a sound strategy.

I saw in another reply that you tend to make external edits? Even if Obsidian is somehow at fault here (far from proven by these anecdotes) it’s very likely some pattern of use is causing this. I’d want to know what it was.

Had this happen again yesterday to a large/detailed note. 0.14.15. Was able to recover it using file recovery. But there’s still a gremlin lurking somewhere deep below.

I believe I may have a clue now as to at least one of the triggers that can cause this complete destruction of a file.

If I remember correctly, what happened here is I switched to Obsidian and started typing immediately as soon as I saw the window appear.

The sequence I think I typed was ⌘N to create a new note, followed by the keys G-o-o-g-l-e. I was intending to type “Google Drive

I noticed that what actually happened was:

  1. I ended up on a new note with the filename “og” (chars 3 and 4 of what I typed) and no content. Here you can see that in my recent files list:

    File Recovery for og showing 0 B file:

  2. When I switched back to the note that I happened to be on when I pressed ⌘N (filename: “Archiware Pure free backup solution for VMware ESXi.md”) I saw it had been truncated to just the letters Go, screenshot:

  3. When I opened File Recovery to see if I could get the data back, I noticed 2 snapshots of the destroyed note had been created:

    first, this one (11kb) which seems to have all the data, with simply the letter G inserted at position 1, above the YAML frontmatter:

    then this one (2 bytes) which basically deleted all text and replaced it with Go:

    here is this same snapshot scrolled to the bottom

I hope this may be useful to @Licat to provide a clue as to how this could happen? It feels like a race condition.