Skip to content
This repository has been archived by the owner on Oct 17, 2020. It is now read-only.

Input string was not in a correct format #567

Closed
pavelonline opened this issue Oct 20, 2015 · 3 comments
Closed

Input string was not in a correct format #567

pavelonline opened this issue Oct 20, 2015 · 3 comments
Labels

Comments

@pavelonline
Copy link

After addition of some entries I couldn't get keefox work. When I try to open my database KeePass is falling with error:

System.FormatException: Input string was not in a correct format.
  at System.Number.StringToNumber (System.String str, NumberStyles options, System.NumberBuffer& number, System.Globalization.NumberFormatInfo info, Boolean parseDecimal) [0x00000] in <filename unknown>:0 
  at System.Number.ParseInt32 (System.String s, NumberStyles style, System.Globalization.NumberFormatInfo info) [0x00000] in <filename unknown>:0 
  at System.Int32.Parse (System.String s) [0x00000] in <filename unknown>:0 
  at KeePassRPC.KeePassRPCExt.OnKPDBOpen (System.Object sender, KeePass.Forms.FileOpenedEventArgs e) [0x00000] in <filename unknown>:0 
  at KeePass.Forms.MainForm.OpenDatabase (KeePassLib.Serialization.IOConnectionInfo ioConnection, KeePassLib.Keys.CompositeKey cmpKey, Boolean bOpenLocal) [0x00000] in <filename unknown>:0 
  at KeePass.Forms.MainForm.OnFormLoad (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.OnLoad (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e) [0x00000] in <filename unknown>:0 
@Christian2604
Copy link

I have the same issue. Keepass itself is showing no errors. Is there any workaround?

@luckyrat luckyrat added the bug label Oct 22, 2015
@luckyrat
Copy link
Member

The settings (configuration) part of your database has been corrupted and KeeFox can't work out what version of its own configuration is stored in the database.

KeeFox can handle this problem more gracefully so I'll include a fix in the next version (due for beta release in a week or so).

In the mean time you can workaround by manually editing the XML of your database (security risk!) or maybe the advanced database tools - more details here: https://zohodiscussions.com/keefox/topic/system-formatexception-input-string-was-not-in-a-correct-format.

If that's difficult or undesirable (understandable given the risks) you'll just have to remove the KeePassRPC.plgx plugin from your KeePass installation until the new beta of KeeFox is released.

There is definitely something else wrong though. There is nothing in the KeeFox code that can cause this corruption so there must be a bug in KeePass or some kind of system/hardware bug on your system. Given the feedback in the linked thread I think a KeePass bug (maybe introduced by another plugin?) is the most likely reason for the database getting corrupt in the first place.

I'm sure that any further information you can provide that might allow us to reproduce the corruption would be really appreciated by whoever is responsible for that code and I'm happy to help triage the issue since data corruption is a very serious problem.

@Christian2604
Copy link

Just for documentation: I also had an empty version tag. Deleting it worked like a charm. Thanks!

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

No branches or pull requests

3 participants