SUMMARY After some longer uptime, copy&paste suddenly stops working. It gets into a state where you can observe the following things: - copying text doesn't write it to the clipboard, the clipboard contents remain untouched (although the "copied" text is added to kate's clipboard history menu) - pasting text from other applications still works This just happens on its own after weeks of process uptime. I didn't try any version after 18.03.70 - because that's the build I use mainly, and I have no known or short way of reproducing. It happened in the past too, though I don'T know how far back. It's entirely possible that updates in the background cause it. But from my vague memory, it seemed to be independent from that (I trigger updates manually; also I'm using debian unstable, which hadn't a lot of updates recently). A new kate process is always fine. I work this issue around by closing the affected kate process, starting a new process, and loading the old session. It doesn't seem to matter whether the process was used recently or whether it was just sitting somewhere minimized. STEPS TO REPRODUCE - Unknown. OBSERVED RESULT EXPECTED RESULT SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: no/yes (available in About System) KDE Plasma Version: no KDE Frameworks Version: 5.54.0 Qt Version: 5.11.3 ADDITIONAL INFORMATION I'm not running a DE, just icewm on X11, with some standard debian session management scripts. Other non-KDE/Qt applications are never affected.
Hmm, it is bad that this happens, thought I am not sure how we shall debug this. We only call QApplication::clipboard()->setText(view()->selectionText(), QClipboard::Selection); for selection and QApplication::clipboard()->setText(text, QClipboard::Clipboard); for clipboard. Without any large code around that e.g. would be "time" dependent or "count" stuff.
Could be related to 32 bit overflow of X11 time handling. I think there is an open Qt bug about it.
Correction: a fixed Qt bug. https://bugreports.qt.io/browse/QTBUG-65145 Please test Qt 5.12.3.
Looks like a good bet that it's exactly this bug. I don't normally run other Qt applications for so long, so I noticed it only on Kate. Unfortunately, my distro (Debian unstable) is still on an old Qt version. I'll report back as soon as they update, and 50 days have passed. I don't mind if someone closes this bug before that.
I will close this as fixed upstream. If you encounter the issue again after you got an up-to-date version of Qt, feel free to reopen it.
A bit more information: This problem is not only related with Kate, but basically with any other program. I can confirm that Konsole also has the same problem. But let me give describe the problem a bit more: If you have a konsole running for a "long" period of time, for about 100 days, then copy/paste stops working, inside the konsole's tab AND to any konsole tab. If you start a new konsole window with keyboard shortcut (ctrl+shift+n), the problem is NOT resolved in this new konsole window. However if you start a new konsole (ie by clicking the konsole icon), copy/paste works in this new konsole window. Above it tested on kubuntu 18.10, but same problem noticed for previous versions too. Last known (to me) kubuntu version that this problem did NOT happen was 14.04.