doug-101 / TreeLine

an information storage program
http://treeline.bellz.org
222 stars 31 forks source link

Output Format configuration not stored #13

Closed dbogdanov closed 1 year ago

dbogdanov commented 3 years ago

It seems there is an issue with setting the Output Format inside the Configure Data Types menu. Clicking Apply it works, and the notes are updated accordingly. However, if you open the configuration menu again, the old version of the output format is shown instead of the new one.

This problem makes it impossible to work on gradually updating the output format.

TreeLine 3.1.3

Library versions: Python: 3.8.5 Qt: 5.15.1 PyQt: 5.15.1 OS: macOS-10.15.4-x86_64-i386-64bit

I haven't checked if this is the issue on Linux too.

TeresaM12 commented 3 years ago

Doug wrote last time that he has no Mac. So I tried and I did not manage to reproduce it. But as you can see my libraries are older. I have the problem with reaching the menu bar (also with this configuration) nobody else seems to have ...

TreeLine Version 3.1.3 Bibliothek Versionen: Python: 3.8.3 Qt: 5.9.7 PyQt: 5.9.2 OS: macOS-10.15.7

ME7DYCgw8M commented 3 years ago

This happens to me also sometimes on Win 10 and newest Treeline installer. Restarting Treeline always helps. I am not able to say the steps to reproduce the bug but can confirm it is there.

doug-101 commented 3 years ago

That doesn't give me much to go on. What types of output format are not always saved? Are there multiple main windows open? Any other complexities in the file configuration?

Thanks, Doug

ME7DYCgw8M commented 3 years ago

I will try to report more when I find out more information. I have not been able to reproduce the problem, so I don't know much about the problem.

TonyBShepherd commented 3 years ago

Hi - it happened to me a week or so ago (a different machine: Win 8.1 Pro, 3.1.3 I think). I had several TRLN files open but was mostly working on only one of them. On Windows there is always a blank TRLN file if you start the program, then do a File Open. So, the way I use it, there are at least 2 files and the Config window open. I say that because I suspect one of two things is happening: ) config is confused, tries to update the wrong file and silently fails, or ) something isn't quite right in the config, and Apply or Ok silently fails. I'll try an experiment later and post my results (not home right now). Thanks!

TonyBShepherd commented 3 years ago

Hi - me again. I can force a failure, but it isn't really reasonable. First, my config: TreeLine version 3.1.3 written by Doug Bell; Library versions: Python: 3.8.2, Qt: 5.14.1 PyQt: 5.14.1, OS: Windows-8.1-6.3.9600-SP0.

So, I have a TRLN file, lots of output stuff, thirteen different node types, all with multiple fields. Save as (new name). Now using "new name". Open "new name".trln in text editor (Notepad++ in my case). Back to Treeline, go to config. Change an output spec - I just added "xxx" somewhere. "Apply". Change still shows. Now either ) go to a different field output then return to changed field, or ) "OK" then "Configure Data Types" again. Either way the change is lost. It appears the "Save" failed but there is no error message. So it's not "reasonable" but illustrates that if "Save" fails you aren't told. Hope this helps.

doug-101 commented 3 years ago

TonyBShepherd wrote:

Hi - me again. I can force a failure, but it isn't really reasonable. First, my config: TreeLine version 3.1.3 written by Doug Bell; Library versions: Python: 3.8.2, Qt: 5.14.1 PyQt: 5.14.1, OS: Windows-8.1-6.3.9600-SP0.

So, I have a TRLN file, lots of output stuff, thirteen different node types, all with multiple fields. Save as (new name). Now using "new name". Open "new name".trln in text editor (Notepad++ in my case). Back to Treeline, go to config. Change an output spec - I just added "xxx" somewhere. "Apply". Change still shows. Now either ) go to a different field output then return to changed field, or ) "OK" then "Configure Data Types" again. Either way the change is lost. It appears the "Save" failed but there is no error message. So it's not "reasonable" but illustrates that if "Save" fails you aren't told. Hope this helps.

Please try to repeat this problem with TreeLine 3.1.4. This latest version fixes a bug that could corrupt the state of a modeless dialog box (like Configure Data Types) when multiple files are open in multiple windows.

Thanks! Doug

onomou commented 2 years ago

I just came across the same issue in version 3.1.4. I had multiple TreeLine windows open and had used Configure Data Types on each of them to compare. After going back and forth a few times, changing the output format, using OK or Apply, it stops loading the changed values. I also noticed that the Configure Data Types window doesn't load on the first click once this bug happens.

It's really hard for me to reproduce though. Using two windows of the Advanced Help, I couldn't make it happen. But when I have a personal tree and the Advanced Help tree both open, I got this bug twice.

onomou commented 2 years ago

Here is an illustration of what happens using Esc to close the window. The output configuration seems to default to {*Name*} sometime after closing the window with Esc. It is not immediate though, which means there might be two separate issues.

TreeLine Issue 13

TonyBShepherd commented 2 years ago

Hi - somewhere back in December 2020 I mumbled (somewhat incoherently) about changes not being saved. There are 2 emails I sent after the one posted above that don't show in this thread.

I use Notepad ++ to tell me if a file it has opened has been changed by some other program. I never really made that clear - sorry. With that (or other editors?) you can tell if TL 3.1.4 has REALLY saved your file. My testing suggested that changes may not be final until the file is saved to disk. If one TL window is using a memory version and another the disk version, they may not be the same. Or the "Config" function may always start out with the disk version, which may not have prior changes. Or it could be something else :)

I suggest you find some "tattle-tale" program like NotePad ++ (it is a good text editor), make sure it mutters if another program changes an open file, then use it to watch TL. My experience was that Config -> Save did not actually write to disk, and that changes made it to disk only when the file was explicitly saved.

YMMV etc - HTH :) Tony B. Shepherd

doug-101 commented 1 year ago

I finally figured out fixes for two bugs:

If you have the ability, please test the current repository code and let me know how it goes.

Thanks, Doug