Received a dialog
KeePass - Fatal Error
An extended error report has been copied to the clipboard.
Cannot add Control to TabControl. Only TabPages can be directly added to TabControls.
I have common problems when switching between two open databases. I often get extensive CPU usage and finally a crash. This time I was switching and received the above error dialog. The dialog was modal and could not be closed. Had to kill it.
Running Keepass 2 on Ubuntu x64.
$ apt-cache showpkg keepass2
Package: keepass2
Versions:
2.25+dfsg-1ubuntu0.1 (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-updates_universe_binary-amd64_Packages) (/var/lib/dpkg/status)
Dependencies:
2.25+dfsg-1ubuntu0.1 - mono-runtime (2 3.0~) libmono-corlib4.5-cil (2 3.2.8) libmono-system-drawing4.0-cil (2 3.0.6) libmono-system-security4.0-cil (2 1.0) libmono-system-windows-forms4.0-cil (2 1.0) libmono-system-xml4.0-cil (2 3.2.1) libmono-system4.0-cil (2 3.2.8) libx11-6 (2 2:1.6.0) keepass2-doc (0 (null)) mono-dmcs (0 (null)) xdotool (0 (null)) xsel (0 (null))
2.25+dfsg-1 - mono-runtime (2 3.0~) libmono-corlib4.5-cil (2 3.2.3) libmono-system-drawing4.0-cil (2 3.0.6) libmono-system-security4.0-cil (2 1.0) libmono-system-windows-forms4.0-cil (2 1.0) libmono-system-xml4.0-cil (2 3.2.1) libmono-system4.0-cil (2 3.2.3) libx11-6 (2 2:1.6.0) keepass2-doc (0 (null)) mono-dmcs (0 (null)) xdotool (0 (null)) xsel (0 (null))
Did it actually copy and error report to the clipboard? If so, paste it here. Also, try starting KeePass from the command line by running
keepass2and then make it crash. Hopefully it will give a stack trace that will help narrow down where the problem is. Don't forget to make a backup up copy of your database before trying to make it crash - just in case.Unfortunately nothing in the clipboard. This actual error has only happend once, but I have had many problems when switching tabs. I will run from the command line going forward.
PS. I'm a developer if advanced debugging is necessary. DS
Reproduced it by click back and fourth between the tabs.
Cannot add Control to TabControl. Only TabPages can be directly added to TabControls.
System.Windows.Forms
at System.Windows.Forms.TabControl+ControlCollection.Add (System.Windows.Forms.Control value) [0x00000] in <filename unknown="">:0
at System.Windows.Forms.Control.set_Parent (System.Windows.Forms.Control value) [0x00000] in <filename unknown="">:0
at System.Windows.Forms.Control..ctor (System.Windows.Forms.Control parent, System.String text) [0x00000] in <filename unknown="">:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:.ctor (System.Windows.Forms.Control,string)
at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00000] in <filename unknown="">:0
at System.Windows.Forms.XplatUIX11.DispatchMessage (System.Windows.Forms.MSG& msg) [0x00000] in <filename unknown="">:0
at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG& msg) [0x00000] in <filename unknown="">:0
at System.Windows.Forms.Application.RunLoop (Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x00000] in <filename unknown="">:0
at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext context) [0x00000] in <filename unknown="">:0
at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm) [0x00000] in <filename unknown="">:0
at KeePass.Program.Main (System.String[] args) [0x00000] in <filename unknown="">:0
Void Add(System.Windows.Forms.Control)</filename></filename></filename></filename></filename></filename></filename></filename></filename></filename>
Same stacktrace as in
https://sourceforge.net/p/keepass/bugs/1256/
And
https://bugs.launchpad.net/ubuntu/+source/keepass2/+bug/891029
I now realize that I just enabled a custom color for one of my databases. That could explain why it started happening now given the description of the launchpad bug.
Note: I tried to start with trace to see Exceptions like this:
cli --trace=E:All /usr/lib/keepass2/KeePass.exe
which givs me the following output when switching tabs:
[0x7f25d1e3a700:] EXCEPTION handling: System.ObjectDisposedException: The object was used after being disposed.
[0x7f25e510f7c0:] EXCEPTION handling: System.EntryPointNotFoundException: GetScrollInfo
[0x7f25e510f7c0:] EXCEPTION handling: System.DllNotFoundException: ShlWApi.dll
[0x7f25e510f7c0:] EXCEPTION handling: System.DllNotFoundException: DwmApi.dll
[0x7f25e510f7c0:] EXCEPTION handling: System.EntryPointNotFoundException: GetScrollInfo
[0x7f25e510f7c0:] EXCEPTION handling: System.DllNotFoundException: ShlWApi.dll
[0x7f25e510f7c0:] EXCEPTION handling: System.DllNotFoundException: DwmApi.dll
[0x7f25e510f7c0:] EXCEPTION handling: System.EntryPointNotFoundException: GetScrollInfo
[0x7f25e510f7c0:] EXCEPTION handling: System.DllNotFoundException: DwmApi.dll
[0x7f25e510f7c0:] EXCEPTION handling: System.EntryPointNotFoundException: GetScrollInfo
[0x7f25e510f7c0:] EXCEPTION handling: System.DllNotFoundException: DwmApi.dll
I can't reproduce this on Ubuntu 14.10 with mono 3.2.8.
cheers, Paul
I can reproduce it on Ubuntu 14.04 with
To reproduce it, i just have to open a second tab and switch two times between them. Then i get the error message, which i can't click away, i have to kill the Keepass process.
This comment has the solution for me: i disable the "Custom database color" in the "Database Settings". Now i can switch between the tabs again without a crash.
According to the launchpad bug https://bugs.launchpad.net/ubuntu/+source/keepass2/+bug/891029, this was fixed in KeePass 2.27. I see that both Christer Barreholm and David Zschille are both still using v2.25 from the Ubuntu repositories. Please upgrade to a newer version and see if the problem persists.
Indeed, should be fixed as of 2.27.
still occuring on 2.28 (with custom db color enabled). I will disable and see if that helps.