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

Foliate produced faulty book .json file and can't start because of it #1472

Open
dryBoneMarrow opened this issue Jan 27, 2025 · 2 comments
Open
Labels
bug Something isn't working

Comments

@dryBoneMarrow
Copy link

dryBoneMarrow commented Jan 27, 2025

Describe the bug
Foliate crashed randomly whilst reading and doesn't start now.
I tried narrowing down the issue and found that when removing the .json file from my (only) book in the library, foliate works as expected. I haven't modified the file manually, which means foliate somehow produced a file it can't process.

To Reproduce
Steps to reproduce the behavior:
I have linked to files, the first one is the JSON file of the book. I don't know if it's enough to reproduce, that's why I've also uploaded my whole /home/user/.local/com.github.johnfactotum.Foliate folder. Note that it is a tar archive, but the suffix is .pdf because GitHub didn't let me upload a tar archive. To reproduce, use the folder / JSON file when starting foliate (put it in .local/share)
978-0-440-33906-9.json
foobar.pdf

Expected behavior

  1. Don't create faulty JSON files
  2. Even if there is a faulty JSON file, foliate shouldn't crash

Screenshots
None

Version:
System: Arch Linux rolling
Desktop: Hyprland
Session: hyprland (wayland)
Language: en_US.UTF-8

Versions:

  • Foliate 3.2.1
  • GJS 1.82.01
  • GTK 4.16.12
  • Adwaita 1.6.3
  • GLib 2.82.4
  • WebKitGTK 2.46.5

User directories:

  • /home/nando/.local/share
  • /home/nando/.cache

Additional context
Coredump (remove .pdf suffix): core.foliate.1000.6f0b245f9aab4b0ea7be507a01296772.128936.1737936012000000.zst.pdf

Thanks for this great app :)

@dryBoneMarrow dryBoneMarrow added the bug Something isn't working label Jan 27, 2025
@dryBoneMarrow
Copy link
Author

I could narrow it down further: Deleting the two last annotations in the JSON file makes the problem go away

@dryBoneMarrow
Copy link
Author

I could narrow it down further: deleting any two annotations in the JSON file makes the problem go away, that is weird

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

No branches or pull requests

1 participant