Bug 381997 - Kate doesn't receive a lenghty text paste from Firefox
Summary: Kate doesn't receive a lenghty text paste from Firefox
Status: RESOLVED DUPLICATE of bug 429418
Alias: None
Product: kate
Classification: Applications
Component: application (show other bugs)
Version: 16.08
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 381329 413552 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-07-04 19:53 UTC by LordDan
Modified: 2021-04-04 18:47 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
New crash information added by DrKonqi (3.48 KB, text/plain)
2017-09-26 08:40 UTC, Marian Kyral
Details
New crash information added by DrKonqi (7.68 KB, text/plain)
2019-02-16 10:50 UTC, Yaroslav Sidlovsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description LordDan 2017-07-04 19:53:33 UTC
Greetings. I'm using Kate on Debian 9 Stable.

I can't copy/paste a big text from Firefox to Kate (and Kwrite).

How to reproduce:

1 - Go to to this site: https://www.gamefaqs.com/android/732857-final-fantasy-iv-the-after-years/faqs/56731
2 - Copy the text (just the text or the entire page gives the same result)
3 - Paste it on a new Kate file

Well, the Gedit app (installed on KDE 5.8) does the task instantly...
Comment 1 Kåre Särs 2017-07-05 07:54:48 UTC
Thanks for the report.

I can confirm that there is a real problem there! If you wait long enough the text will appear in Kate, but for me it took over a minute to get pasted. While it was being pasted Kate was using 100% of one core.
Comment 2 LordDan 2017-07-05 21:25:05 UTC
(In reply to Kåre Särs from comment #1)
> Thanks for the report.
> 
> I can confirm that there is a real problem there! If you wait long enough
> the text will appear in Kate, but for me it took over a minute to get
> pasted. While it was being pasted Kate was using 100% of one core.

In my case, it occurred like this, using the same text:
- copy/paste from kate to kate -> indicator quit flashing, it took some time and the text appeared.
- copy/paste from Firefox to Kate -> indicator keep flashing, text never appeared...
Comment 3 Christoph Cullmann 2017-07-24 10:18:10 UTC
*** Bug 381329 has been marked as a duplicate of this bug. ***
Comment 4 LordDan 2017-07-25 03:06:16 UTC
(In reply to Christoph Cullmann from comment #3)
> *** Bug 381329 has been marked as a duplicate of this bug. ***

I don't think so. This bug I reported is about an large incoming text copied from another application (Firefox). Bug 381329 occurs in an inverse way: a text being copied from kate to another app, LibreOffice; which is also weird.
Comment 5 LordDan 2017-07-25 03:12:32 UTC
I think that the bug might be in the code that makes that graphical text preview at scrooling bar to the right. If kate opens a file with large text, no problem. However, if kate receives a large text from paste command; it might generate lots of cicles of rendering, letter by letter, consuming a lot of time and cpu resources.
The solution might be this: do the rendering of the scrooling bar previewer just in the end of paste task.
Comment 6 Kåre Särs 2017-07-25 08:36:22 UTC
Actually now I can reproduce the "no paste at all" problem on my home computer. The slow paste problem is probably not the mini-map as that is updated only 100ms after the last text change (not continuously)
Comment 7 Marian Kyral 2017-09-26 08:40:16 UTC
Created attachment 108036 [details]
New crash information added by DrKonqi

kwrite (17.08.1) using Qt 5.7.1

1) I openned a big csv file in kwrite, removed some lines, select all and copy to clipboard
2) Paste to localc
3) kwrite crashed, nothing pasted

KWrite 17.08.1 on Gentoo

-- Backtrace (Reduced):
#6  0x00007f5b57bf55fe in INCRTransaction::timerEvent(QTimerEvent*) () from /usr/lib64/libQt5XcbQpa.so.5
#7  0x00007f5b65b13d6b in QObject::event(QEvent*) () from /usr/lib64/libQt5Core.so.5
#8  0x00007f5b6631b04c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#9  0x00007f5b663229fe in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#10 0x00007f5b65aec89a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
Comment 8 Yaroslav Sidlovsky 2019-02-16 10:50:41 UTC
Created attachment 118131 [details]
New crash information added by DrKonqi

kate (18.12.0) using Qt 5.11.3

- What I was doing when the application crashed:

Just pasted text from Firefox (if I remember well).

-- Backtrace (Reduced):
#6  0x00007f9bd631a852 in std::__atomic_base<int>::load (__m=std::memory_order_relaxed, this=0x35) at /usr/include/c++/8/bits/atomic_base.h:390
#7  QAtomicOps<int>::load<int> (_q_value=...) at /usr/include/qt5/QtCore/qatomic_cxx11.h:227
#8  QBasicAtomicInteger<int>::load (this=0x35) at /usr/include/qt5/QtCore/qbasicatomic.h:103
#9  QtPrivate::RefCount::isShared (this=0x35) at /usr/include/qt5/QtCore/qrefcount.h:101
#10 QVector<Konsole::Character>::isDetached (this=0x7f9bd800c688) at /usr/include/qt5/QtCore/qvector.h:106
Comment 9 Justin Zobel 2020-10-27 05:38:46 UTC
I've tried this and the text pastes instantly.

Can you please confirm this is no longer an issue on a recent version of Dolphin?
Comment 10 Greg Lepore 2020-10-27 09:01:58 UTC
Problem is still occuring for me. Paste never appears, no extra CPU is used.

Kate
Version 20.08.2


Operating System: KDE neon 5.20
KDE Plasma Version: 5.20.1
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.0
Kernel Version: 5.4.0-52-generic
OS Type: 64-bit
Processors: 8 × AMD FX(tm)-8350 Eight-Core Processor
Memory: 7.8 GiB of RAM
Graphics Processor: GeForce GT 1030/PCIe/SSE2
Comment 11 Justin Zobel 2020-10-27 09:10:40 UTC
Confirmed by Greg on latest release.
Comment 12 Justin Zobel 2020-11-01 01:18:23 UTC
*** Bug 413552 has been marked as a duplicate of this bug. ***
Comment 13 Christoph Cullmann 2021-04-04 18:47:09 UTC
confirmed, true, but unfortunately more a Qt issue.

*** This bug has been marked as a duplicate of bug 429418 ***