DCNick3 / ShinDataUtil

This is an utility for working with game files of Higurashi no Naku Koro ni and Kono Subarashii Sekai ni Shukufuku wo! Kibou no Meikyuu to Tsudoishi Boukenshata Plus (see branch konosuba) visual novels released for Nintendo Switch.
GNU General Public License v2.0
18 stars 4 forks source link

txa encode doesn't work #12

Open Lilislv opened 6 days ago

Lilislv commented 6 days ago
D:\Games\vns\normal\higutr>dotnet run txa-encode D:\Games\vns\normal\higutr\data\txa title.txa
D:\Games\vns\normal\higutr\ShinDataUtil.csproj : warning NU1903: Package 'Newtonsoft.Json' 12.0.3 has a known high seve
rity vulnerability, https://github.com/advisories/GHSA-5crp-9r3c-p9vr
D:\Games\vns\normal\higutr\ShinDataUtil.csproj : warning NU1902: Package 'SixLabors.ImageSharp' 1.0.0-beta0007 has a kn
own moderate severity vulnerability, https://github.com/advisories/GHSA-5x7m-6737-26cr
D:\Games\vns\normal\higutr\ShinDataUtil.csproj : warning NU1903: Package 'SixLabors.ImageSharp' 1.0.0-beta0007 has a kn
own high severity vulnerability, https://github.com/advisories/GHSA-63p8-c4ww-9cg7
D:\Games\vns\normal\higutr\ShinDataUtil.csproj : warning NU1903: Package 'SixLabors.ImageSharp' 1.0.0-beta0007 has a kn
own high severity vulnerability, https://github.com/advisories/GHSA-65x7-c272-7g7r
D:\Games\vns\normal\higutr\ShinDataUtil.csproj : warning NU1902: Package 'SixLabors.ImageSharp' 1.0.0-beta0007 has a kn
own moderate severity vulnerability, https://github.com/advisories/GHSA-g85r-6x2q-45w7
D:\Games\vns\normal\higutr\ShinDataUtil.csproj : warning NU1902: Package 'SixLabors.ImageSharp' 1.0.0-beta0007 has a kn
own moderate severity vulnerability, https://github.com/advisories/GHSA-qxrv-gp6x-rc23
D:\Games\vns\normal\higutr\ShinDataUtil.csproj : warning NU1903: Package 'Newtonsoft.Json' 12.0.3 has a known high seve
rity vulnerability, https://github.com/advisories/GHSA-5crp-9r3c-p9vr
D:\Games\vns\normal\higutr\ShinDataUtil.csproj : warning NU1902: Package 'SixLabors.ImageSharp' 1.0.0-beta0007 has a kn
own moderate severity vulnerability, https://github.com/advisories/GHSA-5x7m-6737-26cr
D:\Games\vns\normal\higutr\ShinDataUtil.csproj : warning NU1903: Package 'SixLabors.ImageSharp' 1.0.0-beta0007 has a kn
own high severity vulnerability, https://github.com/advisories/GHSA-63p8-c4ww-9cg7
D:\Games\vns\normal\higutr\ShinDataUtil.csproj : warning NU1903: Package 'SixLabors.ImageSharp' 1.0.0-beta0007 has a kn
own high severity vulnerability, https://github.com/advisories/GHSA-65x7-c272-7g7r
D:\Games\vns\normal\higutr\ShinDataUtil.csproj : warning NU1902: Package 'SixLabors.ImageSharp' 1.0.0-beta0007 has a kn
own moderate severity vulnerability, https://github.com/advisories/GHSA-g85r-6x2q-45w7
D:\Games\vns\normal\higutr\ShinDataUtil.csproj : warning NU1902: Package 'SixLabors.ImageSharp' 1.0.0-beta0007 has a kn
own moderate severity vulnerability, https://github.com/advisories/GHSA-qxrv-gp6x-rc23
Unhandled exception. SixLabors.ImageSharp.ImageFormatException: Bad method for ZLIB header: cmf=33
   at SixLabors.ImageSharp.Formats.Png.Zlib.ZlibInflateStream.InitializeInflateStream()
   at SixLabors.ImageSharp.Formats.Png.Zlib.ZlibInflateStream.AllocateNewBytes(Int32 bytes)
   at SixLabors.ImageSharp.Formats.Png.PngDecoderCore.Decode[TPixel](Stream stream)
   at SixLabors.ImageSharp.Formats.Png.PngDecoder.Decode[TPixel](Configuration configuration, Stream stream)
   at SixLabors.ImageSharp.Image.<>c__DisplayClass93_0`1.<Load>b__0(Stream s)
   at SixLabors.ImageSharp.Image.WithSeekableStream[T](Configuration config, Stream stream, Func`2 action)
   at SixLabors.ImageSharp.Image.Load[TPixel](Stream stream, IImageDecoder decoder)
   at ShinDataUtil.Compression.ShinTxaEncoder.<>c__DisplayClass3_0.<BuildTxa>b__0(String _) in D:\Games\vns\normal\higutr\Compression\ShinTxaEncoder.cs:line 95
   at System.Linq.Enumerable.SelectArrayIterator`2.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func)
   at System.Linq.Enumerable.SelectArrayIterator`2.ToArray()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.ToArray()
   at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)
   at ShinDataUtil.Compression.ShinTxaEncoder.BuildTxa(Stream outtxa, String sourceDirectory) in D:\Games\vns\normal\higutr\Compression\ShinTxaEncoder.cs:line 84
   at ShinDataUtil.Program.TxaEncode(ReadOnlySpan`1 args) in D:\Games\vns\normal\higutr\Program.cs:line 356
   at ShinDataUtil.Program.ActionList.Execute(String actionname, ReadOnlySpan`1 args) in D:\Games\vns\normal\higutr\Program.cs:line 813
   at ShinDataUtil.Program.MainWrap(String[] args) in D:\Games\vns\normal\higutr\Program.cs:line 850
   at ShinDataUtil.Program.Main(String[] args) in D:\Games\vns\normal\higutr\Program.cs:line 857
DCNick3 commented 6 days ago

Hm, this might be .NET 6 regression fixed back in 2021 by https://github.com/SixLabors/ImageSharp/pull/1707. I'll try reproducing this a bit later