FocusWriter 1.8.0 bug: crashes on text pasting

I am working with Graeme Gott on a FocusWriter bug I stumbled upon. When I paste text from a different app such as email or a different word processor the program crashes immediately.

I can also get this to happen pasting from FW doc to another, but only sometimes. It may be the format of the document that is the culprit. I have been using rtf.

I downgraded to version 1.7.6 and the problem disappeared.

This happens using KDE 5.24.6. But that may be irrelevant.

Anyone else having such a problem?

Graeme says he has not been able to reproduce the bug.

Perhaps link to the upstream issue if you created one.

I can’t reproduce it either.

Curious that when I down graded it to the previous version the problem went away.

The “bug” issue is not resolved. Graeme sent me a debug version of FocusWriter 1.8 and I used gbd to run the debugger on it. It turned up nothing.

I also tried pasting into two simple “editors” he created for testing written in qt5 and qt6. No issues there either.


Could it be a clipboard-manager issue?

Maybe. But I have tried text paste experiments with any kind of notepad/editor/app I can think of. Have had no problems.

I thought maybe a glitch occurred when I installed 1.8 the first time. So I reinstalled it. Same problem. So that was not it.

Making headway? Redirecting paste output to print produces this:

malloc(): unaligned fastbin chunk detected

Stay tuned.

Update: We have determined that the crash only happens is you use the mouse, via a right click.

The crash does not happen if you use the keyboard, Ctl+V. This narrows it down considerably.

Update: Graeme informs me that the bug was indeed isolated to a right click paste/crash, which he was happy about because it was easy to fix that plus several other bugs. The bug fixes will be in the next Focuswriter update.

He also wants to stress if anyone else encounters a right click paste/crash, just use the keyboard command ctl+V. Cheers.