Bug 377200 - KWrite crashed while invoking `search next'
Summary: KWrite crashed while invoking `search next'
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: Vi Input Mode (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2017-03-04 14:37 UTC by QIN Yuhao
Modified: 2019-03-02 15:05 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description QIN Yuhao 2017-03-04 14:37:30 UTC
Application: kwrite (16.08.3)
 (Compiled from sources)
Qt Version: 5.7.1
Frameworks Version: 5.31.0
Operating System: Linux 4.9.6-gentoo-r1 x86_64
Distribution: "NAME=Gentoo"

-- Information about the crash:
- What I was doing when the application crashed:
Clicked `F3' to manually replace some terms when the term to be searched has all cleared. Then KWrite crashed. 
Seems that KWrite cannot use `F3' to search any pattern that does not appear in the file.
- Custom settings of the application:
Vi mode

The crash can be reproduced every time.

-- Backtrace:
Application: KWrite (kwrite), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f7f7ec0f800 (LWP 16945))]

Thread 3 (Thread 0x7f7f6c937700 (LWP 16946)):
#0  0x00007f7f7b5b85ed in poll () from /lib64/libc.so.6
#1  0x00007f7f749a48f2 in ?? () from /usr/lib64/libxcb.so.1
#2  0x00007f7f749a66df in xcb_wait_for_event () from /usr/lib64/libxcb.so.1
#3  0x00007f7f6ee9d369 in ?? () from /usr/lib64/libQt5XcbQpa.so.5
#4  0x00007f7f7bc7356c in ?? () from /usr/lib64/libQt5Core.so.5
#5  0x00007f7f77ca84a4 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f7f7b5c166d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f7f64715700 (LWP 16947)):
#0  0x00007f7f7bc6bea6 in QMutex::unlock() () from /usr/lib64/libQt5Core.so.5
#1  0x00007f7f7be6001d in ?? () from /usr/lib64/libQt5Core.so.5
#2  0x00007f7f7620b73d in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f7f7620c128 in ?? () from /usr/lib64/libglib-2.0.so.0
#4  0x00007f7f7620c30c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#5  0x00007f7f7be6013c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#6  0x00007f7f7be1401a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#7  0x00007f7f7bc6f044 in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#8  0x00007f7f7ec98445 in ?? () from /usr/lib64/libQt5DBus.so.5
#9  0x00007f7f7bc7356c in ?? () from /usr/lib64/libQt5Core.so.5
#10 0x00007f7f77ca84a4 in start_thread () from /lib64/libpthread.so.0
#11 0x00007f7f7b5c166d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f7f7ec0f800 (LWP 16945)):
[KCrash Handler]
#6  0x00007f7f7c20eb6c in QTextLine::width() const () from /usr/lib64/libQt5Gui.so.5
#7  0x00007f7f7e7a74ea in ?? () from /usr/lib64/libKF5TextEditor.so.5
#8  0x00007f7f7e7fbe20 in ?? () from /usr/lib64/libKF5TextEditor.so.5
#9  0x00007f7f7e88095b in KateVi::ModeBase::goToPos(KateVi::Range const&) () from /usr/lib64/libKF5TextEditor.so.5
#10 0x00007f7f7e8c85b5 in ?? () from /usr/lib64/libKF5TextEditor.so.5
#11 0x00007f7f7e8d5740 in ?? () from /usr/lib64/libKF5TextEditor.so.5
#12 0x00007f7f7be3af2f in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5
#13 0x00007f7f7c652c02 in QAction::triggered(bool) () from /usr/lib64/libQt5Widgets.so.5
#14 0x00007f7f7c65584d in QAction::activate(QAction::ActionEvent) () from /usr/lib64/libQt5Widgets.so.5
#15 0x00007f7f7c656267 in QAction::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#16 0x00007f7f7c659e2c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#17 0x00007f7f7c661350 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#18 0x00007f7f7be15340 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#19 0x00007f7f7c174629 in QShortcutMap::dispatchEvent(QKeyEvent*) () from /usr/lib64/libQt5Gui.so.5
#20 0x00007f7f7c174714 in QShortcutMap::tryShortcut(QKeyEvent*) () from /usr/lib64/libQt5Gui.so.5
#21 0x00007f7f7c12f9ba in QWindowSystemInterface::handleShortcutEvent(QWindow*, unsigned long, int, QFlags<Qt::KeyboardModifier>, unsigned int, unsigned int, unsigned int, QString const&, bool, unsigned short) () from /usr/lib64/libQt5Gui.so.5
#22 0x00007f7f7c1451bc in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () from /usr/lib64/libQt5Gui.so.5
#23 0x00007f7f7c14a455 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib64/libQt5Gui.so.5
#24 0x00007f7f7c12ae73 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Gui.so.5
#25 0x00007f7f6eecd0b0 in ?? () from /usr/lib64/libQt5XcbQpa.so.5
#26 0x00007f7f7620bf7d in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#27 0x00007f7f7620c260 in ?? () from /usr/lib64/libglib-2.0.so.0
#28 0x00007f7f7620c30c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#29 0x00007f7f7be60127 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#30 0x00007f7f7be1401a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#31 0x00007f7f7be1ba2c in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#32 0x000000000040c687 in main ()

Reported using DrKonqi
Comment 1 Christoph Cullmann 2019-03-02 15:05:37 UTC
Git commit a272e86f07e7b38fad1ef5c7a861bdd296807af8 by Christoph Cullmann, on behalf of loh tar.
Committed on 02/03/2019 at 15:06.
Pushed by cullmann into branch 'master'.

ModeBase::goToPos: Ensure jump target is valid

Summary:
FIXED-IN: 5.56

Reviewers: #ktexteditor, cullmann

Reviewed By: #ktexteditor, cullmann

Subscribers: cullmann, dhaumann, kwrite-devel, kde-frameworks-devel, #ktexteditor

Tags: #kate, #frameworks

Differential Revision: https://phabricator.kde.org/D19407

M  +4    -0    src/vimode/modes/modebase.cpp

https://commits.kde.org/ktexteditor/a272e86f07e7b38fad1ef5c7a861bdd296807af8