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

ArgumentException #8

Open
chaosflaws opened this issue Jul 30, 2022 · 1 comment
Open

ArgumentException #8

chaosflaws opened this issue Jul 30, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@chaosflaws
Copy link

Hi there,

just tried using the Savegame Visualizer, which threw an error relating to FileDBReader. So I tried running FileDBReader on its own, using:

FileDBReader decompress -f "..\test\Christian Jäger_S87.a7s"

which gave me the following error:

[READER]: Autodetected FileVersion = Version1
Unhandled exception. System.ArgumentException: An item with the same key has already been added. Key: 0
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at FileDBSerializing.FileDBParser_V1.ParseDictionary(Int32 Offset)
   at FileDBSerializing.FileDBParser_V1.ReadTagSection(Int32 OffsetToOffsets)
   at FileDBSerializing.DocumentParser`1.LoadFileDBDocument(Stream s)
   at FileDBReader.src.XmlRepresentation.Reader.Read_Version1(Stream input)
   at FileDBReader.src.XmlRepresentation.Reader.Read(Stream input)
   at FileDBReader.src.ToolFunctions.Decompress(IEnumerable`1 InputFiles, String InterpreterPath, Boolean overwrite, IEnumerable`1 ReplaceOps)
   at FileDBReader.CommandLineHandler.<>c__DisplayClass19_0.<Main>b__0(DecompressOptions o)
   at CommandLine.ParserResultExtensions.MapResult[T1,T2,T3,T4,T5,T6,T7,T8,T9,TResult](ParserResult`1 result, Func`2 parsedFunc1, Func`2 parsedFunc2, Func`2 parsedFunc3, Func`2 parsedFunc4, Func`2 parsedFunc5, Func`2 parsedFunc6, Func`2 parsedFunc7, Func`2 parsedFunc8, Func`2 parsedFunc9, Func`2 notParsedFunc)
   at FileDBReader.CommandLineHandler.Main(String[] args)

For what it's worth, the program auto-detects FileVersion 1, which seems odd, as I am using the latest version of Anno 1800.

Using the command

FileDBReader decompress -c 2 -f "..\test\Christian Jäger_S87.a7s"

does not do anything (at least not to my eyes), the error is still the same, I think.

I just tried several other save games, every one gives me the same error.

Am I doing something wrong? What's going on?

@taubenangriff
Copy link
Collaborator

taubenangriff commented Aug 1, 2022

The savegame is no filedb file.

It's an RDA archive containing 4 files. each of these is zlib compressed (and at least from my knowledge, has custom file headers).

The uncompressed results are filedb files.

I Should improve exception handling here tho.

@taubenangriff taubenangriff added the bug Something isn't working label Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants