Mirror icon indicating copy to clipboard operation
Mirror copied to clipboard

List Server Example EndOfStreamException

Open MrGadget1024 opened this issue 7 years ago • 3 comments

Unity 2018.3.11 Mirror master imported just before this test.

EndOfStreamException: Unable to read beyond the end of the stream.
System.IO.__Error.EndOfFile () (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
System.IO.BinaryReader.FillBuffer (System.Int32 numBytes) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
System.IO.BinaryReader.ReadUInt16 () (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
Mirror.Examples.ListServer.ListServer.ParseMessage (System.Byte[] bytes) (at <ae8655151eb945638b28e178a2a05427>:0)
Mirror.Examples.ListServer.ListServer.TickClient () (at <ae8655151eb945638b28e178a2a05427>:0)
Mirror.Examples.ListServer.ListServer.Tick () (at <ae8655151eb945638b28e178a2a05427>:0)

image

MrGadget1024 avatar Apr 02 '19 12:04 MrGadget1024

thanks for letting me know, I probably forgot to update it

miwarnec avatar Apr 02 '19 13:04 miwarnec

This happens when invalid data is sent by the server that registered.

For example if the first two bytes of the payload are "0xffff", it will try to read 65k characters for the title. Thus going out of stream.

TwoTenPvP avatar Apr 02 '19 18:04 TwoTenPvP

This is still happening with the LisServer example in the Mirror version I just got from the Unity asset store.

tommensink avatar Aug 13 '19 13:08 tommensink