Not all data is saved when closing right after pasting a large amount of text

Steps to reproduce

Paste 20+MB of text, then: wait for it to appear, and instantly close the editor.

Did you follow the troubleshooting guide?

Y

Expected result

The file is fully saved.

Actual result

Part of the file is saved, potentially Obsidian can save no content at all.

Environment

SYSTEM INFO:
Obsidian version: v1.6.7
Installer version: v1.6.7
Operating system: Windows 10 Pro 10.0.xxxxx
Login status: not logged in
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 1
Restricted mode: off
Plugins installed: 0
Plugins enabled: 0


Additional information

Possible solutions:

  • Adding a save indicator, which optionally can have a ~0.2-0.3s delay for switching to state which means that all pending save operations finished processing.
  • Showing content greyed-out until its saved.

I have not been able to reproduce this problem yet.
Can you kindly post a screen recording of this happening in the sandbox vault and attach a link to file where this happens?

What are your computer specs exactly?

Thanks

How do you expect to detect this in Sandbox Vault which in turn isn’t ever saved?

My specs have 0 influence on the core issue.

I’m tired of this. You renamed the report so now it doesn’t imply the case when input is typed-in and there is a slowdown in the system.

Rest in peace Obsidian.

@WhiteNoise I can replicate this. Not using a Sandbox vault as it doesn’t save data as mentioned.

But if I:

  1. Create a new vault
  2. Paste in 20MB+ text data
  3. Wait for the text to appear then close the vault.

The data will not be fully inserted.

@acc_1993 seems like a very weird niche issue. Why not simply don’t immediately close the vault?

edit: Specs:

SYSTEM INFO:
	Obsidian version: v1.6.7
	Installer version: v1.6.7
	Operating system: #1 SMP PREEMPT_DYNAMIC Thu Aug  8 01:38:25 UTC 2024 6.10.3-269.rog.fc40.x86_64

13th Gen Intel(R) Core(TM) i9-13900H
NVIDIA GeForce RTX 3050 4GB
32 GB RAM

For reference: 26 MB file with over 4 million words. The entire text appears immediately and all of it is saved, even when pressing CMD V and CMD Q in under one second of each other.

M3 MBA
8 GB RAM
256 GB SSD

SYSTEM INFO:
	Obsidian version: v1.6.7
	Installer version: v1.6.7
	Operating system: Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:04 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T8122 23.6.0
	Login status: not logged in
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: off
	Plugins installed: 1
	Plugins enabled: 1
		1: Dataview v0.5.67
2 Likes

Just wanted to mention that the Sandbox vault, as far as I know (and seen), isn’t reset after each closing and opening of Obsidian :blush: .
(I’m not sure exactly what triggers the reset of the Sandbox vault though :see_no_evil:… because yes, at some point, it does go back to its initial state).

The message you get when opening the sandbox vault is there because in the earliest versions of Obsidian, some were actually using the sandbox vault as their main vault, not realising it was only a test/playground vault …

I just tried 4 times in a row and each time I re-opened the new file was non-existent.

Ooohhh I see :bulb: …
It does reset if you open the Sandbox vault (after closing it) by going to Help > Open Sandbox vault or opening it through the command palette … (So this is how the reset works :sweat_smile: )

But it won’t reset if you leave the sandbox vault open but quit and reopen Obsidian though :blush: (at least, not on my Mac)

Sandbox vault

1 Like

The sandbox vault does not reset if you open it via the vault switcher.

1 Like

Can you post a screen recording in your new vault?

The problem is in relation to the fact that nothing in PC guarantees the save speed, Obsidian provides no way to determine what that “not immediately” will be in any taken case. You can read more about it here: Indicator for status of saving .

Good thing this problem gets burred under absolutely useless talk about Sandbox Vault.

The speed of your PC may play a role if this bug is caused by some race condition.

Can you kindly provide a screen recording of this happening in the sandbox vault or in a vault launched with with default theme and restricted mode on?

Again, it would be helpful if you provided the specs of your PC and if you are using an SSD or not.

Thanks

@WhiteNoise here’s a screen capture in a brand new Restricted vault:

Note especially that the end text This will be the text at the end. does actually show up in Obsidian after the paste, but is not there after re-opening. Size of the file is 21MB.

My specs again:

13th Gen Intel(R) Core(TM) i9-13900H
NVIDIA GeForce RTX 3050 4GB
32 GB RAM
M.2 NVMe PCIe 4.0 SSD

@acc_1993 you could help your cause by actually providing the troubleshooting videos and computer specs as requested :roll_eyes:

3 Likes

@AlanG very nice specs on that system! If that isn’t capable of saving a 20MB file, I don’t know what can.

2 Likes

The problem with doing that, is that i want the core issue to be fixed. They are doing everything to strip down the scope of it.

If they workaround/patch something in a way which makes the issue no longer visible, but wont make a global review of the functions. That will solve nothing.

The issue is absolutely irrelevant to performance of the PC, the file save operations provide handles, Obsidian simply doesn’t care to wait for those handles before showing text, doesn’t provide other indication, nor waits for those handles when closing the app (which is actually, harder to implement).

1 Like

Is it possible that you clicked the X button twice?

Anyway, I managed to repro if I slow the app down 6x.

We found a race condition. We will introduce a fix for it in 1.7.2.
Let me know if you can still repro the failure to save after you get it.

1 Like

I’m glad you could reproduce it.

It is extremely frustrating how much effort I and others have to go to “prove” something until you will take it seriously. Having me record that screen capture added absolutely nothing over what I stated in text, and was simply a waste of my time.

If I say I can reproduce the issue, I can. And now we see that you can too.

1 Like

well your screen recording helped uncover a related issue. o it was useful.

We do take it seriously, even if we don’t write it here we looked for a while at this problem.