Jump to content

EXC Memory stream is not expandable - A20.4 b42 - Dedicated Server Fix


MilordWizardKing

Recommended Posts

The issue appears to come from the way that data is saved to a player profile. Somehow they got the beans above the frank in A20.4 b42 and messed up their serialization code. When a player's profile is read, it cant read the new serialization value and causes a Run Time Error on the client side. It looks like this is just in relation to drones, but have seen it caused by accessing a gyrocopter (couldn't replicate it though).

 

Look familiar?
 

2022-04-29T12:32:37 666.749 EXC Memory stream is not expandable.
  at System.IO.MemoryStream.set_Capacity (System.Int32 value) [0x0003d] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at System.IO.MemoryStream.EnsureCapacity (System.Int32 value) [0x00061] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at System.IO.MemoryStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 count) [0x000b3] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at StreamUtils.StreamCopy (System.IO.Stream _source, System.IO.Stream _destination, System.Byte[] _tempBuf, System.Boolean _bFlush) [0x00029] in :0 
  at PlayerDataFile.Write (PooledBinaryWriter _bw) [0x003b3] in :0 
  at NetPackagePlayerId.write (PooledBinaryWriter _writer) [0x00020] in :0 
  at NetConnectionSimple.taskSerialize (ThreadManager+ThreadInfo _threadInfo) [0x004f3] in :0 
UnityEngine.StackTraceUtility:ExtractStringFromException(Object)
Log:Exception(Exception)
NetConnectionSimple:taskSerialize(ThreadInfo)
ThreadManager:myThreadInvoke(Object)
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
System.Threading.ThreadHelper:ThreadStart(Object)

 

So how do you fix it?
If your hosting provider allows you, change the server to BETA version Alpha 20.3. 
*your clients will need to do this too
Once thats been done, restore the affected player's profile (~/Save/../Player/<steam_id>.ttp) from the .bak version.

Delete drone.dat and drone.bak to force a recreation with an accurate serialization object stream
Bounce the box
Have affected user log in
Go to the Winchester have a nice cold pint 

Link to comment
Share on other sites

iv the same problem

1.when u change back ur server the BETA, ur savegame wont work (on gportal servers)

2.the problem is NOT THE DRONE !..its the combination with something else...(in my case its the motorbike/minibike and a block in 1 house)

when i use the bike , i can play hours and hours with drone ...when we get near motorbike=crash

Edited by 7daysOfFun (see edit history)
Link to comment
Share on other sites

2 hours ago, 7daysOfFun said:

iv the same problem

1.when u change back ur server the BETA, ur savegame wont work (on gportal servers)

2.the problem is NOT THE DRONE !..its the combination with something else...(in my case its the motorbike/minibike and a block in 1 house)

when i use the bike , i can play hours and hours with drone ...when we get near motorbike=crash

So it is the drone - but its tricky because some logs have basically shown that you do not even have to use it. A user recently showed me an example of logs with drone but he never once even used or summoned one. If you are right and it is not the drone ai or subroutine please show me a log of next time you get the error. It very well may not be 100% the drone but I need a log that has proof to believe that.

Edited by P3rf3ctVZer0 (see edit history)
Link to comment
Share on other sites

Thanks MilordWizardKing for posting your fix as well - This enabled me to start playing again! Was worried I'd have a corrupt save or something for a moment there.

 

I encountered this when standing 'near' my motorcycle, with my drone active, more specifically, it happened when I upgraded a 'Ladder' block, and mistakenly upgraded the bottom half of the ladder before the top, which caused the ladder to fall, and when the ladder fell, it triggered the error.

From there, relog/restart server did nothing to fix the errors, and my profile would no longer save. 

 

"EDIT":

Actually I may have spoken too soon. My drone disappeared, but to no surprise considering deleting 'drones.dat/.bak' was part of the fix, but I got spare drone out of one of my storage boxes, and that triggered the error again.... I guess i just have to not use drones if i want to play? :(

Edited by Dangeross (see edit history)
Link to comment
Share on other sites

I am having the EXACT same issue. I am stuck in a death loop because the games goes into it's crash mode and won't load the next chunk so I fall through the world forever. It definitely coincides with using the motorcycle and a drone as previously I was using the 4x4 and drone with no issues but decided to change to my motorcycle to make a speed run into the wasteland for some loot. Hope this gets fixed because I can no longer play multiplayer with my friends until it does.

Link to comment
Share on other sites

6 hours ago, Beelzybub said:

As soon as you get in the game, press F1 and type "tp 0 0 0". Do it as fast as possible. Maybe even practice first.

 

No need to practice LOL

You can bring up the console while the game is still loading. Enter dm in the console to allow teleport.

Have the teleport command loaded and hit Enter to send it, as soon as you spawn.

Link to comment
Share on other sites

On 4/30/2022 at 4:08 AM, P3rf3ctVZer0 said:

So it is the drone - but its tricky because some logs have basically shown that you do not even have to use it. A user recently showed me an example of logs with drone but he never once even used or summoned one. If you are right and it is not the drone ai or subroutine please show me a log of next time you get the error. It very well may not be 100% the drone but I need a log that has proof to believe that.

https://pastebin.com/z2eDFbi3

 

heres my FULL logs..we cant play the game anymore, because it is horror to play

 

first i get to the destroyed area (perhaps u read this in the logs) then itunes a half broke house, then ONE block was with error...after THEN the problem begun

go near motorbike = crash...then i opened the cheat menu and get the big motorbike for usw = same problem

we stopped playing after circa 10x relogin to check this...

what makes ME CURIOS is...the time when i take the screenshot LOG, and the time were i copied the text log...

20220427_213658.jpg

Link to comment
Share on other sites

Yeah but according to your log nothing abnormal about vehicles but you said you had no drones while drone subroutines are running anyways. Not disregarding possible vehicle issues but I have been able to create the bug with just drones. (No vehicles.) mind you too that Vehicle scripts never ran because I didn't use vehicles.

Link to comment
Share on other sites

I had this happen to me on my fiance's game.  The fix is confusing me and I'm not sure how to tell him how to fix it.  I'm able to play somewhat but the lag gets super bad in city and when I spawn into the game I'm not where I was when I left his game.  I don't think it's a dedicated server, I can only access the game when he's in it.

Edited by Shayberrie
More information (see edit history)
Link to comment
Share on other sites

19 hours ago, Beelzybub said:

As soon as you get in the game, press F1 and type "tp 0 0 0". Do it as fast as possible. Maybe even practice first.

I'll give it a go, but this is in a multiplayer game so I have to get the server admin to enable DM mode. Guess I'll be abandoning my motorcycle and never returning to that area or else I'll start crashing again?

Link to comment
Share on other sites

Has anyone had this cause them not to be able to log into any online servers. We started experiencing this as soon as we got the Robotic Drone on the server. First another character started experiencing it almost as soon as he found his first Robotic Drone. He was in a Rotocopter when it happened. I experienced it not long after placed the drone down. I only had the 4x4 as vehicles placed in the world. After we figured out it was the drone causing it we picked the drones up and that seemed to fix it. I could not just leave it alone though. So I tried experimenting with different locations, mods on the drone, etc. Long story short I have this bug combined with the lost drone/to many drones deployed (my drone is in my backpack, but game thinks it is still in the world). Now I can not get into any online servers at all. It gets hung on the creating character step for both my server and other servers that I have tried. Do the developers have a clue as to this bug and when might they fix it?

Link to comment
Share on other sites

13 minutes ago, Edwardson said:

Do the developers have a clue as to this bug and when might they fix it?

The community has diagnosed it as an issue with the player ttp files becoming stuffed with erroneous (repetitive) bytes towards the end of file which causes the file to swell above the limit of 2MB. Supposedly you can delete a bunch of the bytes from the file (server-side) and it temporarily fixes the problem, but people are having a hard time figuring out which exact bytes need to be deleted (and if you guess wrong it just uses the borked .bak file). Without an ICD from the devs it's trial and error to edit these by hand. I would think a game-breaking issue like this would top priority and it appears to be relatively easy to solve but haven't seen any progress from the devs.

Edited by mecks (see edit history)
Link to comment
Share on other sites

I have little to no experience in editing config and save files. I did find where the launcher will let you "clean" game files. If I used this, would it have any effect on the server and would I delete my character on the server? The interaction between single player and multiplayer is about as clear to me as frosted glass, but I was under the impression that all of the player's data when playing online was stored by the server. I have the option to FTP into the server files, but when I try it just wants to open it in browser where I can not edit the character files.

 

What is a good program to open the FTP site with and edit the files?

Link to comment
Share on other sites

Happened to someone on my server. I tried to profile fix as stated. We will see what happens. I had done a map reset on 20.3 but kept the data when i updated to 20.4. Need to do another reset anyway but this would be nice if it works. Thanks everyone for the feedback. I also recently had to disable EAC since the update otherwise no one could get in. Most likely doesn't help that this same world has been through 3 updates.

Link to comment
Share on other sites

Why is there no hot fix for this yet? I cannot play multiplayer at all with my friends (unless I am willing to do a workaround to cleanse my profile or start a new character) as long as this error exists. The player-base has pretty much figured out what the problem is. This may be the first time I truly feel let down by the dev team. ETA on fix???

Link to comment
Share on other sites

1 hour ago, Astrocreep137 said:

Why is there no hot fix for this yet? I cannot play multiplayer at all with my friends (unless I am willing to do a workaround to cleanse my profile or start a new character) as long as this error exists. The player-base has pretty much figured out what the problem is. This may be the first time I truly feel let down by the dev team. ETA on fix???

 

Per my last post I had the same issue. I ended up doing a map change/reset. It's been about 3 months anyway. Still annoying. I will see how it goes with the new reset. Day number 3 and so far so good. I don't think their patch notes said it needed a reset but sometimes stuff happens.

 

Has anyone had it happen to new save data post the 20.4 b42 update? For example had issues after doing a new setup after the time of the update.

Link to comment
Share on other sites

I run my own dedicated server on another PC in my house.  I was just riding my minibike when I got this error on the screen.

 

https://imgur.com/a/OVKkt5r

 

My minibike started to sink through the road so I dismounted, only to fall through the world.  Every time I load the game this error comes up at some point and weird things start to happen.  I've restarted the server 3 times, all to no avail.  Here's the results of the last time I tried to load the game:

 

https://youtu.be/EX1uADz2c0I

 

I don't know what to do.  I've read several suggestions on this thread, but I can't really make heads or tails out of them.  Any suggestions?

Link to comment
Share on other sites

5 hours ago, Kademlia said:

 

Per my last post I had the same issue. I ended up doing a map change/reset. It's been about 3 months anyway. Still annoying. I will see how it goes with the new reset. Day number 3 and so far so good. I don't think their patch notes said it needed a reset but sometimes stuff happens.

 

Has anyone had it happen to new save data post the 20.4 b42 update? For example had issues after doing a new setup after the time of the update.

 

Yes, we made a new map on 20.4 b42. Everyone started fresh. I'm on day 23. Got a drone a day ago. Ran into this error and now I can't play.

Link to comment
Share on other sites

3 hours ago, Beelzybub said:

Press "F1" and type "tp 0 0 0" in the console. When the game starts press enter.

 

The player that had the issue on my server could not even get a chance to do that. Also since it goes above 2MB in profile size does anything stop working for the player with the enlarged profile?

 

If it happens again I will have to do more trial and error with the editing of the profile. Last time it didn't work but only gave it 2 attempts. Plus it was not my profile so I had to work with the person to test.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...