Nenkai / PCarsTools

Set of tools for dealing with Project Cars files.
MIT License
13 stars 4 forks source link

Can't unpack PC2 BFF file #11

Closed oleroc closed 10 months ago

oleroc commented 1 year ago

A few BFF's in PC2 won't unpack. The error message is: Unhandled exception. System.IndexOutOfRangeException: Index was outside the bounds of the array. at PCarsTools.Config.BPatternFilterRule.Matches(Byte[] input) in C:\Users\nenkai\source\repos\PCarsTools\PCarsTools\Config\BPatternFilterRule.cs:line 23 at PCarsTools.Config.BPatternFilter.IsAccepted(String str) in C:\Users\nenkai\source\repos\PCarsTools\PCarsTools\Config\BPatternFilter.cs:line 35 at PCarsTools.Config.BConfig.GetPatternIdx(String fileName) in C:\Users\nenkai\source\repos\PCarsTools\PCarsTools\Config\BConfig.cs:line 112 at PCarsTools.BPakFile.FromStream(Stream stream, Boolean withExtraInfo, String tocFileName) in C:\Users\nenkai\source\repos\PCarsTools\PCarsTools\BPakFile.cs:line 73 at PCarsTools.BPakFile.FromFile(String inputFile, Boolean withExtraInfo) in C:\Users\nenkai\source\repos\PCarsTools\PCarsTools\BPakFile.cs:line 53 at PCarsTools.Program.Pak(PakVerbs options) in C:\Users\nenkai\source\repos\PCarsTools\PCarsTools\Program.cs:line 113 at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult1 result, Action1 action) at PCarsTools.Program.Main(String[] args) in C:\Users\nenkai\source\repos\PCarsTools\PCarsTools\Program.cs:line 26

Any solution to this?

umustbeloggedintododat commented 1 year ago

It would be nice if this issue was looked into. I want to extract the 333 SP from PC2 but I'm getting this error upon extracting.

Unhandled exception. System.IndexOutOfRangeException: Index was outside the bounds of the array. at PCarsTools.Config.BPatternFilterRule.Matches(Byte[] input) in C:\Users\nenkai\source\repos\PCarsTools\PCarsTools\Config\BPatternFilterRule.cs:line 23 at PCarsTools.Config.BPatternFilter.IsAccepted(String str) in C:\Users\nenkai\source\repos\PCarsTools\PCarsTools\Config\BPatternFilter.cs:line 35 at PCarsTools.Config.BConfig.GetPatternIdx(String fileName) in C:\Users\nenkai\source\repos\PCarsTools\PCarsTools\Config\BConfig.cs:line 112 at PCarsTools.BPakFile.FromStream(Stream stream, Boolean withExtraInfo, String tocFileName) in C:\Users\nenkai\source\repos\PCarsTools\PCarsTools\BPakFile.cs:line 73 at PCarsTools.BPakFile.FromFile(String inputFile, Boolean withExtraInfo) in C:\Users\nenkai\source\repos\PCarsTools\PCarsTools\BPakFile.cs:line 53 at PCarsTools.Program.Pak(PakVerbs options) in C:\Users\nenkai\source\repos\PCarsTools\PCarsTools\Program.cs:line 113 at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult1 result, Action1 action) at PCarsTools.Program.Main(String[] args) in C:\Users\nenkai\source\repos\PCarsTools\PCarsTools\Program.cs:line 26

ghost commented 1 year ago

Have the same issue, namely with the Group A BNR32, i get the following error upon attempting to extract. i also attempted to extract the same car from PC3, with the same error:

Unhandled exception. System.IndexOutOfRangeException: Index was outside the bounds of the array. at PCarsTools.Config.BPatternFilterRule.Matches(Byte[] input) in C:\Users\nenkai\source\repos\PCarsTools\PCarsTools\Config\BPatternFilterRule.cs:line 23 at PCarsTools.Config.BPatternFilter.IsAccepted(String str) in C:\Users\nenkai\source\repos\PCarsTools\PCarsTools\Config\BPatternFilter.cs:line 35 at PCarsTools.Config.BConfig.GetPatternIdx(String fileName) in C:\Users\nenkai\source\repos\PCarsTools\PCarsTools\Config\BConfig.cs:line 112 at PCarsTools.BPakFile.FromStream(Stream stream, Boolean withExtraInfo, String tocFileName) in C:\Users\nenkai\source\repos\PCarsTools\PCarsTools\BPakFile.cs:line 73 at PCarsTools.BPakFile.FromFile(String inputFile, Boolean withExtraInfo) in C:\Users\nenkai\source\repos\PCarsTools\PCarsTools\BPakFile.cs:line 53 at PCarsTools.Program.Pak(PakVerbs options) in C:\Users\nenkai\source\repos\PCarsTools\PCarsTools\Program.cs:line 113 at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult1 result, Action1 action) at PCarsTools.Program.Main(String[] args) in C:\Users\nenkai\source\repos\PCarsTools\PCarsTools\Program.cs:line 26

Nenkai commented 10 months ago

Late, but try again with 1.1.4.