giuspen / cherrytree

cherrytree
https://www.giuspen.net/cherrytree/
Other
3.29k stars 457 forks source link

Syntax Highlighting is broken, color themes not displayed. #2493

Closed keyboard-penman closed 1 month ago

keyboard-penman commented 2 months ago

Versions : 1.1.0 and 1.1.2 (using AppImage) on Ubuntu 22.04.4 LTS

  1. When inserting code nodes or code blocks within rich text nodes, the dialog to choose (syntax highlighting) language shows no language options. It's blank.
  2. The default syntax highlighting language option sh itself produces no syntax highlighting whatsoever, even with genuine bash commands.
  3. Code blocks as well as nodes do not show the color themes specified in preferences.
giuspen commented 2 months ago

I can see that on 24.04 the AppImage doesn't even start, while runs correctly on 20.04. I will investigate.

giuspen commented 2 months ago

On 24.04 the appimage doesn't start because libfuse.so.2 is not found. Running it from the terminal gave me that info so it was fixed after installing libfuse2t64. I then tried on a 22.04 and it worked normally. Can you try to run it from the command line and report if any error is printed?

keyboard-penman commented 2 months ago

Can you try to run it from the command line and report if any error is printed?

Thanks, I shall try that.

Edit:

I tried it, the application behaviour is same (expectedly). The following is printed in the terminal:

Gtk-Message: 12:20:09.722: Failed to load module "colorreload-gtk-module"
Gtk-Message: 12:20:09.723: Failed to load module "window-decorations-gtk-module"
[2024-04-28 12:20:09.723] [   ] [debug] /home/username/.config/cherrytree/config.cfg parsed
[2024-04-28 12:20:09.723] [   ] [warning] Unexp missing /usr/share/cherrytree/data/user-style.xml
[2024-04-28 12:20:09.723] [   ] [warning] Unexp missing /usr/share/cherrytree/data/user-style.xml

(AppRun.wrapped:9698): Gtk-WARNING **: 12:20:09.762: Theme directory places/128 of theme ubuntustudio has no size field

(AppRun.wrapped:9698): Gtk-WARNING **: 12:20:09.762: Theme directory places/scalable of theme ubuntustudio has no size field

[2024-04-28 12:20:10.064] [   ] [debug] Node 2 > secondnode
[2024-04-28 12:20:14.515] [   ] [debug] Node 1 > firstnode
[2024-04-28 12:20:18.416] [gtk] [critical] gtk_tree_view_scroll_to_cell: assertion 'tree_view->priv->tree != NULL' failed
[2024-04-28 12:20:25.917] [gtk] [critical] gtk_tree_view_scroll_to_cell: assertion 'tree_view->priv->tree != NULL' failed
[2024-04-28 12:20:33.067] [gtk] [critical] gtk_tree_view_scroll_to_cell: assertion 'tree_view->priv->tree != NULL' failed
[2024-04-28 12:20:39.747] [   ] [debug] Node 2 > secondnode

Note: Personal directory and cherrytree node names changed for privacy.

giuspen commented 2 months ago

I see you are using Ubuntu studio and a KDE desktop, that may be the reason I'm not seeing the issue, as I'm on a GTK desktop. I suspect some GTK needed stuff is not in the AppImage bundle, in fact I see errors loading a couple of GTK modules. I will try to reproduce myself on a KDE desktop.

giuspen commented 2 months ago

Turns out the issue is visible also on a GTK desktop. I wasn't seeing it because I had the cherrytree dependencies already installed. It's visible for example also on a clean Ubuntu (Gnome, GTK) 24.04 installation. I'll see if I can find out which library files are not copied over from the AppImage GTK script

keyboard-penman commented 2 months ago

Thank you very much.

keyboard-penman commented 2 months ago

I wasn't seeing it because I had the cherrytree dependencies already installed

What are the package names of these dependencies?

Of course, a self-contained Appimage coming with these is the ideal solution, but as a temporary fix, could the problem be solved with sudo apt install <packagename>?

giuspen commented 2 months ago

Correct @keyboard-penman installing the dependencies will fix the issue, if your distribution is too old though you may find an old package with incorrect dependencies. I can paste here later the current dependencies on Ubuntu 22.04

giuspen commented 2 months ago

I believe installing this will do for you, please confirm:

sudo apt install libgtksourceviewmm-3.0-0v5

keyboard-penman commented 2 months ago

sudo apt install libgtksourceviewmm-3.0-0v5

Yes, it did indeed work. Thank you, again.

giuspen commented 1 month ago

I believe the issue is now fixed. It would be very useful if you could confirm it: 1) sudo apt purge libgtksourceviewmm-3.0-0v5 2) sudo apt autoremove --purge 3) check that you do see the issue again with the AppImage v1.1.2 4) download https://www.giuspen.net/software/CherryTree-1.1.2+7-x86_64.AppImage and verify that there is no issue there

keyboard-penman commented 1 month ago

I believe the issue is now fixed. It would be very useful if you could confirm it:

  1. sudo apt purge libgtksourceviewmm-3.0-0v5
  2. sudo apt autoremove --purge
  3. check that you do see the issue again with the AppImage v1.1.2
  4. download https://www.giuspen.net/software/CherryTree-1.1.2+7-x86_64.AppImage and verify that there is no issue there

Just did this.

Purging ibgtksourceviewmm-3.0-0v5 did cause the error again.

And it was fixed with the new Appimage.

Problem solved, it appears :)

Thank you so much for addressing this.

giuspen commented 1 month ago

Excellent, many thanks @keyboard-penman for reporting and verifying the fix