EgoEngineModding / ego.nefsedit

NeFS archive editor for Ego Engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error extracting tracksplit.pssg

victorbush opened this issue · comments

Open \locations\germany__germany_rally_01.nefs.
Try to extract tracksplit.pssg.

Following error happens:

Error extracting item tracks\locations\germany\germany_rally_01\tracksplit.pssg.
System.IO.InvalidDataException: Block length does not match with its complement.
   at System.IO.Compression.Inflater.DecodeUncompressedBlock(Boolean& end_of_block)
   at System.IO.Compression.Inflater.Decode()
   at System.IO.Compression.Inflater.Inflate(Byte[] bytes, Int32 offset, Int32 length)
   at System.IO.Compression.DeflateStream.Read(Byte[] array, Int32 offset, Int32 count)
   at System.IO.Stream.InternalCopyTo(Stream destination, Int32 bufferSize)
   at System.IO.Stream.CopyTo(Stream destination)
   at VictorBush.Ego.NefsLib.NefsItem.Extract(String outputDir, String outputFileName, NefsProgressInfo p) in E:\Git\victorbush.ego.nefsedit\VictorBush.Ego.NefsLib\NefsItem.cs:line 515
   at VictorBush.Ego.NefsEdit.UI.EditorForm.<>c__DisplayClass9_0.<ExtractItems>b__0()

This is the only file with which the bug happens in all locations nefs. Also the weird part is that it always crashes on the same block even in different files 6540 off of the top of my head. But I might be wrong.

Tried to look into it but am stumped.

I also get this when extracting s_amb_germany_rally_01.bnk.

Also strange note: when extracting the tracksplit.pssg, it seems to choke on blocks of 0x10000 bytes. If i skip those blocks and treat them as unencrypted/uncompressed (just copy them direct), then I can open the resulting pssg file in the pssg editor.

That hack didn't work for s_amb_germany_rally_01.bnk though.

File size is correct. There are 797 chunks that it chokes on. The PSSG viewer allows browsing of most textures, but there are some that it can't view, so possibly some corruption in there.

It seems treestextures.pssg is suffering from the same problem. (usa rally 0 from DR2.0) EgoEngineModding/Ego-Engine-Modding#24

[09:01:06 ERR] Failed to extract item treestextures.pssg.
System.IO.InvalidDataException: Found invalid data while decoding.
   at System.IO.Compression.DeflateStream.EndRead(IAsyncResult asyncResult)
   at System.IO.Stream.<>c.<BeginEndReadAsync>b__43_1(Stream stream, IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncTrimPromise`1.Complete(TInstance thisRef, Func`3 endMethod, IAsyncResult asyncResult, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.IO.Stream.<CopyToAsyncInternal>d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at VictorBush.Ego.NefsLib.Utility.StreamExtensions.<CopyToAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at VictorBush.Ego.NefsLib.IO.NefsTransformer.<DetransformChunkAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at VictorBush.Ego.NefsLib.IO.NefsTransformer.<DetransformAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at VictorBush.Ego.NefsLib.IO.NefsTransformer.<DetransformFileAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at VictorBush.Ego.NefsEdit.Workspace.NefsEditWorkspace.<ExtractFileAsync>d__75.MoveNext()