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

Something strange in [fonts] section in config #1895

Closed
AGenuZ opened this issue Dec 14, 2021 · 12 comments
Closed

Something strange in [fonts] section in config #1895

AGenuZ opened this issue Dec 14, 2021 · 12 comments

Comments

@AGenuZ
Copy link

AGenuZ commented Dec 14, 2021

Windows, v.0.99.44 (but bug starts earlier)

There is something wrong in [fonts] section in config.cfg. A rt_font parameter starts dupping by adding "Sans, Sans, Sans, Sans, Sans, Sans," values in it.

Here is screenshot:
image

Also, if you set another font, like "Fira Sans", it dupes like "Fira Sans, Sans, Sans, Sans, Sans, Sans, 14".

This behavior may explain some lags when opening branch, if you're using non-default fonts in Windows version of CherryTree.

@AGenuZ
Copy link
Author

AGenuZ commented Dec 22, 2021

image

Several days of start&close of Cherrytree...

@giuspen
Copy link
Owner

giuspen commented Jan 7, 2022

have you manually edited config.cfg or only via the preferences dialog? If you close cherrytree, remove the line
rt_font=....
then start cherrytree, can you then reproduce the issue?

@AGenuZ
Copy link
Author

AGenuZ commented Jan 10, 2022

have you manually edited config.cfg or only via the preferences dialog?
I always change fonts via preferences. And noticed this behaviour onle when backup configs with folder compare tool. But once or twice I replaced config with linux version in both directions.

Today I found that another parameter is affected "tree_font".
image

I suspected codepage and end of line of config, but cherrytree also makes new configs as UTF-8 and UNIX EOL.

I can't catch this bug for now. I created new config, restore old config, make several opening&closes, font changing. And it not reproduces for now. But I regulary found it when I make my regulary backups. Only on Windows.

So I continue to observe.

@AGenuZ
Copy link
Author

AGenuZ commented Jan 11, 2022

Ok! I've catched it!

I have opened a large base in CherryTree by several hours, while playing with a RAM-eating software (VirtualBox).
Than I closed that opened base to free RAM, and checked config...

image

The fun thing is the name of the font that I set last (Fira Sans), and name of the font that CherryTree appends (default - Sans).

So, for now:

  1. Open large base (2,5 Gb);
  2. Leave it open for a several hours;
  3. Get a full RAM conditions;
  4. Close CherryTree;
  5. It append to a setting a value of default font.

@giuspen
Copy link
Owner

giuspen commented Jan 15, 2022

Looks like an issue with the library but still I could sanitise/double check the fonts strings either at writing time or at reading time.
Can you confirm what would be the correct font in your case instead of "Fira Sans,Sans,Sans,....,Sans 13", is it "Fira Sans 13"?

@AGenuZ
Copy link
Author

AGenuZ commented Jan 16, 2022

correct font in your case instead of "Fira Sans,Sans,Sans,....,Sans 13", is it "Fira Sans 13"?

Yes, it always append to setted-up font (like Fira Sans or other) value of default font ", Sans " several times. And yes, it could append this even than default font is setted.

I think there is a memory leak in CherryTree, that manifest itself after hours of opened large base. Because it starts noticeably to lag in interface and edit. And can crash with this error screen.

And after that CherryTree doesn't have time to write some log. Only this window, and crash&close.

image

@AGenuZ
Copy link
Author

AGenuZ commented Jan 18, 2022

I think all [fonts] section parameters are affected. Now it's code_font and it's default font - monospace.

image

@giuspen
Copy link
Owner

giuspen commented Jan 23, 2022

I'm confused, if you are on Windows, how could Ubuntu Mono come out in the font list?

@AGenuZ
Copy link
Author

AGenuZ commented Jan 24, 2022

if you are on Windows, how could Ubuntu Mono come out in the font list?

Because Windows has ability to add external fonts (ttf/otf) in system too.
https://fonts.google.com/specimen/Ubuntu+Mono

@AGenuZ
Copy link
Author

AGenuZ commented Jan 29, 2022

@giuspen

Catched this in logs, while problem persist. And after CherryTree crashes on closing.

[2022-01-29 19:40:29.013] [   ] [debug] autosave: time to save file
[2022-01-29 19:56:27.746] [   ] [debug] rtFont Fira Sans,Sans 13
[2022-01-29 20:00:29.013] [   ] [debug] autosave: time to save file
[2022-01-29 20:20:29.013] [   ] [debug] autosave: no needs to save file
[2022-01-29 20:37:32.271] [   ] [debug] rtFont Fira Sans,Sans 14
[2022-01-29 20:37:32.651] [   ] [debug] rtFont Fira Sans,Sans,Sans 15
[2022-01-29 20:40:29.013] [   ] [debug] autosave: no needs to save file
[2022-01-29 20:50:40.394] [   ] [debug] rtFont Fira Sans,Sans,Sans,Sans 14
[2022-01-29 20:55:51.193] [   ] [debug] VACUUM
[2022-01-29 20:57:55.197] [   ] [debug] rtFont Fira Sans,Sans,Sans,Sans,Sans 13
[2022-01-29 20:57:55.332] [   ] [debug] rtFont Fira Sans,Sans,Sans,Sans,Sans,Sans 12

Also I noticed, that font resets in GUI settings. And after I change it to "Fira Sans Normal" in GUI, it's resets to "nothing" again.

Windows 10, LTSB 2016.

@AGenuZ
Copy link
Author

AGenuZ commented Jan 30, 2022

And this bug:

[2022-01-30 03:42:34.276] [gtk] [critical] Class::register_derived_type(): base_query.type_name is NULL.
[2022-01-30 03:42:34.485] [   ] [debug] C:\Users\GenuZ\AppData\Local\cherrytree\config.cfg parsed
[2022-01-30 03:42:35.955] [   ] [debug] autosave is started
[2022-01-30 03:42:37.944] [   ] [debug] fs::download_file: start downloading https://www.giuspen.com/software/version_cherrytree

@giuspen
Copy link
Owner

giuspen commented Mar 7, 2023

fixed in upcoming 0.99.55

@giuspen giuspen closed this as completed Mar 7, 2023
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

No branches or pull requests

2 participants