Menu

#1440 Cannot add Control to TabControl

KeePass_2.x
closed
nobody
mono (15)
5
2017-04-19
2015-10-25
No

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))

1 Attachments

Related

Bugs: #1566
Bugs: #1634

Discussion

  • David Lechner

    David Lechner - 2015-10-25

    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 keepass2 and 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.

     
  • Christer Barreholm

    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

     
  • Christer Barreholm

    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

     
  • Paul

    Paul - 2015-10-26

    I can't reproduce this on Ubuntu 14.10 with mono 3.2.8.

    cheers, Paul

     
  • David Zschille

    David Zschille - 2015-10-28

    I can reproduce it on Ubuntu 14.04 with

    $ 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)
     Description Language: 
                     File: /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_universe_binary-amd64_Packages
                      MD5: e0f163e68e620c6be9c7b15ffee31fe6
     Description Language: de
                     File: /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_universe_i18n_Translation-de
                      MD5: e0f163e68e620c6be9c7b15ffee31fe6
     Description Language: en
                     File: /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_universe_i18n_Translation-en
                      MD5: e0f163e68e620c6be9c7b15ffee31fe6
    
    2.25+dfsg-1 (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_universe_binary-amd64_Packages)
     Description Language: 
                     File: /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_universe_binary-amd64_Packages
                      MD5: e0f163e68e620c6be9c7b15ffee31fe6
     Description Language: de
                     File: /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_universe_i18n_Translation-de
                      MD5: e0f163e68e620c6be9c7b15ffee31fe6
     Description Language: en
                     File: /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty_universe_i18n_Translation-en
                      MD5: e0f163e68e620c6be9c7b15ffee31fe6
    
    
    Reverse Depends: 
      keepass2-doc,keepass2
      keepass2-doc,keepass2
    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)) 
    Provides: 
    2.25+dfsg-1ubuntu0.1 - 
    2.25+dfsg-1 - 
    Reverse Provides:
    

    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.

     
  • David Zschille

    David Zschille - 2015-10-28

    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.

     
  • David Lechner

    David Lechner - 2015-10-28

    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.

     
  • Dominik Reichl

    Dominik Reichl - 2015-11-23
    • status: open --> closed
     
  • Dominik Reichl

    Dominik Reichl - 2015-11-23

    Indeed, should be fixed as of 2.27.

     
  • Shawn Hughes

    Shawn Hughes - 2017-04-19

    still occuring on 2.28 (with custom db color enabled). I will disable and see if that helps.

    $apt-cache showpkg keepass2
    Package: keepass2
    Versions: 
    2.28+dfsg-1 (/var/lib/apt/lists/ftp.us.debian.org_debian_dists_jessie_main_binary-amd64_Packages) (/var/lib/dpkg/status)
     Description Language: 
                     File: /var/lib/apt/lists/ftp.us.debian.org_debian_dists_jessie_main_binary-amd64_Packages
                      MD5: e0f163e68e620c6be9c7b15ffee31fe6
     Description Language: en
                     File: /var/lib/apt/lists/ftp.us.debian.org_debian_dists_jessie_main_i18n_Translation-en
                      MD5: e0f163e68e620c6be9c7b15ffee31fe6
    
    
    Reverse Depends: 
      keepass2-doc,keepass2 2.28+dfsg-1
    Dependencies: 
    2.28+dfsg-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)) 
    Provides: 
    2.28+dfsg-1 - 
    Reverse Provides:
    
     

Log in to post a comment.

MongoDB Logo MongoDB