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

Notes get wiped clean #241

Open
salattu opened this issue Jan 4, 2025 · 10 comments · Fixed by #246
Open

Notes get wiped clean #241

salattu opened this issue Jan 4, 2025 · 10 comments · Fixed by #246
Labels
bug Something isn't working

Comments

@salattu
Copy link

salattu commented Jan 4, 2025

Taking up Folio recently, I've now started three Notebooks one at a time. Each time, I've written up a a first note of some length over the span of an hour or so. Then, when I've started a second note, the first note has been completely wiped. The file is there, but it's empty.

I've been trying to reproduce this artificially, spamming new notebooks and notes, but the issue has only occurred in real use. I'll update this should I learn more about when the issue occurs.

Later notes in the same notebook have yet to suffer this fate.

Folio 24.14 on Fedora 41 with Gnome 47 (Wayland).

EDIT: Flatpak.

@toolstack
Copy link
Owner

Snap or Flatpak?

@toolstack toolstack added the bug Something isn't working label Jan 5, 2025
@toolstack toolstack added this to the Future release milestone Jan 5, 2025
@a1kas1h
Copy link

a1kas1h commented Jan 6, 2025

Taking up Folio recently, I've now started three Notebooks one at a time. Each time, I've written up a a first note of some length over the span of an hour or so. Then, when I've started a second note, the first note has been completely wiped. The file is there, but it's empty.

I've been trying to reproduce this artificially, spamming new notebooks and notes, but the issue has only occurred in real use. I'll update this should I learn more about when the issue occurs.

Later notes in the same notebook have yet to suffer this fate.

Folio 24.14 on Fedora 41 with Gnome 47 (Wayland).

the same issue:

OS linux mint 22.1
app Flatpak

way to reproduce issue : create a notebook, create a chapter, insert notes, save and exit note, reopen the note. The whole content except chapter names and note name would be gone.

@toolstack
Copy link
Owner

@a1kas1h can you run the flatpak from a terminal (flatpak run com.toolstack.folio) and see if there are any errors generated?

I can't reproduce this on any of my systems.

@salattu
Copy link
Author

salattu commented Jan 6, 2025

Running Folio flatpak from terminal* tonight, when after some time I started a second note, Folio observed that the present file had supposedly been changed on disk by another application. If that happened, I've no knowledge of it. This was the first time I ran Folio from terminal and the first I got this notification. Folio offered to reload or overwrite, and the I chose the latter. This time, my first note was preserved upon creation of the second. ¯\ _ (ツ) _ /¯

I then closed Folio and copied the terminal output below.

(com.toolstack.Folio:2): Gtk-WARNING **: 20:14:23.974: GtkBox 0x5613ce766950 (box) reported min width -3, but sizes must be >= 0

(com.toolstack.Folio:2): Gtk-WARNING **: 20:18:41.057: GtkBox 0x5613ce92c110 (box) reported min width -3, but sizes must be >= 0

(com.toolstack.Folio:2): Gtk-WARNING **: 20:19:13.567: GtkBox 0x5613cf9f46f0 (box) reported min width -3, but sizes must be >= 0

(com.toolstack.Folio:2): Gtk-CRITICAL **: 20:19:15.564: gtk_text_buffer_emit_insert: assertion 'g_utf8_validate (text, len, NULL)' failed

(com.toolstack.Folio:2): Gtk-CRITICAL **: 23:39:06.208: gtk_text_buffer_emit_insert: assertion 'g_utf8_validate (text, len, NULL)' failed
11
(com.toolstack.Folio:2): Gtk-WARNING **: 23:39:08.850: Invalid text buffer iterator: either the iterator is uninitialized, or the characters/paintables/widgets in the buffer have been modified since the iterator was created.
You must use marks, character numbers, or line numbers to preserve a position across buffer modifications.
You can apply tags and insert marks without invalidating your iterators,
but any mutation that affects 'indexable' buffer contents (contents that can be referred to by character offset)
will invalidate all outstanding iterators

(com.toolstack.Folio:2): Gtk-WARNING **: 23:39:08.850: Invalid text buffer iterator: either the iterator is uninitialized, or the characters/paintables/widgets in the buffer have been modified since the iterator was created.
You must use marks, character numbers, or line numbers to preserve a position across buffer modifications.
You can apply tags and insert marks without invalidating your iterators,
but any mutation that affects 'indexable' buffer contents (contents that can be referred to by character offset)
will invalidate all outstanding iterators
Folio-Message: 23:39:09.412: window.vala:373: saving

* Anyone wondering why com.toolstack.folio says it's not installed, make the F in Folio uppercase.

@toolstack
Copy link
Owner

What's the file system on your home folder?

@Forage
Copy link
Contributor

Forage commented Feb 3, 2025

The issue is easily and systematically reproducible. Using 24.14 from Flatpak here.

  1. Open Folio
  2. Create a new note
  3. Change the note name (essential) and hit enter
  4. Add text
  5. Switch to a different note and back again

Result: text gone.

The issue does not occur when you don't rename the note first.
It also does not occur again when you go back to the note after switching to another and start typing then.

@tim-gromeyer
Copy link

I also have noticed the same issue. I did exactly the same steps as @Forage listed

@toolstack
Copy link
Owner

Ok, I can reproduce that issue, will take a look at what's going on.

@Forage
Copy link
Contributor

Forage commented Feb 5, 2025

Thanks for the quick fix, but I just installed 25.01 through Flathub and I can still reproduce the issue following the exact same steps as mentioned two days ago.

Screencast.From.2025-02-05.08-42-45.webm

Also note that for some reason, a new line is being added to the beginning of each note when saving it for the first time.

@toolstack
Copy link
Owner

Will reopen and investigate again.

The newline is expected, if it's not there some of the regex expressions used for parsing break so Folio automatically adds one if it doesn't fine one.

@toolstack toolstack reopened this Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants