Bug 369499 - Klipper causes a BadWindow error when selecting a large text in a GTK text editor
Summary: Klipper causes a BadWindow error when selecting a large text in a GTK text ed...
Status: RESOLVED UPSTREAM
Alias: None
Product: klipper
Classification: Unmaintained
Component: plasma-widget (show other bugs)
Version: 5.7.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Martin Flöser
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-28 19:04 UTC by Patrick
Modified: 2020-07-03 12:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick 2016-09-28 19:04:56 UTC
Klipper causes a BadWindow error in GTK editors when a large text is selected in the editor. Tested with gvim, medit, and scite. The error only occurs inside a KDE environment with Klipper enabled.

Reproducible: Always

Steps to Reproduce:
1. Open a Konsole terminal window.
2. Start one of the mentioned editors inside the terminal window.
3. Create (or open) a large text (e.g. 10000 lines of 80 characters).
4. Select all text.

Actual Results:  
The editor exits with a BadWindow (invalid window parameter) error.

Expected Results:  
The editor should continue without an error.
Comment 1 Martin Flöser 2016-10-04 05:36:41 UTC
Klipper doesn't interact with the clipboard directly. It only uses Qt. Can you try whether the problem can also be reproduced by copying the content into any other Qt application?
Comment 2 Patrick 2016-10-04 08:10:12 UTC
I can reproduce the problem without klipper by pasting a large text into a Qt5 application (Qt4 seems to work fine). But with klipper enabled the problem occurs immediately after selecting the text.
Comment 3 Martin Flöser 2016-10-04 10:48:55 UTC
ok, thanks for testing. That means the problem is within Qt's clipboard implementation. Klipper just exposes it more directly.

I suggest to report this issue to both the GTK developers as GTK should not crash on a BadWindow error on bugs.gnome.org and the Qt problem to Qt developers on bugreports.qt.io.

On our side there is unfortunately nothing we can do about it as klipper only uses Qt's clipboard abstraction.
Comment 4 Liang Qi 2020-07-02 19:30:22 UTC
I have seen https://bugreports.qt.io/browse/QTBUG-56595 , QXcbConnection::getTimestamp() returns old timestamp .

Is there any way to get some debug output from klipper?

Searched a bit in https://github.com/KDE/plasma-workspace/tree/master/klipper , found sth about klipper_debug.h and klipper_debug.cpp in source, how should I do to enable it? Thanks.
Comment 5 Liang Qi 2020-07-03 12:16:32 UTC
No need to reply my previous comment. Got some progress, more in qt jira.