giuspen / cherrytree

cherrytree
https://www.giuspen.net/cherrytree/
Other
3.38k stars 461 forks source link

Not sure if it's Bug. #2345

Closed ajaxStardust closed 1 year ago

ajaxStardust commented 1 year ago

CT 1.0.0, Win 11 but also CT latest Debian/ MX Linux I use microsoft OneDrive as a convenient way to store a few things in the good ol' "cloud". It's pretty cool to be able to edit stuff in both environments, wherever you happen to be, on what device.

Describe the bug The CherryTree file format files (i believe this happens with the XML and .SQLite formats): The Linux version of CT imports only a part of the tree, which oddly is a part of the tree which I imported from ... i don't even remember. Probably .sql from SoftVoile FlashNote , which is basically a super simplified version of CT. the file is .db It's that part of the tree-- from the Softvoile .db that imports. And I don't even really want that part of the tree there anymore. haha

To Reproduce (I'm doing this on the Windows system, but it should be exactly the same, relatively speaking)

  1. Go to the synchronized OneDrive folder. The folder exists on the Linux system via Linux command line "onedrive", so that's simple. Pretty sure you can get it via apt. proceed through one or two steps to establish the OAuth handshake.
  2. Access OneDrive/.config/cherry-tree-file-format.ctb via CT on Linux
  3. Option of [ "Import Entire Tree" / "Import Current Node" ]
  4. Import Entire Tree
  5. Result: Only one node is imported, and that node may be in an awkward format for some reason.
  6. Comments: This only happens while attempting to import on Linux, and the file would be the same file attempting to be accessed as from the Windows System. The Windows version of CT has no noticeable issues that I've seen at all (other than the Always on Top which seems to habitually crash it).. Maybe the charset something or other. Something isn't being read correctly from its own file format. Maybe just a bad character in the code somewhere, because it seems to be fine in Windows.

It's not a super big deal because I have a version of the tree that I prefer on the Linux system, it's just an older version with less goodies (and also makes me wonder, "well? how did i import that tree. correctly?" Maybe it could be pinpointed to a version update. Come to think of it, maybe between 1.0.0 and 1.0.1 on Linux? Hmmm.

giuspen commented 1 year ago

It would be Interesting to see the debug log when the import is not working (can be enabled on the preferences dialog, tab misc) or from Linux just run cherrytree from a terminal to see the debug prints

ajaxStardust commented 1 year ago

Hi G!

I forgot that CT is a manual update (to my best knowledge), so the above is actually inaccurate.

That is, I have NOT yet updated the Linux box with CT 1.0.1. all of this, not a big deal really. but, yes. we should identify the problem and i'll do as you advised next time.

:D

ajaxStardust commented 1 year ago

FYI. I removed that "old" node -- the one which was the only one "restoring" when i imported the db file. Worked just fine when omitting that node.

(sorry, G. i forgot to do this before) Just imported the file on Windows - this is a success, as the problem node is present, as well as the others: image

So, it did fail on linux -- however, WITH that old file, with the extra problem node: i'll provide the terminal out. (working from two diff PC's right now, so... haha)

ajaxStardust commented 1 year ago

took a couple tries as i have different .db/ .xml archived not sure which was which.

image

$ cherrytree
[2023-09-20 19:32:17.691] [   ] [error] !! doc_1 error code 0 
[2023-09-20 19:32:17.691] [   ] [debug] /home/flux/.config/cherrytree/config.cfg parsed
[2023-09-20 19:32:17.839] [   ] [debug] autosave is started
[2023-09-20 19:32:18.306] [   ] [debug] Node name: 0ld_FlashNote_OldDb
[2023-09-20 19:32:18.419] [gtk] [critical] gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
[2023-09-20 19:32:18.436] [   ] [debug] fs::download_file: start downloading https://raw.githubusercontent.com/giuspen/cherrytree/master/debian/changelog
[2023-09-20 19:32:26.941] [   ] [debug] Node name: CherryTree itself
[2023-09-20 19:32:35.425] [   ] [debug] shift images in MenuBar/context menu
[2023-09-20 19:34:15.606] [   ] [debug] Node name: Eli
[2023-09-20 19:34:19.730] [   ] [debug] autosave is started
[2023-09-20 19:37:17.962] [   ] [debug] autosave no need
[2023-09-20 19:39:19.962] [   ] [debug] autosave no need
sh: 1: latex: not found
[2023-09-20 19:41:36.099] [   ] [error] system(latex --interaction=batchmode -output-directory=/tmp/.10PKB2 /tmp/.10PKB2/1-17742-__ct_special.tex > /dev/null) returned 32512
sh: 1: dvipng: not found
[2023-09-20 19:41:36.301] [   ] [error] Exception caught while importing node from CT file: vector::_M_range_check: __n (which is 165) >= this->size() (which is 141)
[2023-09-20 19:42:04.377] [   ] [debug] autosave is started
[2023-09-20 19:42:06.217] [   ] [debug] Node name: ZAPPER_Screenshots
[2023-09-20 19:42:17.863] [   ] [debug] autosave no need
sh: 1: latex: not found
[2023-09-20 19:42:18.890] [   ] [error] system(latex --interaction=batchmode -output-directory=/tmp/.LQRDB2 /tmp/.LQRDB2/2-17742-__ct_special.tex > /dev/null) returned 32512
[2023-09-20 19:42:19.079] [   ] [error] Exception caught while importing node from CT file: vector::_M_range_check: __n (which is 165) >= this->size() (which is 141)
[2023-09-20 19:42:52.648] [   ] [error] Exception caught while importing node from CT file: CtDocSqliteStorage: missing node properties for id 0
[2023-09-20 19:43:37.020] [   ] [error] Exception caught while importing node from CT file: vector::_M_range_check: __n (which is 165) >= this->size() (which is 141)
[2023-09-20 19:43:41.441] [   ] [debug] autosave is started
[2023-09-20 19:44:01.845] [   ] [error] Exception caught while importing node from CT file: vector::_M_range_check: __n (which is 165) >= this->size() (which is 141)
[2023-09-20 19:44:19.870] [   ] [debug] autosave no need
[2023-09-20 19:47:04.866] [   ] [debug] autosave no need
[2023-09-20 19:47:17.874] [   ] [debug] autosave no need
[2023-09-20 19:48:41.946] [   ] [debug] autosave no need
[2023-09-20 19:52:04.962] [   ] [debug] autosave no need

also, uncertain what it is to "start new instance" vs the default. was trying not to damage my regular setup.

please let me know if you want me to do something differently

ajaxStardust commented 1 year ago

in summary, i'm good to go because i have what i want in the Node Tree. But, I am perfectly happy to assist in tracking this down, and provide updates etc. :)

giuspen commented 1 year ago

I see the error is apparently for a corruption of a database, unexpectedly the properties for a node were not found. I have added additional integrity checks in recent versions after savings so hopefully such issue shouldn't happen anymore if you use up to date version

ajaxStardust commented 1 year ago

Thank you! What is the recommended update settings for Debian (MX Linux 23)? Apparently cherry doesn't update with apt? Can I configure my apt sources so it does?

Cheers and best regards!

giuspen commented 1 year ago

Unfortunately Debian stopped long time ago to update cherrytree in their repo, last version is 0.99.48 https://tracker.debian.org/pkg/cherrytree the package maintainer left and it seems abandoned. You can use the Debian packages that I personally build for Debian 12,11,10 see https://www.giuspen.net/cherrytree/#downl but on the other hand it would be useful to ask Debian to keep their package up to date too. More people ask them, the more probable they will assign a new package maintainer.

ajaxStardust commented 1 year ago

I posted a thread in the MX Linux forum. :)

https://forum.mxlinux.org/viewtopic.php?p=745621#p745621