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

crash on import #2107

Closed
kbrannen opened this issue Aug 29, 2022 · 7 comments · Fixed by #2111
Closed

crash on import #2107

kbrannen opened this issue Aug 29, 2022 · 7 comments · Fixed by #2111

Comments

@kbrannen
Copy link

Version, Operative system
Ubuntu 20.04.4 LTS

kevin@dogbert:~> snap list --all
Name                Version                     Rev    Tracking       Publisher    Notes
cherrytree          0.99.48                     56     latest/stable  hellsworth   -
cherrytree          0.99.48                     49     latest/stable  hellsworth   disabled

I tried reverting to revision 49 and the same problem happens.

Describe the bug
Cherrytree crashes when I try to do any import: html, text, html folder, etc. If run from a terminal then more info becomes visible:
kevin@dogbert:~> cherrytree
[2022-08-28 23:13:43.935] [ ] [debug] /home/kevin/snap/cherrytree/56/.config/cherrytree/config.cfg parsed
[2022-08-28 23:13:44.058] [ ] [debug] autosave is started
[2022-08-28 23:14:06.166] [ ] [debug] Node name: Technical
[2022-08-28 23:14:08.669] [ ] [debug] shift images in MenuBar/context menu
[2022-08-28 23:14:12.183] [gtk] [warning] Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
[2022-08-28 23:14:12.279] [gtk] [info] Settings schema 'org.gtk.Settings.FileChooser' does not contain a key named 'show-type-column'
Trace/breakpoint trap (core dumped)

To Reproduce

  1. Start Cherrytree.
  2. Create a new node (optional, problem happens with or without this, but I'm listing this since I did it above and I wanted to make sure no nodes wasn't causing the issue).
  3. Select File->Import->From_HTML_File (but I've seen it fail on at least 3 different file types so I think the problem is with the code when it tries any import) ... then it crashes.

If it wasn't obvious above, this is with the latest Ubuntu snap.
This is on a KDE desktop, but I have no problem running other GTK programs or snaps.

@giuspen
Copy link
Owner

giuspen commented Aug 29, 2022

Hi @kbrannen please try to update again as a new package has been released following multiple users reporting crashes in the updated snap.
Same version 0.99.48, but a new package should be downloaded.
If still crashes and you urgently need a working version and you cannot install on the system, also consider the AppImage version of cherrytree (all in a single file, nothing to install) https://www.giuspen.net/cherrytree/#downl
If you can install, the best version is the deb package / adding the ppa.
Please let me know if the crash is solved for you too.

@kbrannen
Copy link
Author

Snap says there is no update and that revision 56 is the latest. I removed it since it didn't work, added your PPA and installed the package like normal software. :) That is working just fine and doesn't have any issues. So you can close this if you already have a ticket open for the bad snap.

Thanks for the quick response! :)

@giuspen
Copy link
Owner

giuspen commented Sep 1, 2022

I tried today on an ubuntu 18.04 virtual machine and the snap is still not working with the current revision 57.

If I try File--Open File I get the following error:

[2022-09-01 21:48:32.851] [gtk] [warning] Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
(cherrytree:2964): Gtk-WARNING **: 21:48:32.928: Can't open portal file chooser: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.portal.Desktop was not provided by any .service files

@hellsworth if you have an idea of what could be the cause please let me know, otherwise tomorrow I'll try to play with this issue myself.

@hellsworth
Copy link
Contributor

Ok there is something going on for sure:

  1. On an 18.04 vm and an 20.04 vm, both with cherrytree rev 57, I see the same behavior. I was able to create a text file with some silly text and import it:
    $ cat mytext.txt
    lalala
    $ snap run cherrytree
    File -> Import plain text file -> chose mytext.txt
    See it import

The same sort of import works for html files (and File -> Open File works fine to import .ctd docs too).

However, whenever I try to save the document with just an imported plain text file or just an html file, I get the same error:

[error] !! sqlite3 'CREATE TABLE node (node_id INTEGER UNIQUE,name TEXT,txt TEXT,syntax TEXT,tags TEXT,is_ro INTEGER,is_richtxt INTEGER,has_codebox INTEGER,has_table INTEGER,has_image INTEGER,level INTEGER,ts_creation INTEGER,ts_lastsave INTEGER)': database is locked

@giuspen Is this what you see?

Note that both 18.04 and 20.04 vms are up to date:

$ sudo apt update && sudo apt dist-upgrade
$ sudo snap refresh
  1. On a 22.04 vm, I was able to import the same .txt file and same .html file and save the document without any problem.

I've asked around since I've never seen a snap behave differently on different ubuntu versions before. My instinct is that this is about the usage of the xdg-desktop-portals in the gnome extension. Unfortunately most folks are offline so I can happily chase this tomorrow with others. Sorry for not having an answer right away but I'll get to the bottom of it.

@giuspen
Copy link
Owner

giuspen commented Sep 2, 2022

@hellsworth for me it was failing much earlier as I tried to open an existing document and the file selection dialog didn't come out, I haven't tried to create a new document/save.
If you have some time to play with this issue that would be great so I can focus on other tickets.

@giuspen
Copy link
Owner

giuspen commented Sep 2, 2022

Note my tests are on an Ubuntu 18.04 Mate

@hellsworth
Copy link
Contributor

yes @giuspen I got you on this bug :)
I know that it's related to portals now, and will work on a solution today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants