System: KeePass 2.13 Portable, OSX Snow Leopard, Mono 2.6.1.
Steps to reproduce:
1. Run "mono KeePass.exe"
2. Select File -> Open -> Open File
3. Select .kbdx file and click Open
4. Type an invalid password for the file and klick Ok
5. Application terminates
Exception information:
System.NotImplementedException: The requested feature is not implemented.
at System.Windows.Forms.XplatUICarbon.AudibleAlert () [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUI.AudibleAlert () [0x00000] in <filename unknown>:0
at System.Windows.Forms.MessageBox+MessageBoxForm.RunDialog () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.MessageBox/MessageBoxForm:RunDialog ()
at System.Windows.Forms.MessageBox.Show (System.String text, System.String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton) [0x00000] in <filename unknown>:0
at KeePassLib.Utility.MessageService.SafeShowMessageBox (System.String strText, System.String strTitle, MessageBoxButtons mb, MessageBoxIcon mi, MessageBoxDefaultButton mdb) [0x00000] in <filename unknown>:0
at KeePassLib.Utility.MessageService.ShowWarning (System.Object[] vLines) [0x00000] in <filename unknown>:0
at KeePassLib.Utility.MessageService.ShowLoadWarning (System.String strFilePath, System.Exception ex) [0x00000] in <filename unknown>:0
at KeePass.Forms.MainForm.OpenDatabaseInternal (KeePassLib.Serialization.IOConnectionInfo ioc, KeePassLib.Keys.CompositeKey cmpKey) [0x00000] in <filename unknown>:0
at KeePass.Forms.MainForm.OpenDatabase (KeePassLib.Serialization.IOConnectionInfo ioConnection, KeePassLib.Keys.CompositeKey cmpKey, Boolean bOpenLocal) [0x00000] in <filename unknown>:0
at KeePass.Forms.MainForm.OnFormLoad (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Form.OnLoad (System.EventArgs e) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e) [0x00000] in <filename unknown>:0
Suggested fix:
Put a try/catch block around the beep and ignore NotImplementedException.
Definitely a Mono issue, not a KeePass bug. As it can be seen from the stack trace, the exception is thrown deep within the Mono/.NET framework, when trying to show a standard message box.
Putting a try/catch block around the message box call definitely is not a solution. Users wouldn't see the message box, but message boxes are essential for user feedback.
Best regards
Dominik