Bug 318781 - Vi Mode Key Mappings can lead to crash
Summary: Vi Mode Key Mappings can lead to crash
Status: RESOLVED DUPLICATE of bug 314415
Alias: None
Product: kate
Classification: Applications
Component: Vi Input Mode (show other bugs)
Version: 3.10.2
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-23 20:38 UTC by Omid Mo'menzadeh
Modified: 2013-04-23 22:24 UTC (History)
3 users (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 Omid Mo'menzadeh 2013-04-23 20:38:29 UTC
It might be a non-handled infinite loop. if you map:
h to k
j to h
k to j
Kate will eat up some memory and crash after using any of these keys.
(These are not random mappings, they are actually useful if you are using Colemak keyboard layout).
In Vim, there is noremap(instead of map), which does not allow k -> j -> h being mapped and looped.

Reproducible: Always

Steps to Reproduce:
1.Enable Vi mode
2.Add these mappings:
h to k
j to h
k to j
3.Add some text and go to normal mode.
4.Try navigating with any of the h, j, or k keys.
Actual Results:  
Kate crashed.

Expected Results:  
Navigation through the file.

The crash does not launch the KDE's crash info window, but here is the log printed to the console:
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
kate(2256)/kate-filetree KateFileTreePluginView::KateFileTreePluginView: BEGIN: mw: Kate::MainWindow(0x13c45a0)
kate(2256)/kate-filetree ProxyItem::ProxyItem: ProxyItem(0x1656990,0x0,-1,QObject(0x0) ,"m_root")
kate(2256)/kate-filetree ProxyItem::ProxyItem: ProxyItem(0x16fa6f0,0x0,-1,QObject(0x0) ,"Untitled")
kate(2256)/kate-filetree KateFileTreeModel::documentOpened: before add: ProxyItem(0x16fa6f0,0x0,-1,KateDocument(0x15c01a0) , "Untitled" )
kate(2256)/kate-filetree KateFileTreeModel::setupIcon: BEGIN!
kate(2256)/kate-filetree KateFileTreeModel::setupIcon: END!
kate(2256)/kate-filetree KateFileTreeModel::handleInsert: BEGIN!
kate(2256)/kate-filetree KateFileTreeModel::handleInsert: empty item
kate(2256)/kate-filetree ProxyItem::addChild: added ProxyItem(0x16fa6f0,0x1656990,0,KateDocument(0x15c01a0) , "Untitled" )   to ProxyItemDir(0x1656990,0x0,-1,"m_root", children:1)
kate(2256)/kate-filetree KateFileTreeModel::documentOpened: after add: ProxyItem(0x16fa6f0,0x1656990,0,KateDocument(0x15c01a0) , "Untitled" )
kate(2256)/kate-filetree KateFileTreeProxyModel::KateFileTreeProxyModel: BEGIN!
kate(2256)/kate-filetree KateFileTreePluginView::setListMode: BEGIN
kate(2256)/kate-filetree KateFileTreePluginView::setListMode: treeMode
kate(2256)/kate-filetree KateFileTreePluginView::setListMode: END
kate(2256)/kate-filetree KateFileTreePluginView::viewChanged: BEGIN!
kate(2256)/kate-filetree KateFileTreePluginView::viewChanged: BEGIN!
kate(2256)/kate-filetree KateFileTreeProxyModel::docIndex: !
kate(2256)/kate-filetree KateFileTreeModel::docIndex: BEGIN!
kate(2256)/kate-filetree KateFileTreeModel::docIndex: END!
kate(2256)/kate-filetree KateFileTreePluginView::viewChanged: selected doc= KateDocument(0x15c01a0) QModelIndex(0,0,0x16a0920,KateFileTreeProxyModel(0x16860e0) )
kate(2256)/kate-filetree KateFileTreePluginView::viewChanged: display= "Untitled"
kate(2256)/kate-filetree KateFileTreeModel::documentActivated: BEGIN!
kate(2256)/kate-filetree KateFileTreeModel::documentActivated: adding viewHistory ProxyItem(0x16fa6f0,0x1656990,0,KateDocument(0x15c01a0) , "Untitled" )
kate(2256)/kate-filetree KateFileTreeModel::updateBackgrounds: BEGIN!
kate(2256)/kate-filetree KateFileTreeModel::updateBackgrounds: m_editHistory contains  0  elements
kate(2256)/kate-filetree KateFileTreeModel::updateBackgrounds: END!
kate(2256)/kate-filetree KateFileTreeModel::documentActivated: END!
kate(2256)/kate-filetree KateFileTree::slotCurrentChanged: current: QModelIndex(0,0,0x16a0920,KateFileTreeProxyModel(0x16860e0) )  previous: QModelIndex(-1,-1,0x0,QObject(0x0) )
kate(2256)/kate-filetree KateFileTree::slotCurrentChanged: got doc, setting prev: QModelIndex(0,0,0x16a0920,KateFileTreeProxyModel(0x16860e0) )
kate(2256)/kate-filetree KateFileTreePluginView::viewChanged: END!
uint DBusMenuExporterDBus::GetLayout(int, int, const QStringList&, DBusMenuLayoutItem&): Condition failed: menu 
uint DBusMenuExporterDBus::GetLayout(int, int, const QStringList&, DBusMenuLayoutItem&): Condition failed: menu 
[1]    2256 segmentation fault (core dumped)  kate
Comment 1 Dominik Haumann 2013-04-23 21:28:08 UTC
@Simon: Don't we have a report for that alraedy?
Comment 2 Simon St James 2013-04-23 22:24:27 UTC

*** This bug has been marked as a duplicate of bug 314415 ***