Page 1 of 1

Error message on pasting text

Posted: Sat May 27, 2017 10:32 am
by Thomas Lohrum
Hi Alex,

occasionally i see this message when pasting text.

class err::InvalidArgumentException
Precondition failed:
ui::controls::RichEdit::tryParseRtfHyperlink
!text.empty()

The source is text copied from another CN editor window. The text of the clipboard does not contain any hyperlinks, nor does the note itself.

Thomas

Re: Error message on pasting text

Posted: Mon May 29, 2017 9:49 am
by CintaNotes Developer
Thanks Thomas,

please tell if it happens with the latest beta as well?
Any chance on having a debug log excerpt?

Re: Error message on pasting text

Posted: Mon Jun 26, 2017 8:16 am
by Thomas Lohrum
Hi Alex,

text that does trigger the issue:
>>>>>
• xxxx.yyyy.zzzzz.aaaa.bbbb
- some text

<<<<

The symbols >< mark the beginning and end of the text and are not part of it. A bullet is used. Thus vertical tabs are used. If the last empty line is not included, it is possible to paste the text.

Hint: "- some text" is part of the paragraph

Thomas

Re: Error message on pasting text

Posted: Wed Jun 28, 2017 12:42 pm
by CintaNotes Developer
Thanks for the info! Still can't reproduce in 3.8 final. Can you?

Re: Error message on pasting text

Posted: Wed Jun 28, 2017 5:53 pm
by Thomas Lohrum
The test data was generated using the latest 3.8 version.

Re: Error message on pasting text

Posted: Thu Jun 29, 2017 5:33 am
by CintaNotes Developer
Ok thanks, will try harder to reproduce..

Re: Error message on pasting text

Posted: Thu May 16, 2019 5:31 am
by Thomas Lohrum
Hi Alex,

this bug:

"ui::wndProcCore ERROR:class err::InvalidArgumentException
Precondition failed:
ui::controls::RichEdit::tryParseRtfHyperlink
!text.empty()"

is still bugging me ;)

However, i have new information for you. Neither the clipboard content nor the destination note is the problem. It's the editor's state! Obviously while editing notes (and also pasting/copy???) the editor state gets in trouble. I can not paste content into the editor. However, if i close and reopen the note pasting will success, though the content of the clipboard did not change.

For another test i left the editor window opened and removed all content. Still pasting was not possible. I exported the note to check, if there is some invisible content. The note does however match any other note, that gets created.

A new note:
<note uid="6dd81c72-1e1a-44fb-a73b-ac17493209f3" revision="1" title="" created="20190515T162422" modified="20190515T162422" source="" link="" remarks="" tags="tasks/now" section="1" plainText="1"><![CDATA[]]></note>

The "buggy" note:
<note uid="b381a581-4088-4321-ab93-e27584b61d13" revision="9" title="" created="20190515T115235" modified="20190515T162333" source="" link="" remarks="" tags="tasks/now" section="1" plainText="1"><![CDATA[]]></note>
</notebook>

Thomas

Re: Error message on pasting text

Posted: Sat May 18, 2019 5:57 pm
by CintaNotes Developer
Hi Thomas,
Thanks for the additional info!

I'll ask Denis to take a look. It should be easier to reproduce now.

Re: Error message on pasting text

Posted: Fri May 31, 2019 12:51 pm
by invenio
Any update on this issue? I use cintanotes with multiple copy/paste functions for each note and this error is constantly popping up. It's pretty much destroyed my work flow.

I've noticed that if you use right click and "paste as plain text" it does not seem to happen so it may be an issue with RTF formatted text?

Also, to those who are having the issue, you can prevent the program from crashing if you hit the "ignore" button after the error. The pasted content won't be there but at least it doesn't crash the entire program.

Edit: I forgot to mention that this started with upgrading to the latest version. The previous version was working fine.

Re: Error message on pasting text

Posted: Sun Jul 21, 2019 11:35 am
by CintaNotes Developer
Wow, have just seen that this topic is still unresolved. Really sorry guys, have slipped out of my attention!
Is the issue still relevant? If so, I'll get to it myself this time.
And, any new/better ways to reproduce, maybe?

Re: Error message on pasting text

Posted: Sun Jul 21, 2019 1:03 pm
by invenio
It definitely has to do something with RTF formatted text from the clipboard. If plain text is inserted it doesn't happen. If RTF text is inserted it can cause the crash but if you just go through the errors and hit "ignore" so the program doesn't crash, you can immediately select the past in unformated text with the right-click menu and the contents of the unaltered clipboard will be inserted without issue (but obviously no formatting).

Again, this is not always the case. You can always do the first clipboard insertion with RTF without issue. It's when you want to paste in multiple RTF formatted texts sequentially.

Re: Error message on pasting text

Posted: Mon Jul 22, 2019 9:07 am
by CintaNotes Developer
invenio, thanks for the extra info!
Do you by any chance have an example of RTF that causes the crash to happen when pasted?

Re: Error message on pasting text

Posted: Mon Jul 22, 2019 11:33 am
by invenio
I don't think it's a specific text. I use different text insertions and the first one always works. Also, it doesn't always crash so it's not 100% that the 2nd pasting will do it. It's hard to reproduce as it doesn't always happen.

Does the error code mean anything that would give a clue as to what to look for?