PDA

View Full Version : Multiplayer NotSupportedException: Cannot expand this MemoryStream



rucky
09-12-2015, 07:52 PM
Hello,

I got that Error when a friend wanted to join on my mp game (no dedi running) as soon as he tried to connect to me.
First I saw the 7daystodie.exe was 3.7 GB Ram then going down to 2.7 GB.
Also with 2.7 GB we got the same error.

To check that I started a dedi server on my machine, started the game (on the same machine) trying to connect to localhost. Same result (part of).
But I got the error for that:



ERR Task_CommWriterSteam (cl=76561198011537516, ch=0):
EXC Cannot expand this MemoryStream
NotSupportedException: Cannot expand this MemoryStream
at System.IO.MemoryStream.set_Capacity (Int32 value) [0x00000] in <filename unknown>:0
at System.IO.MemoryStream.Expand (Int32 newSize) [0x00000] in <filename unknown>:0
at System.IO.MemoryStream.Write (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0
at System.IO.BinaryWriter.Write (System.Byte[] buffer) [0x00000] in <filename unknown>:0
at NetPackageConfigFile.write (System.IO.BinaryWriter _writer) [0x00000] in <filename unknown>:0
at NetConnectionSteam.Task_CommWriter (.TaskInfo _threadInfo) [0x00000] in <filename unknown>:0
UnityEngine.Debug:Internal_LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
Logger:masterLogException(Exception)
Logger:Exception(Exception)
Log:Exception(Exception)
NetConnectionSteam:Task_CommWriter(TaskInfo)
ThreadManager:D(Object)


Is this a known problem?

rucky
09-14-2015, 11:04 AM
After some more testing I'm sure it has to do with the item size (file size or number of items) as when I add MANY items to the items.xml the error is ALWAYS there (reproducable), if adding only a portion then multiplayer connect and playing is fine.

Can that be a hardcoded limit for the initial file transfer between the players and the server/hosting player?
And can that be increased to support bigger changes?

angmoroz
11-24-2015, 02:47 AM
I also have this problem

DEADication
11-24-2015, 03:02 AM
I also have this problem

Look here.

https://7daystodie.com/forums/showthread.php?32739-Bug-NotSupportedException-Cannot-expand-this-MemoryStream