detroitbecometext / dbh-file-parser

A tool to extract textual content from Detroit: Become Human game files.
5 stars 3 forks source link

Error during extract #1

Closed EnzoDeg40 closed 2 months ago

EnzoDeg40 commented 1 year ago

Game from Steam (I checked the entire game) OS : Windows 11 22H2

D:\Github\dbh-file-parser\build\win-x64>FileParser.exe extract -v -i "E:\SteamLibrary\steamapps\common\Detroit Become Human" -o "E:\SteamLibrary\steamapps\common\Detroit Become Human\out"

"BigFile_PC.d01": Done !
"BigFile_PC.d02": Section 1 of 8 -- 4% of section processed...
"BigFile_PC.d03": Section 1 of 42 -- 4% of section processed...
"BigFile_PC.d04": Section 1 of 1 -- 4% of section processed...
"BigFile_PC.d05": Section 1 of 1 -- 4% of section processed...
"BigFile_PC.d06": Section 1 of 25 -- 4% of section processed...
"BigFile_PC.d07": Section 1 of 9 -- 4% of section processed...
"BigFile_PC.d10": Section 1 of 3 -- 4% of section processed...
"BigFile_PC.d11": Section 1 of 84 -- 4% of section processed...
"BigFile_PC.d12": Section 1 of 95 -- 4% of section processed...
"BigFile_PC.d13": Section 1 of 70 -- 4% of section processed...
"BigFile_PC.d14": Section 1 of 104 -- 4% of section processed...
"BigFile_PC.d15": Section 1 of 82 -- 4% of section processed...
"BigFile_PC.d16": Section 1 of 95 -- 4% of section processed...
"BigFile_PC.d17": Section 1 of 91 -- 4% of section processed...
"BigFile_PC.d18": Section 1 of 45 -- 4% of section processed...
"BigFile_PC.d19": Section 1 of 52 -- 4% of section processed...
"BigFile_PC.d20": Section 1 of 63 -- 4% of section processed...
"BigFile_PC.d21": Section 1 of 114 -- 4% of section processed...
"BigFile_PC.d22": Section 1 of 85 -- 4% of section processed...
"BigFile_PC.d23": Section 1 of 18 -- 4% of section processed...
"BigFile_PC.d24": Section 1 of 1 -- 4% of section processed...
"BigFile_PC.d26": Section 1 of 1 -- 4% of section processed...
"BigFile_PC.dat": Section 6 of 6 -- 75% of section processed...
Unhandled exception: System.InvalidOperationException: Sequence contains no elements
   at System.Linq.ThrowHelper.ThrowNoElementsException()
   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   at FileParser.Extraction.FileExtractor.FindValue(Byte[] buffer, Int32 currentKeyOffset, Byte[] currentKeyBytes, Byte[] nextKeyBytes, Boolean getUntilEndOfBuffer)
   at FileParser.Extraction.FileExtractor.ExtractAsync(ExtractParameters parameters, CancellationToken token)
   at FileParser.Extraction.ExtractionService.RunExtractionAsync(ExtractParameters parameters, CancellationToken token)
   at FileParser.Extraction.ExtractionService.ExtractAsync(ExtractParameters parameters, CancellationToken token)
   at System.CommandLine.Invocation.CommandHandler.GetResultCodeAsync(Object value, InvocationContext context)
   at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseErrorReporting>b__19_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseHelp>b__13_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass23_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__21_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseDirective>b__18_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseDebugDirective>b__10_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__9_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseExceptionHandler>b__0>d.MoveNext()
CofiPRT commented 8 months ago

Heh, bumping this one year later.

I am confirming this too on the Epic Games version of the game.

I tried circumventing the call to FIrst() (in the stack trace above) and skipping the throws statements related to the call to FindValue(), but I'm assuming this most probably messes up the offsets of the search...

Yeah, obviously I don't exactly know everything that is going on, so I can just give you debug info if you want, I want to get to the bottom of this.