Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 7.8 and 8.0 crashes KeePass when editing templates on Linux #72

Open
jfabini opened this issue May 27, 2020 · 5 comments
Open

Comments

@jfabini
Copy link

jfabini commented May 27, 2020

A reproducible issue that seems to affect Linux only (Linux Mint 19.3 (64 bit), KeePass 2.44, KPEntryTemplates 7.8 and 8.0) that may or may not be related to #64

When opening an existing password database and trying to edit a KPEntryTemplate template on Linux, Keepass crashes deterministically. The KeePass window disappears but its process must be killed in order to be able to restart KeePass.
The following steps are needed:
Start KeePass, enter the KeePass database password.
Select the Template folder, open an existing template (the focus is, as it has ever been, on the "Template" tab, but the displayed tab is "Entry"). Click on the "Entry" tab, then on the "Template" tab again - this crashes the KeePass app, the Window disappears.

When creating a new template from the scratch it works until "Init as a template" is clicked. Then KeePass asks about saving unsaved changes and exits (but, again, hangs and must be killed).

Instantiating entries from existing templates, however, works.

I tried the identical command sequence with an existing and with an newly created database - same reproducible behavior: crash. On Windows 10, 64 bit the same command sequence works as expected.

@ilolipopi
Copy link

Same issue on Ubuntu 20.04. If i run mono /path/to/KeePass.exe (with mono-complete installed) in the terminal, I get following things when KeePass crashes.

System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: Width is less than MinimumWidth
  at System.Windows.Forms.DataGridViewColumn.set_Width (System.Int32 value) [0x00018] in <a3daa9b84fd241a497578a25f68bc3c7>:0 
  at KPEntryTemplates.EntryTemplateManager.InitializeGridView (System.Windows.Forms.TabPage page) [0x00519] in <3453210a85834eb8a7c8309b0a86ec58>:0 
  at KPEntryTemplates.EntryTemplateManager.data_grid_show () [0x0000b] in <3453210a85834eb8a7c8309b0a86ec58>:0 
  at KPEntryTemplates.EntryTemplateManager.main_tabs_control_Selecting (System.Object sender, System.Windows.Forms.TabControlCancelEventArgs e) [0x00071] in <3453210a85834eb8a7c8309b0a86ec58>:0 
  at System.Windows.Forms.TabControl.OnSelecting (System.Windows.Forms.TabControlCancelEventArgs e) [0x0001c] in <a3daa9b84fd241a497578a25f68bc3c7>:0 
  at System.Windows.Forms.TabControl.set_SelectedIndex (System.Int32 value) [0x000e7] in <a3daa9b84fd241a497578a25f68bc3c7>:0 
  at System.Windows.Forms.TabControl.MouseDownHandler (System.Object sender, System.Windows.Forms.MouseEventArgs e) [0x002e9] in <a3daa9b84fd241a497578a25f68bc3c7>:0 
  at System.Windows.Forms.Control.OnMouseDown (System.Windows.Forms.MouseEventArgs e) [0x0001c] in <a3daa9b84fd241a497578a25f68bc3c7>:0 
  at System.Windows.Forms.Control.WmLButtonDown (System.Windows.Forms.Message& m) [0x00097] in <a3daa9b84fd241a497578a25f68bc3c7>:0 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00177] in <a3daa9b84fd241a497578a25f68bc3c7>:0 
  at System.Windows.Forms.TabControl.WndProc (System.Windows.Forms.Message& m) [0x0006e] in <a3daa9b84fd241a497578a25f68bc3c7>:0 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <a3daa9b84fd241a497578a25f68bc3c7>:0 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x0000b] in <a3daa9b84fd241a497578a25f68bc3c7>:0 
  at System.Windows.Forms.NativeWindow.WndProc (System.IntPtr hWnd, System.Windows.Forms.Msg msg, System.IntPtr wParam, System.IntPtr lParam) [0x0008e] in <a3daa9b84fd241a497578a25f68bc3c7>:0 

@slevit
Copy link

slevit commented Nov 17, 2020

Same issue. Ubuntu 20.04, keepass 2.44 and mono-complete 6.8.0. When creating a new template from the scratch it works until "Init as a template" is clicked. Then KeePass asks about saving unsaved changes and crashes.

ADDENDUM: Unable to reproduce the issue on Windows 10 with the same database.
keepass-partial-crash-output.txt

@Sanaki
Copy link

Sanaki commented Nov 17, 2020

In my case, I make a new entry, click entry, then back to template (because it starts on template displaying entry still, issue #10, supposedly should have been fixed) init as template, keepass minimizes itself. Bring it back up if the entry was minimized with it (sometimes it isn't), click entry and template, then init as template a second time. At that point, I get this error twice:
Screenshot from 2020-11-17 12-29-25
Clicking cancel twice, my template is ready to be set up, no crash.

I can also edit templates, but similar to above, when I first click entry and back to template, keepass minimizes itself, then when I bring it back up, I click entry and template again to be able to modify the template. No error messages in this case.

Mint 19.3, Mono 6.12.0.90, KeePass 2.46, KPEntryTemplates 8.0

@mitchcapper
Copy link
Owner

If someone can put together a virtualbox or similar VM I can use to replicate this I can try to spin it up and see if I can debug. I don't have any *nix machines with UI.

@Virgus
Copy link

Virgus commented Mar 3, 2024

If someone can put together a virtualbox or similar VM I can use to replicate this I can try to spin it up and see if I can debug. I don't have any *nix machines with UI.

Dear Mitch, I just came to check about templates errors (I'm on W10) and saw your messages. I'm having errors too, but if I click "continue" button KeePass does not quit. So I've been using templates plugins so far, knowing that every time I opened an entry I would see the error.

20240303_021749_Templates Plugin Unhandled exception

I just purged my concerned db from all my entries and changed the master password which is now "test".
Please let me know if there's anything else I could do to help you troubleshoot this issue.

Kind regards,
V.
Test.zip

I forgot to add the details of the error:
Details.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants