Bug 330066 - Konsole crashed while double clicking when columns > 1024
Summary: Konsole crashed while double clicking when columns > 1024
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: copy-paste (show other bugs)
Version: 2.12.999
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2014-01-17 10:46 UTC by Delian Angelov
Modified: 2020-06-19 23:34 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 20.08.0


Attachments
New crash information added by DrKonqi (3.86 KB, text/plain)
2014-07-05 18:43 UTC, Alexander Potashev
Details
New crash information added by DrKonqi (4.69 KB, text/plain)
2018-10-31 17:27 UTC, Alexander Potashev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Delian Angelov 2014-01-17 10:46:57 UTC
Application: konsole (2.12.999)
KDE Platform Version: 4.10.5
Qt Version: 4.8.4
Operating System: Linux 3.8.0-33-lowlatency x86_64
Distribution: Ubuntu 13.04

-- Information about the crash:
I was using tig, browsing through the git history of one of my projects. 
I wanted to copy a git hash (which tig shows in color). 
I double clicked the hash.
-> Konsole crashed, and I've lost all my opened konsole tabs ... 

The crashing happens very infrequently (the probability is about ~ 1/100 ), but is really annoying.

The crash can be reproduced sometimes.

-- Backtrace:
Application: Konsole (kdeinit4), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f94fb0867c0 (LWP 14150))]

Thread 2 (Thread 0x7f94dd733700 (LWP 14222)):
#0  0x00007f94f5aa5359 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007f94f5aa55e9 in g_mutex_unlock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f94f5a65366 in g_main_context_acquire () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f94f5a660b4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f94f5a66304 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f94f9d53036 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#6  0x00007f94f9d2338f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#7  0x00007f94f9d23618 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#8  0x00007f94f9c25410 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#9  0x00007f94f9d04edf in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#10 0x00007f94f9c27bec in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#11 0x00007f94f613af8e in start_thread (arg=0x7f94dd733700) at pthread_create.c:311
#12 0x00007f94f892da0d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 1 (Thread 0x7f94fb0867c0 (LWP 14150)):
[KCrash Handler]
#5  0x00007f94f886a037 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#6  0x00007f94f886d698 in __GI_abort () at abort.c:90
#7  0x00007f94f9c1d5c2 in qt_message_output(QtMsgType, char const*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#8  0x00007f94f9c1d938 in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#9  0x00007f94f9c1dac4 in qFatal(char const*, ...) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#10 0x00007f94e522782f in Konsole::Screen::copyLineToStream (this=0xfdde20, line=694, start=28, count=1, decoder=0x7fffb0d4ecb0, appendNewLine=false, preserveLineBreaks=true, trimTrailingSpaces=false) at /home/delian/Personal/konsole/src/Screen.cpp:1231
#11 0x00007f94e5227389 in Konsole::Screen::writeToStream (this=0xfdde20, decoder=0x7fffb0d4ecb0, startIndex=109680, endIndex=109680, preserveLineBreaks=true, trimTrailingSpaces=false) at /home/delian/Personal/konsole/src/Screen.cpp:1164
#12 0x00007f94e522716a in Konsole::Screen::text (this=0xfdde20, startIndex=109680, endIndex=109680, preserveLineBreaks=true, trimTrailingSpaces=false) at /home/delian/Personal/konsole/src/Screen.cpp:1117
#13 0x00007f94e52270ca in Konsole::Screen::selectedText (this=0xfdde20, preserveLineBreaks=true, trimTrailingSpaces=false) at /home/delian/Personal/konsole/src/Screen.cpp:1107
#14 0x00007f94e51f02ba in Konsole::Emulation::checkSelectedText (this=0xfe5510) at /home/delian/Personal/konsole/src/Emulation.cpp:91
#15 0x00007f94e51f124a in Konsole::Emulation::qt_static_metacall (_o=0xfe5510, _c=QMetaObject::InvokeMetaMethod, _id=24, _a=0x7fffb0d4ee00) at /home/delian/Personal/konsole/build/src/Emulation.moc:125
#16 0x00007f94f9d390ef in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#17 0x00007f94e522a53f in Konsole::ScreenWindow::selectionChanged (this=0xeedbf0) at /home/delian/Personal/konsole/build/src/ScreenWindow.moc:129
#18 0x00007f94e5229b62 in Konsole::ScreenWindow::setSelectionStart (this=0xeedbf0, column=28, line=694, columnMode=false) at /home/delian/Personal/konsole/src/ScreenWindow.cpp:142
#19 0x00007f94e525551d in Konsole::TerminalDisplay::extendSelection (this=0x111cd30, position=...) at /home/delian/Personal/konsole/src/TerminalDisplay.cpp:2233
#20 0x00007f94e5253579 in Konsole::TerminalDisplay::mousePressEvent (this=0x111cd30, ev=0x7fffb0d4fa00) at /home/delian/Personal/konsole/src/TerminalDisplay.cpp:1903
#21 0x00007f94f9117a70 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#22 0x00007f94e52583ba in Konsole::TerminalDisplay::event (this=0x111cd30, event=0x7fffb0d4fa00) at /home/delian/Personal/konsole/src/TerminalDisplay.cpp:2996
#23 0x00007f94f90ca8ec in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#24 0x00007f94f90cda33 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#25 0x00007f94faaa71a6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#26 0x00007f94f9d2463e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#27 0x00007f94f90d0933 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#28 0x00007f94f9145e54 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#29 0x00007f94f9144e81 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#30 0x00007f94f9170042 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#31 0x00007f94f5a65f05 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007f94f5a66248 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007f94f5a66304 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#34 0x00007f94f9d53016 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#35 0x00007f94f917013e in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#36 0x00007f94f9d2338f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#37 0x00007f94f9d23618 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#38 0x00007f94f9d28cf6 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#39 0x00007f94e54ef64d in kdemain (argc=1, argv=0xa2c9e0) at /home/delian/Personal/konsole/src/main.cpp:86
#40 0x00000000004084ea in _start ()

Reported using DrKonqi
Comment 1 Alexander Potashev 2014-07-05 18:43:18 UTC
Created attachment 87581 [details]
New crash information added by DrKonqi

konsole (2.12.4) on KDE Platform 4.12.5 using Qt 4.8.5

- What I was doing when the application crashed:
Use triple click to select a whole line.

- Custom settings of the application:
Konsole window is more than 1000 characters wide (it was 1760 in my case).

-- Backtrace (Reduced):
#5  0x00007fedce22092e in Konsole::Screen::copyLineToStream(int, int, int, Konsole::TerminalCharacterDecoder*, bool, bool, bool) const () from /usr/lib64/libkonsoleprivate.so
#6  0x00007fedce220bb8 in Konsole::Screen::writeToStream(Konsole::TerminalCharacterDecoder*, int, int, bool, bool) const () from /usr/lib64/libkonsoleprivate.so
#7  0x00007fedce222730 in Konsole::Screen::text(int, int, bool, bool) const () from /usr/lib64/libkonsoleprivate.so
#8  0x00007fedce2227d2 in Konsole::Screen::selectedText(bool, bool) const () from /usr/lib64/libkonsoleprivate.so
#9  0x00007fedce1f4d5b in Konsole::Emulation::checkSelectedText() () from /usr/lib64/libkonsoleprivate.so
Comment 2 Alexander Potashev 2014-07-05 18:44:53 UTC
I couldn't reproduce the problem with tig when using a normal width Konsole window (~150 characters).
Comment 3 Christoph Feck 2014-07-21 20:42:38 UTC
Thanks for the hint! Konsole uses a fixed-size buffer of 1024 characters, and only uses an assert to verify the size is within this limit.

See Screen.cpp, line 1202.
Comment 4 Andrew Crouthamel 2018-10-31 04:05:02 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Alexander Potashev 2018-10-31 17:20:52 UTC
Still crashes with Konsole 18.04.3.
Comment 6 Alexander Potashev 2018-10-31 17:27:18 UTC
Created attachment 116011 [details]
New crash information added by DrKonqi

konsole (18.04.3) using Qt 5.11.1

- What I was doing when the application crashed:

I click-selected a line in tig running in Konsole.

-- Backtrace (Reduced):
#6  0x00007f3d20ef9c0c in Konsole::Screen::copyLineToStream(int, int, int, Konsole::TerminalCharacterDecoder*, bool, QFlags<Konsole::Screen::DecodingOption>) const () from /lib64/libkonsoleprivate.so.18
#7  0x00007f3d20ef9fb7 in Konsole::Screen::writeToStream(Konsole::TerminalCharacterDecoder*, int, int, QFlags<Konsole::Screen::DecodingOption>) const () from /lib64/libkonsoleprivate.so.18
#8  0x00007f3d20efb446 in Konsole::Screen::text(int, int, QFlags<Konsole::Screen::DecodingOption>) const () from /lib64/libkonsoleprivate.so.18
#9  0x00007f3d20efb4fa in Konsole::Screen::selectedText(QFlags<Konsole::Screen::DecodingOption>) const () from /lib64/libkonsoleprivate.so.18
#10 0x00007f3d20ec9651 in Konsole::Emulation::checkSelectedText() () from /lib64/libkonsoleprivate.so.18
Comment 7 Andrew Crouthamel 2018-10-31 17:46:03 UTC
Thanks for the update!
Comment 8 Kurt Hindenburg 2018-10-31 17:59:44 UTC
Thanks for the info; the most I can get on my system is around 600 columns.  Comment #3 does make sense; though not sure how to test it.
Comment 9 Alexander Potashev 2018-10-31 18:11:52 UTC
You just
 1. drag the window to a side of the screen and
 2. then resize it by dragging the edge
 3. repeat
Comment 10 Kurt Hindenburg 2018-10-31 19:01:41 UTC
OK that was duh! moment on my part.  Konsole does have issues w/ this many columns.