Bug 393853 - Kate crashed after trying to highlight text for cut and paste
Summary: Kate crashed after trying to highlight text for cut and paste
Status: RESOLVED INTENTIONAL
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 18.04.0
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2018-05-04 16:52 UTC by pmitrik414
Modified: 2018-05-31 21:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pmitrik414 2018-05-04 16:52:55 UTC
Application: kate (18.04.0)

Qt Version: 5.10.0
Frameworks Version: 5.45.0
Operating System: Linux 4.16.6-1-default x86_64
Distribution: "openSUSE Tumbleweed"

-- Information about the crash:
- What I was doing when the application crashed: A 1.3G csv file was loaded. It exceeded the 4096 character limit. It crashed after reaching the bottom of the list when trying to select a majority of the text to cut and paste using shift+ctrl+end.

-- Backtrace:
Application: Kate (kate), signal: Aborted
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fc4b6de3900 (LWP 4956))]

Thread 5 (Thread 0x7fc4853af700 (LWP 4961)):
#0  0x00007fc4ad36d56c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fc48a710d3b in ?? () from /usr/lib64/dri/r600_dri.so
#2  0x00007fc48a710a67 in ?? () from /usr/lib64/dri/r600_dri.so
#3  0x00007fc4ad36759b in start_thread () from /lib64/libpthread.so.0
#4  0x00007fc4b16e1a1f in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7fc485d2f700 (LWP 4960)):
#0  0x00007fc4ad36d56c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fc48a710d3b in ?? () from /usr/lib64/dri/r600_dri.so
#2  0x00007fc48a710a67 in ?? () from /usr/lib64/dri/r600_dri.so
#3  0x00007fc4ad36759b in start_thread () from /lib64/libpthread.so.0
#4  0x00007fc4b16e1a1f in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7fc497e6f700 (LWP 4958)):
#0  0x00007fc4ab32ce29 in g_mutex_lock () from /usr/lib64/libglib-2.0.so.0
#1  0x00007fc4ab2e6b71 in g_main_context_query () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fc4ab2e73a7 in ?? () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fc4ab2e753c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#4  0x00007fc4b201ea2b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#5  0x00007fc4b1fc595a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#6  0x00007fc4b1decbaa in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#7  0x00007fc4b2446a35 in ?? () from /usr/lib64/libQt5DBus.so.5
#8  0x00007fc4b1df1ba0 in ?? () from /usr/lib64/libQt5Core.so.5
#9  0x00007fc4ad36759b in start_thread () from /lib64/libpthread.so.0
#10 0x00007fc4b16e1a1f in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7fc4a0c8f700 (LWP 4957)):
#0  0x00007fc4b16d7179 in poll () from /lib64/libc.so.6
#1  0x00007fc4ad795387 in ?? () from /usr/lib64/libxcb.so.1
#2  0x00007fc4ad796faa in xcb_wait_for_event () from /usr/lib64/libxcb.so.1
#3  0x00007fc4a3ca60a9 in ?? () from /usr/lib64/libQt5XcbQpa.so.5
#4  0x00007fc4b1df1ba0 in ?? () from /usr/lib64/libQt5Core.so.5
#5  0x00007fc4ad36759b in start_thread () from /lib64/libpthread.so.0
#6  0x00007fc4b16e1a1f in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fc4b6de3900 (LWP 4956)):
[KCrash Handler]
#6  0x00007fc4b161e9eb in raise () from /lib64/libc.so.6
#7  0x00007fc4b161fda1 in abort () from /lib64/libc.so.6
#8  0x00007fc4b1a3be83 in ?? () from /usr/lib64/libstdc++.so.6
#9  0x00007fc4b1a41dd8 in ?? () from /usr/lib64/libstdc++.so.6
#10 0x00007fc4b1a41e23 in std::terminate() () from /usr/lib64/libstdc++.so.6
#11 0x00007fc4b1a42053 in __cxa_throw () from /usr/lib64/libstdc++.so.6
#12 0x00007fc4b1dd7e22 in qBadAlloc() () from /usr/lib64/libQt5Core.so.5
#13 0x00007fc4b1e688ca in QString::reallocData(unsigned int, bool) () from /usr/lib64/libQt5Core.so.5
#14 0x00007fc4b1e69019 in QString::append(QString const&) () from /usr/lib64/libQt5Core.so.5
#15 0x00007fc4b6784a67 in KTextEditor::DocumentPrivate::text(KTextEditor::Range const&, bool) const () from /usr/lib64/libKF5TextEditor.so.5
#16 0x00007fc4b6814bd7 in KTextEditor::ViewPrivate::selectionText() const () from /usr/lib64/libKF5TextEditor.so.5
#17 0x00007fc4b682644b in ?? () from /usr/lib64/libKF5TextEditor.so.5
#18 0x00007fc4b34f6338 in QWidget::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#19 0x00007fc4b34ba01c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#20 0x00007fc4b34c2852 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#21 0x00007fc4b1fc7148 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#22 0x00007fc4b3512a9c in ?? () from /usr/lib64/libQt5Widgets.so.5
#23 0x00007fc4b34ba01c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#24 0x00007fc4b34c1314 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#25 0x00007fc4b1fc7148 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#26 0x00007fc4b2ca8d18 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () from /usr/lib64/libQt5Gui.so.5
#27 0x00007fc4b2cad9f5 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib64/libQt5Gui.so.5
#28 0x00007fc4b2c86eab in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Gui.so.5
#29 0x00007fc4a3d2778b in ?? () from /usr/lib64/libQt5XcbQpa.so.5
#30 0x00007fc4b1fc595a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#31 0x00007fc4b1fce494 in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#32 0x00005588ab3ca360 in ?? ()
#33 0x00007fc4b1609a87 in __libc_start_main () from /lib64/libc.so.6
#34 0x00005588ab3cb9da in _start ()

Reported using DrKonqi
Comment 1 Christoph Feck 2018-05-31 21:23:28 UTC
QString failed to allocate the number of bytes requested. It stores 2 bytes for each character, because it internally uses UTF-16 coding units. With more than 1,000,000,000 characters it needs more than 2 GB. QString doesn't handle this, and porting away from QString would require a complete rewrite of the code.