EndOfStreamException when resetting a POI with workstations inside it

bdubyah

Hunter
Version
2.5
Platform
Windows
Disclaimer: This is a modding bug as it currently doesn't affect vanilla.

If you uncomment the lines for the workstation placeholders so that there are chances for working workstations to spawn in the world, you can run into EndOfStreamException errors when resetting the POI for a quest that breaks the reset and the quest. Just posting this in the hopes maybe it could get looked at whenever time permits. I know vanilla moved away from this feature but it would be nice if it were still possible to do with mods.

This is the error when hitting the rally marker:

Code:
EndOfStreamException: Attempted to read past the end of the stream.
  at PooledBinaryReader.FillBuffer (System.Int32 _numBytes) [0x00030] in <af8fe50b988940849fcde241ddfed80f>:0
  at PooledBinaryReader.ReadInt32 () [0x00000] in <af8fe50b988940849fcde241ddfed80f>:0
  at TypedMetadataValue.Read (System.IO.BinaryReader reader) [0x00002] in <af8fe50b988940849fcde241ddfed80f>:0
  at ItemValue.ReadData (System.IO.BinaryReader _br, System.Int32 version) [0x000b5] in <af8fe50b988940849fcde241ddfed80f>:0
  at ItemValue.Read (System.IO.BinaryReader _br) [0x00012] in <af8fe50b988940849fcde241ddfed80f>:0
  at ItemStack.Read (System.IO.BinaryReader _br) [0x00015] in <af8fe50b988940849fcde241ddfed80f>:0
  at TileEntityWorkstation.readItemStackArray (System.IO.BinaryReader _br, ItemStack[]& stack) [0x00026] in <af8fe50b988940849fcde241ddfed80f>:0
  at TileEntityWorkstation.read (PooledBinaryReader _br, TileEntity+StreamModeRead _eStreamMode) [0x001c9] in <af8fe50b988940849fcde241ddfed80f>:0
  at NetPackageTileEntity.ProcessPackage (World _world, GameManager _callbacks) [0x0007b] in <af8fe50b988940849fcde241ddfed80f>:0
  at ConnectionManager.ProcessPackages (INetConnection _connection, NetPackageDirection _disallowedDirection, ClientInfo _clientInfo) [0x000f0] in <af8fe50b988940849fcde241ddfed80f>:0
  at ConnectionManager.Update () [0x00179] in <af8fe50b988940849fcde241ddfed80f>:0

I included the full log as well if that is of any use. The user was running my Wasteland mod and its dependencies so it will still show 2.4b7 but it has been a thing throughout 2.0 and further back I'm pretty sure. The TileEntity.CopyFrom error had been fixed and I hoped it solved this issue but it seems not. Hopefully someone can look into it eventually. :)
 
Reproduction Steps
Run a mod that adds working stations back into the world, or just uncomment the lines from vanilla's blockplaceholders.xml for blocks like cntForgeBustedRandomLootHelper so that there can be working ones. Then find one in the world a get a quest to it. Hitting the rally marker will throw the EOS error and it will break the POI reset action.
Link to Logs
https://pastebin.com/FDPQD9Dw
Link to Screenshot/Video
https://pastebin.com/FDPQD9Dw
Back
Top