Hey,
I’m getting some errors with the deserializer when attempting to run this on Unity Xbox.
Caught exception when loading from zip Ionic.Zip.ZipException: Cannot read that as a ZipFile ---> System.ArgumentOutOfRangeException: Argument is out of range. Parameter name: Offset out of range. 3171090432 at System.IO.MemoryStream.Seek (Int64 offset, SeekOrigin loc) [0x00000] in <filename unknown>:0 at Ionic.Zip.ZipFile.ReadIntoInstance (Ionic.Zip.ZipFile zf) [0x00000] in <filename unknown>:0 --- End of inner exception stack trace --- at Ionic.Zip.ZipFile.ReadIntoInstance (Ionic.Zip.ZipFile zf) [0x00000] in <filename unknown>:0 at Ionic.Zip.ZipFile.Read (System.IO.Stream zipStream, System.IO.TextWriter statusMessageWriter, System.Text.Encoding encoding, System.EventHandler
1 readProgress) [0x00000] in :0
at Ionic.Zip.ZipFile.Read (System.IO.Stream zipStream) [0x00000] in :0
at Pathfinding.Serialization.AstarSerializer.OpenDeserialize (System.Byte[] bytes) [0x00093] in D:\Projects\Slender\Assets\Extensions\AstarPathfindingProject\Core\Serialization\JsonSerializer.cs:337
(Filename: E:/xbox/Runtime/ExportGenerated/Xbox360Player/UnityEngineDebug.cpp Line: 54)
Invalid data file (cannot read zip). Trying to load with old deserializer (pre 3.1)…
(Filename: E:/xbox/Runtime/ExportGenerated/Xbox360Player/UnityEngineDebug.cpp Line: 54)
Deserializing…
(Filename: E:/xbox/Runtime/ExportGenerated/Xbox360Player/UnityEngineDebug.cpp Line: 54)
Caught exception while deserializing data.
System.IO.EndOfStreamException: Failed to read past end of stream.
at System.IO.BinaryReader.FillBuffer (Int32 numBytes) [0x00000] in :0
at System.IO.BinaryReader.ReadInt32 () [0x00000] in :0
at Pathfinding.AstarSerializer.DeserializeAnchors () [0x00042] in D:\Projects\Slender\Assets\Extensions\AstarPathfindingProject\Core\Serialization\GraphLoaderHistory\AstarSerialize.cs:520
at Pathfinding.AstarSerializer.OpenDeserialize (System.Byte[] data) [0x00013] in D:\Projects\Slender\Assets\Extensions\AstarPathfindingProject\Core\Serialization\GraphLoaderHistory\AstarSerialize.cs:176
at Pathfinding.AstarData.DeserializeGraphs_oldInternal (Pathfinding.AstarSerializer serializer, System.Byte[] bytes) [0x00035] in D:\Projects\Slender\Assets\Extensions\AstarPathfindingProject\Core\AstarData.cs:420
at Pathfinding.AstarData.DeserializeGraphs_oldInternal (Pathfinding.AstarSerializer serializer) [0x00000] in D:\Projects\Slender\Assets\Extensions\AstarPathfindingProject\Core\AstarData.cs:398
at Pathfinding.AstarData.DeserializeGraphs (System.Byte[] bytes) [0x00041] in D:\Projects\Slender\Assets\Extensions\AstarPathfindingProject\Core\AstarData.cs:309
`
At first I thought this was just a bad filepath reference but I can’t seem to see any references to a filepath at all. The problem seems to occur here:
str = new MemoryStream(); str.Write(bytes,0,bytes.Length); str.Position = 0; try { zip = ZipFile.Read(str); } catch (ZipException e) { //Catches exceptions when an invalid zip file is found Debug.LogWarning ("Caught exception when loading from zip\ "+e); str.Close(); return false; }
If you have even the slightest idea what’s going on your help would be extremely appreciated.
Thanks,
Brenden