Bug 341129 - Crash during edit [KateLayoutCache::textLayout, KateLineLayout::viewLine, KateLineLayout::viewLineCount]
Summary: Crash during edit [KateLayoutCache::textLayout, KateLineLayout::viewLine, Kat...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-ktexteditor
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-20 14:16 UTC by Kevin Funk
Modified: 2015-10-11 12:54 UTC (History)
1 user (show)

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 Kevin Funk 2014-11-20 14:16:08 UTC
Note: Code in katelinelayout.cpp looks suspicious to me. Return value of `line(...)` is not checked.

Backtrace:

Thread 1 (Thread 0x7f1e1b052880 (LWP 25435)):
[KCrash Handler]
#6  0x00007f1e2eef717c in KateLineLayout::viewLineCount (this=0x0) at /home/krf/devel/src/kf5/frameworks/ktexteditor/src/render/katelinelayout.cpp:178
#7  0x00007f1e2eef71be in KateLineLayout::viewLine (this=0x0, viewLine=-1) at /home/krf/devel/src/kf5/frameworks/ktexteditor/src/render/katelinelayout.cpp:184
#8  0x00007f1e2eef006c in KateLayoutCache::textLayout (this=0x2ad8430, realLine=92, _viewLine=-1) at /home/krf/devel/src/kf5/frameworks/ktexteditor/src/render/katelayoutcache.cpp:368
#9  0x00007f1e2ef585fb in KateViewInternal::previousLayout (this=0x2e4a9b0) at /home/krf/devel/src/kf5/frameworks/ktexteditor/src/view/kateviewinternal.cpp:1350
#10 0x00007f1e2ef59403 in KateViewInternal::cursorUp (this=0x2e4a9b0, sel=false) at /home/krf/devel/src/kf5/frameworks/ktexteditor/src/view/kateviewinternal.cpp:1529
#11 0x00007f1e2ef4bff2 in KTextEditor::ViewPrivate::up (this=0x2670dd0) at /home/krf/devel/src/kf5/frameworks/ktexteditor/src/view/kateview.cpp:2755
#12 0x00007f1e2f06d498 in KTextEditor::ViewPrivate::qt_static_metacall (_o=0x2670dd0, _c=QMetaObject::InvokeMetaMethod, _id=66, _a=0x7fffcbd0e040) at /home/krf/devel/build/kf5/frameworks/ktexteditor/src/moc_kateview.cpp:676
#13 0x00007f1e31f9d738 in QMetaObject::activate (sender=0x16e5d30, signalOffset=3, local_signal_index=1, argv=0x7fffcbd0e040) at /home/krf/devel/src/qt5/qtbase/src/corelib/kernel/qobject.cpp:3716
#14 0x00007f1e31f9cf28 in QMetaObject::activate (sender=0x16e5d30, m=0x7f1e3322ea00 <QAction::staticMetaObject>, local_signal_index=1, argv=0x7fffcbd0e040) at /home/krf/devel/src/qt5/qtbase/src/corelib/kernel/qobject.cpp:3582
#15 0x00007f1e32b57213 in QAction::triggered (this=0x16e5d30, _t1=false) at .moc/moc_qaction.cpp:360
#16 0x00007f1e32b5667f in QAction::activate (this=0x16e5d30, event=QAction::Trigger) at /home/krf/devel/src/qt5/qtbase/src/widgets/kernel/qaction.cpp:1167
#17 0x00007f1e32b563e8 in QAction::event (this=0x16e5d30, e=0x7fffcbd0e5e0) at /home/krf/devel/src/qt5/qtbase/src/widgets/kernel/qaction.cpp:1095
#18 0x00007f1e32b67ef6 in QApplicationPrivate::notify_helper (this=0x1640610, receiver=0x16e5d30, e=0x7fffcbd0e5e0) at /home/krf/devel/src/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3722
#19 0x00007f1e32b65503 in QApplication::notify (this=0x7fffcbd0f160, receiver=0x16e5d30, e=0x7fffcbd0e5e0) at /home/krf/devel/src/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3164
#20 0x00007f1e31f56537 in QCoreApplication::notifyInternal (this=0x7fffcbd0f160, receiver=0x16e5d30, event=0x7fffcbd0e5e0) at /home/krf/devel/src/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:932
#21 0x00007f1e3475ea5d in QCoreApplication::sendEvent (receiver=0x16e5d30, event=0x7fffcbd0e5e0) at /home/krf/devel/build/qt5/qtbase/include/QtCore/../../../../../src/qt5/qtbase/src/corelib/kernel/qcoreapplication.h:228
#22 0x00007f1e323e6873 in QShortcutMap::dispatchEvent (this=0x16406f0, e=0x7fffcbd0ea80) at /home/krf/devel/src/qt5/qtbase/src/gui/kernel/qshortcutmap.cpp:681
#23 0x00007f1e323e57f3 in QShortcutMap::tryShortcutEvent (this=0x16406f0, o=0x2e4a9b0, e=0x7fffcbd0ea80) at /home/krf/devel/src/qt5/qtbase/src/gui/kernel/qshortcutmap.cpp:352
#24 0x00007f1e32b65421 in QApplication::notify (this=0x7fffcbd0f160, receiver=0x1ad9020, e=0x7fffcbd0ea80) at /home/krf/devel/src/qt5/qtbase/src/widgets/kernel/qapplication.cpp:3147
#25 0x00007f1e31f56537 in QCoreApplication::notifyInternal (this=0x7fffcbd0f160, receiver=0x1ad9020, event=0x7fffcbd0ea80) at /home/krf/devel/src/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:932
#26 0x00007f1e32b6ad1d in QCoreApplication::sendSpontaneousEvent (receiver=0x1ad9020, event=0x7fffcbd0ea80) at ../../include/QtCore/../../../../../src/qt5/qtbase/src/corelib/kernel/qcoreapplication.h:231
#27 0x00007f1e323a406e in QGuiApplicationPrivate::processKeyEvent (e=0x1bcd800) at /home/krf/devel/src/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:1898
#28 0x00007f1e323a2dc1 in QGuiApplicationPrivate::processWindowSystemEvent (e=0x1bcd800) at /home/krf/devel/src/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:1604
#29 0x00007f1e3238acd4 in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at /home/krf/devel/src/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:572
#30 0x00007f1e1a5c35de in userEventSourceDispatch (source=0x1697da0) at /home/krf/devel/src/qt5/qtbase/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp:70
#31 0x00007f1e2ab71c5d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007f1e2ab71f48 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007f1e2ab71ffc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#34 0x00007f1e31fd81fc in QEventDispatcherGlib::processEvents (this=0x1681190, flags=...) at /home/krf/devel/src/qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:418
#35 0x00007f1e1a5c3800 in QPAEventDispatcherGlib::processEvents (this=0x1681190, flags=...) at /home/krf/devel/src/qt5/qtbase/src/platformsupport/eventdispatchers/qeventdispatcher_glib.cpp:115
#36 0x00007f1e31f52ef4 in QEventLoop::processEvents (this=0x7fffcbd0ee50, flags=...) at /home/krf/devel/src/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:128
#37 0x00007f1e31f5320c in QEventLoop::exec (this=0x7fffcbd0ee50, flags=...) at /home/krf/devel/src/qt5/qtbase/src/corelib/kernel/qeventloop.cpp:204
#38 0x00007f1e31f56cc1 in QCoreApplication::exec () at /home/krf/devel/src/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1185
#39 0x00007f1e323a2b3c in QGuiApplication::exec () at /home/krf/devel/src/qt5/qtbase/src/gui/kernel/qguiapplication.cpp:1532
#40 0x00007f1e32b64cf1 in QApplication::exec () at /home/krf/devel/src/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2956
#41 0x00000000004185ec in main (argc=3, argv=0x7fffcbd0f2e8) at /home/krf/devel/src/kf5/extragear/kdevelop/kdevelop/app/main.cpp:575

Reproducible: Always
Comment 1 Kevin Funk 2014-11-28 14:10:59 UTC
If not yet obvious: This happens when the 'auto fold first lines' is active only.
Comment 2 Sven Brauch 2015-10-11 12:54:51 UTC
I think I fixed this a while back in kate, if not, please reopen.