#1142 Crash when attempting to edit an entry

KeePass_2.x
closed
nobody
None
5
2013-09-18
2013-07-22
Noorez Kassam
No

OS: Mac 10.8.4
Mono: 2.10.11

I received the following traceback:

$ mono KeePass.exe
2013-07-21 22:15:48.335 mono[2908:707] WARNING: CFSTR("A composite master key consists of one or more of the following key sources. All sources you specify will be required to open the database.\37777777702\37777777640 If you lose one source, you will not be able to open the database.") has non-7 bit chars, interpreting using MacOS Roman encoding for now, but this will change. Please eliminate usages of non-7 bit chars (including escaped characters above \177 octal) in CFSTR().
System.NullReferenceException: Object reference not set to an instance of an object
at KeePass.Forms.MainForm.OnPwListMouseDoubleClick (System.Object sender, System.Windows.Forms.MouseEventArgs e) [0x00000] in :0
at System.Windows.Forms.Control.OnMouseDoubleClick (System.Windows.Forms.MouseEventArgs e) [0x00000] in :0
at System.Windows.Forms.ListView+ItemControl.HandleClicks (System.Windows.Forms.MouseEventArgs me) [0x00000] in :0
at System.Windows.Forms.ListView+ItemControl.ItemsMouseUp (System.Object sender, System.Windows.Forms.MouseEventArgs me) [0x00000] in :0
at System.Windows.Forms.Control.OnMouseUp (System.Windows.Forms.MouseEventArgs e) [0x00000] in :0
at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.ListView+ItemControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00000] in :0
System.ObjectDisposedException: The object was used after being disposed.
at System.Windows.Forms.Control.CreateHandle () [0x00000] in :0
at System.Windows.Forms.TextBoxBase.CreateHandle () [0x00000] in :0
at System.Windows.Forms.Control.get_Handle () [0x00000] in :0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:get_Handle ()
at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.TextBoxBase.WndProc (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.TextBox.WndProc (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00000] in :0
System.NullReferenceException: Object reference not set to an instance of an object
at KeePass.UI.PwInputControlGroup.ValidateData (Boolean bUIOnError) [0x00000] in :0
at KeePass.Forms.PwEntryForm.SaveEntry (KeePassLib.PwEntry peTarget, Boolean bValidate) [0x00000] in :0
at KeePass.Forms.PwEntryForm.OnBtnOK (System.Object sender, System.EventArgs e) [0x00000] in :0
at System.Windows.Forms.Control.OnClick (System.EventArgs e) [0x00000] in :0
at System.Windows.Forms.Button.OnClick (System.EventArgs e) [0x00000] in :0
at System.Windows.Forms.ButtonBase.OnMouseUp (System.Windows.Forms.MouseEventArgs mevent) [0x00000] in :0
at System.Windows.Forms.Button.OnMouseUp (System.Windows.Forms.MouseEventArgs mevent) [0x00000] in :0
at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.ButtonBase.WndProc (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.Button.WndProc (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in :0
at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00000] in :0

Discussion

  • Paul
    Paul
    2013-07-22

    This is not a KeePass bug as it doesn't happen on Windows.
    Check you have installed Mono correctly.

    cheers, Paul

     
  • Noorez Kassam
    Noorez Kassam
    2013-07-22

    I believe that I did have mono installed correctly. I simply downloaded the Runtime package from here: http://www.go-mono.com/mono-downloads/download.html. According to the documentation, it seems to include everything that I might need. Is there anything else special that is required for KeePass to run correctly?

     
  • David Lechner
    David Lechner
    2013-07-22

    Try the beta 3.0.x version of Mono for Mac. I have been using is successfully for a few months now.

     
  • Noorez Kassam
    Noorez Kassam
    2013-07-22

    Hmm.. okay. so here is what I receive with the mono beta:

    It could be that mono is not handling double clicks correctly. I can try running again without using it.

    EDIT: It seems that this crash happens randomly. Sometimes it works...

    System.NullReferenceException: Object reference not set to an instance of an object
    at KeePass.Forms.MainForm.OnPwListMouseDoubleClick (System.Object sender, System.Windows.Forms.MouseEventArgs e) [0x00000] in :0
    at System.Windows.Forms.Control.OnMouseDoubleClick (System.Windows.Forms.MouseEventArgs e) [0x00000] in :0
    at System.Windows.Forms.ListView+ItemControl.HandleClicks (System.Windows.Forms.MouseEventArgs me) [0x00000] in :0
    at System.Windows.Forms.ListView+ItemControl.ItemsMouseUp (System.Object sender, System.Windows.Forms.MouseEventArgs me) [0x00000] in :0
    at System.Windows.Forms.Control.OnMouseUp (System.Windows.Forms.MouseEventArgs e) [0x00000] in :0
    at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) [0x00000] in :0
    at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000] in :0
    at System.Windows.Forms.ListView+ItemControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in :0
    at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in :0
    at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000] in :0
    at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00000] in :0

    Unhandled Exception:
    System.ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter]
    at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000] in :0
    at System.Drawing.Graphics.GdipMeasureString (IntPtr graphics, System.String text, System.Drawing.Font font, System.Drawing.RectangleF& layoutRect, IntPtr stringFormat) [0x00000] in :0
    at System.Drawing.Graphics.MeasureString (System.String text, System.Drawing.Font font, Int32 width, System.Drawing.StringFormat format) [0x00000] in :0
    at (wrapper remoting-invoke-with-check) System.Drawing.Graphics:MeasureString (string,System.Drawing.Font,int,System.Drawing.StringFormat)
    at System.Windows.Forms.TextRenderer.MeasureTextInternal (IDeviceContext dc, System.String text, System.Drawing.Font font, Size proposedSize, TextFormatFlags flags, Boolean useMeasureString) [0x00000] in :0
    at System.Windows.Forms.TextRenderer.MeasureText (System.String text, System.Drawing.Font font) [0x00000] in :0
    at System.Windows.Forms.ToolStripMenuItem.CalculatePreferredSize (Size constrainingSize) [0x00000] in :0
    at System.Windows.Forms.ToolStripItem.GetPreferredSize (Size constrainingSize) [0x00000] in :0
    at System.Windows.Forms.ToolStripDropDownMenu.OnLayout (System.Windows.Forms.LayoutEventArgs e) [0x00000] in :0
    at System.Windows.Forms.Control.PerformLayout (System.Windows.Forms.Control affectedControl, System.String affectedProperty) [0x00000] in :0
    at System.Windows.Forms.Control.PerformLayout () [0x00000] in :0
    at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:PerformLayout ()
    at System.Windows.Forms.ToolStripItem.OnParentChanged (System.Windows.Forms.ToolStrip oldParent, System.Windows.Forms.ToolStrip newParent) [0x00000] in :0
    at System.Windows.Forms.ToolStripItem.set_Parent (System.Windows.Forms.ToolStrip value) [0x00000] in :0
    at (wrapper remoting-invoke-with-check) System.Windows.Forms.ToolStripItem:set_Parent (System.Windows.Forms.ToolStrip)
    at System.Windows.Forms.ToolStripItemCollection.Remove (System.Windows.Forms.ToolStripItem value) [0x00000] in :0
    at System.Windows.Forms.ToolStripItem.Dispose (Boolean disposing) [0x00000] in :0
    at System.ComponentModel.Component.Finalize () [0x00000] in :0

     
    Last edit: Noorez Kassam 2013-07-22
    • David Lechner
      David Lechner
      2013-07-22

      I forgot the most important part. You have to have X11 installed. This is not installed by default on OS X >= 10.7.

      You can get X11 from here: http://xquartz.macosforge.org/trac/wiki

      I should have taken better notes when I set it up. Hope I didn't forget anything else.

      Edit: obviously you have already done that otherwise KeePass wouldn't start at all.

       
      Last edit: David Lechner 2013-07-22
  • Dominik Reichl
    Dominik Reichl
    2013-09-18

    • status: open --> closed
     
  • Dominik Reichl
    Dominik Reichl
    2013-09-18

    I cannot reproduce this under Windows and Linux (and don't have a Mac for testing), thus this is an issue in Mono, not KeePass.

    Best regards,
    Dominik