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

(v1.9.3) "Show word count in status bar" can corrupt the note (if have 30000+ chars) #695

Closed
fitness888 opened this issue May 8, 2024 · 17 comments
Milestone

Comments

@fitness888
Copy link

fitness888 commented May 8, 2024

I have a few notes with strange behaviour among over a 100 other notes all behaving normally, unfortunately these notes contain a lot of important information. When I type anywhere in the note the font gets forced to the top of the note [row 1 column 1] followed with 3 dots in brackets, ie.p (...) l (...) e (...) h (...), I was typing 'help' from the middle of the note. The problem moves when duplicating or copying the note to another location.
Also when this issue occurs all the text in the affected notes are changed to plain text from rich text...this has created a problem with the removal of the formatting.
As well, after uninstalling 1.9.3. .01, now using a backed up version of KeyNote NF 1.9.2. 1, this issue does not exist.

@fitness888 fitness888 changed the title keystroke forced to top of note... v1.9.3 .01, keystroke forced to top of note... May 8, 2024
@dpradov
Copy link
Owner

dpradov commented May 8, 2024

I'm having a hard time understanding that behavior. Could you create a file that includes only one of those notes, using File | Export, selecting "Keynote file (knt)" as the format and exporting only the current node?
If you can then edit that file so that the only note contains exclusively text that you can provide me (e.g. deleting part of the content and obfuscating the rest), and where the problem continues to reproduce), it would be of great help to me.

The problematic notes, are very long? do you have many hyperlinks or images? What font do you use?

A screenshot of your settings in the General settings|Rich Text Editor section would also help me.

@fitness888
Copy link
Author

fitness888 commented May 8, 2024

I'm having a hard time understanding that behavior. Could you create a file that includes only one of those notes, using File | Export, selecting "Keynote file (knt)" as the format and exporting only the current node? If you can then edit that file so that the only note contains exclusively text that you can provide me (e.g. deleting part of the content and obfuscating the rest), and where the problem continues to reproduce), it would be of great help to me.

The problematic notes, are very long? do you have many hyperlinks or images? What font do you use?

A screenshot of your settings in the General settings|Rich Text Editor section would also help me.

I too am having a bit of trouble explaining so let me try again.
Firstly this is happening to actually only 1 note. When I select all the text from that note and paste it into a new child or sibling, etc. the problem moves with the text into the new note. The original note now being blank shows no sign of the issue when I start typing in it.
Where ever the cursor is in the note with the corrupt text, once I select any key that key symbol will be placed at the top of the note with (...) beside it ie. p (...) instead of where the cursor is.
The other major problem is that all the rtf has been changed to plain text in this note.
Unfortunately due to the personal nature of the information in this note I am not comfortable sending the file.
Also it seems that it is happening to only this 1 note.
Fortunately I had a full back up of KeyNote NF 1.9.2. 1 with full data so I've reverted back to this version.
Obviously there is some corrupt element in the text or 1 of the URL links or possibly there is a setting for that particular note that is causing this issue...but I couldn't find anything.
Considering all that I've said, I'll totally understand if you don't spend much time on this...thanks.

@dpradov
Copy link
Owner

dpradov commented May 9, 2024

Unfortunately due to the personal nature of the information in this note I am not comfortable sending the file.

Nor do I want you to send it to me as is. What I would suggest is that you try to reduce the size of that problematic note to something that continues to cause problems. Probably you can get something smaller without personal information (or that you can delete/modify).
You indicate that when you copy all the content to another note, the problem is transferred to that one. Have you tried copying fragments to see if you can find the problem? For example, you could copy half of the content (up to point X), and from point X to the end. Does the problem occur only in one of the halves? in both? As you describe, the problem appears immediately, simply by writing a character. I imagine that by copying halves you should be able to quickly determine what may be causing it.

Also it seems that it is happening to only this 1 note.

I understand that you mean a note (node) according to the current KeyNote NF terminology, and not a folder, right?

Have you tried exporting the content of that problematic note to RTF and opening the file with WordPad? How it behaves?

@fitness888
Copy link
Author

fitness888 commented May 9, 2024

Unfortunately due to the personal nature of the information in this note I am not comfortable sending the file.

Nor do I want you to send it to me as is. What I would suggest is that you try to reduce the size of that problematic note to something that continues to cause problems. Probably you can get something smaller without personal information (or that you can delete/modify). You indicate that when you copy all the content to another note, the problem is transferred to that one. Have you tried copying fragments to see if you can find the problem? For example, you could copy half of the content (up to point X), and from point X to the end. Does the problem occur only in one of the halves? in both? As you describe, the problem appears immediately, simply by writing a character. I imagine that by copying halves you should be able to quickly determine what may be causing it.

Also it seems that it is happening to only this 1 note.

I understand that you mean a note (node) according to the current KeyNote NF terminology, and not a folder, right?

Have you tried exporting the content of that problematic note to RTF and opening the file with WordPad? How it behaves?

After much trial and error it seems that when the number of words exceeds approx. 4000-6000 in any note the issue begins....under 4000 didn't have the issue. Of course it's not the amount of words per say, it's the amount of keystrokes so try using over 6000 words to play it safe.
This behaviour does not occur using KeyNote NF 1.9.2. 1.

This link will be helpful for word count testing:
https://www.csusb.edu/sites/default/files/Frys1000InstantWordsquickchecklist%20%281%29.pdf

I noticed the words in each note must be manually highlighted by dragging the mouse over them to get the word count in the status bar...using KeyNote NF 1.9.2. 1 select all or simply clicking on the note will give the word count.

@dpradov
Copy link
Owner

dpradov commented May 9, 2024

Thanks for your test!
I think that perhaps it is related to this change in last version: "Fixed: Position of caret now only consider visible characters"

Could you uncheck the option "General settings | Rich Text editor | Show caret position in status bar" to see if the problem disappear?

@fitness888
Copy link
Author

Thanks for your test! I think that perhaps it is related to this change in last version: "Fixed: Position of caret now only consider visible characters"

Could you uncheck the option "General settings | Rich Text editor | Show caret position in status bar" to see if the problem disappear?

While you sent your reply I did some editing please reread my previous post...will do the test now.

@dpradov
Copy link
Owner

dpradov commented May 9, 2024

I noticed the words in each note must be manually highlighted by dragging the mouse over them to get the word count in the status bar...using KeyNote NF 1.9.2. 1 select all or simply clicking on the note will give the word count.

This one?

I will also revise it, because it could be something related. Show caret position or show word count are related.

@fitness888
Copy link
Author

I noticed the words in each note must be manually highlighted by dragging the mouse over them to get the word count in the status bar...using KeyNote NF 1.9.2. 1 select all or simply clicking on the note will give the word count.

This one?

I will also revise it, because it could be something related. Show caret position or show word count are related.

Show word count in status bar is the problem...

@dpradov
Copy link
Owner

dpradov commented May 9, 2024

Exactly, I just verified it and I was going to confirm it for you.

@fitness888
Copy link
Author

Screenshot 2024-05-09 153525
Status bar not able to show full amounts...

@dpradov
Copy link
Owner

dpradov commented May 9, 2024

In fact, I had first tried a note with more than 12,000 words and many links, etc., and it was going well. It was when activating the word count that it behaved just as you said.

Status bar not able to show full amounts...

It seems. But it is very rare for the behavior to be that.

@fitness888
Copy link
Author

Screenshot 2024-05-09 153754

@dpradov
Copy link
Owner

dpradov commented May 9, 2024

Well great. In these cases, the difficult thing is usually to find what is happening and be able to reproduce the problem. But we already got it.
Thank you

@fitness888
Copy link
Author

In fact, I had first tried a note with more than 12,000 words and many links, etc., and it was going well. It was when activating the word count that it behaved just as you said.

Status bar not able to show full amounts...

It seems. But it is very rare for the behavior to be that.

OK then...good collaboration, I'll wait for the fix before going back as it made all text in the note plain text.

@fitness888
Copy link
Author

Well great. In these cases, the difficult thing is usually to find what is happening and be able to reproduce the problem. But we already got it. Thank you

I've been a tech for many years it's my nature to try to resolve things...keeps me up at night...LOL.

dpradov added a commit that referenced this issue May 9, 2024
…00+ chars can corrupt that note

Typing in a note with more than 30000 characters, instead of showing (...) W:...... in the status bar,
would corrupt the content of the note, as indicated in #695.

It was caused by a seemingly innocent error (an oversight) in the first commit of the refactoring, in version 1.9.3,
but with important consequences.
In the affected code, "Text" was a property of a control of status bar. After refactoring it was the content
of the editor... It should have been written as "txt", not Text.
@dpradov dpradov changed the title v1.9.3 .01, keystroke forced to top of note... (v1.9.3) "Show word count in status bar" can corrupt the note (if have 3000 May 9, 2024
@dpradov dpradov changed the title (v1.9.3) "Show word count in status bar" can corrupt the note (if have 3000 (v1.9.3) "Show word count in status bar" can corrupt the note (if have 30000+ chars) May 9, 2024
@dpradov
Copy link
Owner

dpradov commented May 9, 2024

I'll see if I can upload a version tomorrow, Friday, that corrects this problem and the others identified.
In the meantime, you should not use the "Show word count in status bar" option just in case, although it only causes the problem with very large notes.

I would like to be able to include in the new version the correction of the problem indicated in #694, but I have very little information.

@dpradov dpradov pinned this issue May 9, 2024
@fitness888
Copy link
Author

fitness888 commented May 9, 2024

I'll see if I can upload a version tomorrow, Friday, that corrects this problem and the others identified. In the meantime, you should not use the "Show word count in status bar" option just in case, although it only causes the problem with very large notes.

I would like to be able to include in the new version the correction of the problem indicated in #694, but I have very little information.

Any chance you can fix the cut off amount after W:10206 /40.* there isn't enough room for the full number to show.
Screenshot 2024-05-09 153754

@dpradov dpradov added this to the 1.9.4 milestone May 10, 2024
@dpradov dpradov closed this as completed May 10, 2024
@dpradov dpradov unpinned this issue May 14, 2024
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