| Summary: | [PATCH] Crash while selecting scrolling text | ||
|---|---|---|---|
| Product: | [Applications] konsole | Reporter: | Charles Samuels <charles> |
| Component: | general | Assignee: | Konsole Bugs <konsole-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | CC: | ninjalj |
| Priority: | NOR | Keywords: | drkonqi |
| Version First Reported In: | 22.12.3 | ||
| Target Milestone: | --- | ||
| Platform: | Debian stable | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Charles Samuels
2023-09-28 01:10:15 UTC
Backtrace with debug information:
```
#7 0x00000000061ea0d8 in __cxa_throw () from /lib/x86_64-linux-gnu/libstdc++.so.6
#8 0x00000000061e126d in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#9 0x00000000049784b3 in std::vector<QVector<Konsole::Character>, std::allocator<QVector<Konsole::Character> > >::_M_range_check (this=0xd830870, __n=37) at /usr/include/c++/12/bits/stl_vector.h:1153
#10 0x0000000004975109 in std::vector<QVector<Konsole::Character>, std::allocator<QVector<Konsole::Character> > >::at (
this=0xd830870, __n=37) at /usr/include/c++/12/bits/stl_vector.h:1175
#11 0x000000000496f6d6 in Konsole::Screen::setSelectionEnd (this=0xd830860, x=50, y=10036, trimTrailingWhitespace=false)
at /home/charles/tmp/konsole-22.12.3/src/Screen.cpp:1815
#12 0x00000000049816b6 in Konsole::ScreenWindow::setSelectionEnd (this=0x1d198b00, column=50, line=35,
trimTrailingWhitespace=false) at /home/charles/tmp/konsole-22.12.3/src/ScreenWindow.cpp:145
#13 0x0000000004a0f77b in Konsole::TerminalDisplay::extendSelection (this=0x1cf8f5c0, position=...)
at /home/charles/tmp/konsole-22.12.3/src/terminalDisplay/TerminalDisplay.cpp:1469
#14 0x0000000004a0e91e in Konsole::TerminalDisplay::mouseMoveEvent (this=0x1cf8f5c0, ev=0x1ffefff180)
at /home/charles/tmp/konsole-22.12.3/src/terminalDisplay/TerminalDisplay.cpp:1306
#15 0x0000000004f45db8 in QWidget::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x0000000004a16641 in Konsole::TerminalDisplay::event (this=0x1cf8f5c0, event=0x1ffefff180)
at /home/charles/tmp/konsole-22.12.3/src/terminalDisplay/TerminalDisplay.cpp:2877
#17 0x0000000004f03fae in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x0000000004f0c552 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x0000000005e9f6f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
from /lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x0000000004f0a65e in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x0000000004f5ebd8 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x0000000004f61f60 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
```
Fix:
```
--- Screen.cpp.old 2023-09-29 09:26:08.557129473 -0700
+++ Screen.cpp 2023-09-29 09:26:12.257118245 -0700
@@ -1809,7 +1809,7 @@
}
// HACK: do not crash.
- if (_screenLines.size() < line) {
+ if (_screenLines.size() <= line) {
line = _screenLines.size() - 1;
}
const int length = _screenLines.at(line).count();
```
This is probably a duplicate of #470346, which is fixed in 23.08 by https://invent.kde.org/utilities/konsole/-/merge_requests/856 (commit https://invent.kde.org/utilities/konsole/-/merge_requests/856/diffs?commit_id=28931090bcbcd577932f293c6e32cc5935f2bda5) reopen if the comment #2 didn't fix this |