Comment 5 for bug 1247942

Revision history for this message
David Lechner (dlech) wrote : Re: keepass2 crashes on start

I did a little digging in the source code. The actual crash is because the height or width of a bitmap is <= 0. If we follow this up the stack trace, it is coming from trying to create a cursor for a MesssageBox.

But, if we go all the way up the stack trace, we will see that KeePass failed to start and that it was trying to show an error message. Relevant code from Program.cs is:

try
{
     if(m_cmdLineArgs[AppDefs.CommandLineOptions.DebugThrowException] != null)
       throw new Exception(AppDefs.CommandLineOptions.DebugThrowException);

     m_formMain = new MainForm();
    Application.Run(m_formMain);
}
catch(Exception exPrg) { MessageService.ShowFatal(exPrg); }

Since the crash is occurring in the MessageBox code, we can't see what the actual error is.

There is an undocumented command line option that should be able to simulate this crash. If you run ```keepass2 --debug-throwexcp```, do you get the same crash and stack trace?

I am not able to reproduce, the crash in a fresh install in a virtualbox vm. It may be a system related issue. Have you changed anything from the default Ubuntu install? In particular, anything that may have to do with a cursor?