Bug 181205

Summary: konsole crashes on invalid KeyBindings
Product: [Applications] konsole Reporter: Rui Malheiro <rui.m.malheiro>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: 2.2   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Rui Malheiro 2009-01-18 19:02:26 UTC
Version:           2.2 (using 4.1.96 (KDE 4.1.96 (KDE 4.2 RC1)), Kubuntu packages)
Compiler:          cc
OS:                Linux (i686) release 2.6.27-11-generic

Description:
After upgrade from KDE 4.1.3 to KDE 4.2RC1 konsole crashes when opening a session that was configured to use vt420pc keybindings, (which seem to have been dropped for 4.2). Expected behavior would be to issue a message and maybe drop back to default keybinding or allow the user to select a new file.

Workaround:
Edit the offending profile, go to the [Keyboard] section and replace the invalid KeyBindings with a valid one or delete it to use the default. Or you can recreate the missing profile.

Backtrace and logs:
I don't have a useful backtrace, only the following standard error output:

rmm@vincent:/media/home/rmm/Documents$ konsole --profile tsm00
QFSFileEngine::open: No file name specified
konsole(24711) Konsole::KeyboardTranslatorManager::findTranslator: Unable to load translator "vt420pc" 
konsole(24711): Attempt to use QAction "change-profile" with KXMLGUIFactory! 
<unknown program name>(24710)/: Communication problem with  "konsole" , it probably crashed. 
Error message was:  "org.freedesktop.DBus.Error.NoReply" : " "Message did not receive a reply (timeout by message bus)" " 

rmm@vincent:/media/home/rmm/Documents$ KCrash: Application 'konsole' crashing...
sock_file=/home/rmm/.kde/socket-vincent/kdeinit4__0

Steps to reproduce:
1. Create a konsole profile and enter an invalid file for the KeyBindings on the [Keyboard] section (eg: KeyBindings=badkey)
2. Start konsole with the new profile (eg: konsole --profile crashtest)
Comment 1 Robert Knight 2009-01-18 22:30:25 UTC
SVN commit 913176 by knight:

Fix crash if key bindings specified in profile cannot be found.  Improve
KeyboardTranslator::defaultTranslator() to try loading "default.keytab" if
first before falling back to the hard-coded one.

BUG:181205



 M  +4 -0      Emulation.cpp  
 M  +10 -4     KeyboardTranslator.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=913176