Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiplayer client error "Cannot access a closed Stream" when teleporting back from another world. #29

Open
Miigon opened this issue Dec 31, 2023 · 0 comments

Comments

@Miigon
Copy link

Miigon commented Dec 31, 2023

Not sure if it's a subworldlibrary problem, a thestarsabove problem or a tmodloader problem.
Reproducible even with only the host player online.

Versions

tModLoader: v2023.10.3.0
Terraria: v1.4.4.9
SubworldLibrary: v2,2.2
TheStarsAbove: v2.0.2.1

The only mods installed are SubworldLibrary & TheStarsAbove.

Steps to reproduce

  1. use "Multiplayer->Host & Play" to host a multiplayer game.
  2. use the spacial disk to teleport to Observatory Hyperborea.
  3. the teleportation should succeed. once there, use the spacial disk to teleport back to original terraria world.
  4. get stuck at "receiving tile data complete" screen.

Full server logs

[05:11:46.063] [Main Thread/INFO] [tML]: Starting tModLoader server 1.4.4.9+2023.10.3.0|2023.10|stable|Stable|23aa262bde1ae5440cf2b05b2f676feb787cdc95|5250055878079335727 built 2023/12/1 8:06
[05:11:46.073] [Main Thread/INFO] [tML]: Log date: 2024/1/1
[05:11:46.074] [Main Thread/INFO] [tML]: Running on Windows (v10.0.22621.0) X64 NetCore 6.0.14
[05:11:46.074] [Main Thread/INFO] [tML]: FrameworkDescription: .NET 6.0.14
[05:11:46.074] [Main Thread/INFO] [tML]: Executable: C:\Program Files (x86)\Steam\steamapps\common\tModLoader\tModLoader.dll
[05:11:46.074] [Main Thread/INFO] [tML]: Working Directory: C:\Program Files (x86)\Steam\steamapps\common\tModLoader
[05:11:46.074] [Main Thread/INFO] [tML]: Launch Parameters: -server -autoshutdown -password 1111 -lang 1 -world d:\Documents\My Games\Terraria\tModLoader\Worlds\starAboveWorld.wld -worldrollbackstokeep 2 -modpath d:\Documents\My Games\Terraria\tModLoader\Mods -steam -localsteamid [redacted] -lobby friends
[05:11:46.078] [Main Thread/INFO] [tML]: Parsed Launch Parameters: -server -autoshutdown -password 1111 -lang 1 -world d:\Documents\My Games\Terraria\tModLoader\Worlds\starAboveWorld.wld -worldrollbackstokeep 2 -modpath d:\Documents\My Games\Terraria\tModLoader\Mods -steam -localsteamid [redacted] -lobby friends
[05:11:46.796] [Main Thread/INFO] [tML]: Saves Are Located At: d:\Documents\My Games\Terraria\tModLoader
[05:11:47.247] [Main Thread/INFO] [tML]: Distribution Platform: Steam. Detection method: -steam launch parameter
[05:11:47.688] [Main Thread/INFO] [tML]: Attempt to Port from "C:\Program Files (x86)\Steam\userdata\[redacted]\105600\remote\tModLoader" to "C:\Program Files (x86)\Steam\userdata\[redacted]\105600\remote\tModLoader-1.4.3" aborted, "2023.10.3.0" is a newer version.
[05:11:47.703] [Main Thread/INFO] [Terraria]: Steam Cloud Quota: 840.2 MB available
[05:11:47.703] [Main Thread/INFO] [tML]: Steam beta branch: None
[05:11:47.704] [Main Thread/INFO] [tML]: SteamBackend: Running standard Steam Desktop Client API
[05:11:47.706] [Main Thread/INFO] [tML]: Current 1281930 Workshop Folder Directory: C:\Program Files (x86)\Steam\steamapps\common\tModLoader\..\..\workshop
[05:11:49.481] [Main Thread/DEBUG] [tML]: Network compatibility version is 2023.10.3
[05:11:52.174] [Main Thread/INFO] [tML]: Finding Mods...
[05:11:52.203] [Main Thread/INFO] [tML]: Sandboxing: SubworldLibrary (Subworld Library) v2.2.2
[05:11:52.264] [Main Thread/INFO] [tML]: Sandboxing: StarsAbove ([c/EC1B9D:The Stars Above]) v2.0.2.1
[05:11:52.446] [Main Thread/INFO] [tML]: Constructing Mods...
[05:11:52.641] [Main Thread/INFO] [tML]: Adding Content: ModLoader (tModLoader) v2023.10.3.0
[05:11:52.758] [Main Thread/INFO] [tML]: Adding Content: SubworldLibrary (Subworld Library) v2.2.2
[05:11:52.909] [Main Thread/DEBUG] [tML]: ILHook Terraria.Main::DedServ_PostModLoad(out bool) added by SubworldLibrary
[05:11:52.922] [Main Thread/DEBUG] [tML]: ILHook Terraria.NetMessage::CheckBytes(int) added by SubworldLibrary
[05:11:52.925] [Main Thread/DEBUG] [tML]: ILHook Terraria.Net.Sockets.SocialSocket::Terraria.Net.Sockets.ISocket.AsyncSend(Byte[], int, int, SocketSendCallback, object) added by SubworldLibrary
[05:11:52.929] [Main Thread/DEBUG] [tML]: ILHook Terraria.Net.Sockets.TcpSocket::Terraria.Net.Sockets.ISocket.AsyncSend(Byte[], int, int, SocketSendCallback, object) added by SubworldLibrary
[05:11:52.935] [Main Thread/DEBUG] [tML]: ILHook Terraria.Netplay::UpdateConnectedClients() added by SubworldLibrary
[05:11:52.939] [Main Thread/DEBUG] [tML]: ILHook Terraria.Main::EraseWorld(int) added by SubworldLibrary
[05:11:52.959] [Main Thread/DEBUG] [tML]: ILHook Terraria.Main::DoUpdateInWorld(Stopwatch) added by SubworldLibrary
[05:11:52.966] [Main Thread/DEBUG] [tML]: ILHook Terraria.WorldGen::UpdateWorld() added by SubworldLibrary
[05:11:53.272] [Main Thread/DEBUG] [tML]: ILHook Terraria.Player::Update(int) added by SubworldLibrary
[05:11:53.276] [Main Thread/DEBUG] [tML]: ILHook Terraria.NPC::UpdateNPC_UpdateGravity() added by SubworldLibrary
[05:11:53.310] [Main Thread/DEBUG] [tML]: ILHook Terraria.Liquid::Update() added by SubworldLibrary
[05:11:53.314] [Main Thread/DEBUG] [tML]: ILHook Terraria.Player::SavePlayer(PlayerFileData, bool) added by SubworldLibrary
[05:11:53.317] [Main Thread/DEBUG] [tML]: ILHook Terraria.IO.WorldFile::SaveWorld(bool, bool) added by SubworldLibrary
[05:11:53.376] [Main Thread/INFO] [tML]: Adding Content: StarsAbove ([c/EC1B9D:The Stars Above]) v2.0.2.1
[05:11:54.622] [Main Thread/DEBUG] [tML]: Hook Terraria.Graphics.Light.TileLightScanner::GetTileLight(int, int, out Vector3) added by StarsAbove
[05:11:54.632] [Main Thread/DEBUG] [tML]: Hook Terraria.Graphics.Light.TileLightScanner::GetTileLight(int, int, out Vector3) added by StarsAbove
[05:11:54.642] [Main Thread/WARN] [tML]: StarsAbove.Systems.Items.ItemMemorySystem has reference fields (EquippedMemories, globalItem) that may not be safe to share between clones.
For deep-cloning, add a custom Clone override and make proper copies of these fields. If shallow (memberwise) cloning is acceptable, mark the fields with [CloneByReference] or properties with [field: CloneByReference]
[05:11:54.687] [Main Thread/DEBUG] [tML]: ILHook Terraria.ModLoader.UI.UIModItem::OnInitialize() added by StarsAbove
[05:11:54.689] [Main Thread/INFO] [StarsAbove]: 'I've always wanted to write text in crash logs!' -A
[05:11:54.690] [Main Thread/INFO] [StarsAbove]: 'Eh? Doesn't that make you look like you caused it..?' -E
[05:11:54.804] [Main Thread/INFO] [tML]: Resizing...
[05:11:55.222] [Main Thread/INFO] [tML]: Configuring Content: ModLoader (tModLoader) v2023.10.3.0
[05:11:55.297] [Main Thread/INFO] [tML]: Configuring Content: SubworldLibrary (Subworld Library) v2.2.2
[05:11:55.353] [Main Thread/INFO] [tML]: Configuring Content: StarsAbove ([c/EC1B9D:The Stars Above]) v2.0.2.1
[05:11:55.915] [Main Thread/INFO] [tML]: Finalizing Content: ModLoader (tModLoader) v2023.10.3.0
[05:11:55.990] [Main Thread/INFO] [tML]: Finalizing Content: SubworldLibrary (Subworld Library) v2.2.2
[05:11:56.064] [Main Thread/INFO] [tML]: Finalizing Content: StarsAbove ([c/EC1B9D:The Stars Above]) v2.0.2.1
[05:11:56.157] [Main Thread/INFO] [tML]: RAM: tModLoader usage: 370.4 MB, All processes usage: 15.8 GB, Available: 4.1 GB, Total Installed: 20.0 GB
[05:11:56.473] [Main Thread/DEBUG] [tML]: GlobalItem registration stats. Count: 3, Slots per Entity: 3
	Instanced: 3, Conditional with slot: 0, Conditional by type: 0, Applies to single type: 0
	List Permutations: 1, Est Memory Consumption: 16 bytes
[05:11:56.554] [Main Thread/DEBUG] [tML]: GlobalNPC registration stats. Count: 15, Slots per Entity: 12
	Instanced: 12, Conditional with slot: 0, Conditional by type: 0, Applies to single type: 0
	List Permutations: 1, Est Memory Consumption: 16 bytes
[05:11:56.580] [Main Thread/DEBUG] [tML]: GlobalProjectile registration stats. Count: 1, Slots per Entity: 0
	Instanced: 0, Conditional with slot: 0, Conditional by type: 0, Applies to single type: 0
	List Permutations: 1, Est Memory Consumption: 16 bytes
[05:11:56.710] [Main Thread/INFO] [tML]: Adding Recipes...
[05:11:57.765] [.NET ThreadPool Worker/INFO] [Terraria]: Loading World: starAboveWorld, IsCloud=False, Width: 6400, Height: 1800, Evil: 1, GameMode: 2
[05:11:57.824] [.NET ThreadPool Worker/INFO] [StatusText]: Loading world data
[05:11:59.054] [.NET ThreadPool Worker/INFO] [StatusText]: Settling liquids
[05:11:59.603] [Main Thread/INFO] [Terraria]: Running one update...
[05:11:59.604] [Main Thread/INFO] [tML]: Server starting with AllowVanillaClients set to False
[05:12:02.126] [15/DEBUG] [tML]: SSDP search line separator: CRLF
[05:12:02.190] [Main Thread/INFO] [Terraria]: Listening on port 7777
[05:12:02.468] [TCP Listen Thread/INFO] [Terraria]: 127.0.0.1:53282 is connecting...
[05:12:11.654] [5/INFO] [tML]: Currently Hosting LobbyID: 0
[05:12:11.718] [Main Thread/DEBUG] [tML]: Sending Server Config StarsAbove:StarsAboveServersideConfig {}
[05:12:12.328] [Main Thread/INFO] [Terraria]: stargazingCB has joined.
[05:12:54.978] [Main Thread/DEBUG] [tML]: Process.Start (UseShellExecute = True): "C:\Program Files (x86)\Steam\steamapps\common\tModLoader\dotnet\6.0.14\dotnet.exe" tModLoader.dll -server -showserverconsole -world "d:\Documents\My Games\Terraria\tModLoader\Worlds\starAboveWorld.wld" -subworld "StarsAbove_Observatory"
[05:12:55.741] [Main Thread/INFO] [tML]: Starting tModLoader server 1.4.4.9+2023.10.3.0|2023.10|stable|Stable|23aa262bde1ae5440cf2b05b2f676feb787cdc95|5250055878079335727 built 2023/12/1 8:06
[05:12:55.750] [Main Thread/INFO] [tML]: Log date: 2024/1/1
[05:12:55.751] [Main Thread/INFO] [tML]: Running on Windows (v10.0.22621.0) X64 NetCore 6.0.14
[05:12:55.751] [Main Thread/INFO] [tML]: FrameworkDescription: .NET 6.0.14
[05:12:55.751] [Main Thread/INFO] [tML]: Executable: C:\Program Files (x86)\Steam\steamapps\common\tModLoader\tModLoader.dll
[05:12:55.751] [Main Thread/INFO] [tML]: Working Directory: C:\Program Files (x86)\Steam\steamapps\common\tModLoader
[05:12:55.752] [Main Thread/INFO] [tML]: Launch Parameters: -server -showserverconsole -world d:\Documents\My Games\Terraria\tModLoader\Worlds\starAboveWorld.wld -subworld StarsAbove_Observatory
[05:12:55.754] [Main Thread/INFO] [tML]: Parsed Launch Parameters: -server -showserverconsole -world d:\Documents\My Games\Terraria\tModLoader\Worlds\starAboveWorld.wld -subworld StarsAbove_Observatory
[05:12:56.365] [Main Thread/INFO] [tML]: Saves Are Located At: d:\Documents\My Games\Terraria\tModLoader
[05:12:56.851] [Main Thread/INFO] [tML]: Distribution Platform: Steam. Detection method: CWD is /steamapps/
[05:12:57.120] [Main Thread/INFO] [tML]: Current 1281930 Workshop Folder Directory: .\..\..\workshop
[05:12:58.890] [Main Thread/DEBUG] [tML]: Network compatibility version is 2023.10.3
[05:13:01.648] [Main Thread/INFO] [tML]: Finding Mods...
[05:13:01.678] [Main Thread/INFO] [tML]: Sandboxing: SubworldLibrary (Subworld Library) v2.2.2
[05:13:01.744] [Main Thread/INFO] [tML]: Sandboxing: StarsAbove ([c/EC1B9D:The Stars Above]) v2.0.2.1
[05:13:01.925] [Main Thread/INFO] [tML]: Constructing Mods...
[05:13:02.127] [Main Thread/INFO] [tML]: Adding Content: ModLoader (tModLoader) v2023.10.3.0
[05:13:02.242] [Main Thread/INFO] [tML]: Adding Content: SubworldLibrary (Subworld Library) v2.2.2
[05:13:02.405] [Main Thread/DEBUG] [tML]: ILHook Terraria.Main::DedServ_PostModLoad(out bool) added by SubworldLibrary
[05:13:02.413] [Main Thread/DEBUG] [tML]: ILHook Terraria.Main::EraseWorld(int) added by SubworldLibrary
[05:13:02.433] [Main Thread/DEBUG] [tML]: ILHook Terraria.Main::DoUpdateInWorld(Stopwatch) added by SubworldLibrary
[05:13:02.437] [Main Thread/DEBUG] [tML]: ILHook Terraria.WorldGen::UpdateWorld() added by SubworldLibrary
[05:13:02.755] [Main Thread/DEBUG] [tML]: ILHook Terraria.Player::Update(int) added by SubworldLibrary
[05:13:02.759] [Main Thread/DEBUG] [tML]: ILHook Terraria.NPC::UpdateNPC_UpdateGravity() added by SubworldLibrary
[05:13:02.793] [Main Thread/DEBUG] [tML]: ILHook Terraria.Liquid::Update() added by SubworldLibrary
[05:13:02.798] [Main Thread/DEBUG] [tML]: ILHook Terraria.Player::SavePlayer(PlayerFileData, bool) added by SubworldLibrary
[05:13:02.802] [Main Thread/DEBUG] [tML]: ILHook Terraria.IO.WorldFile::SaveWorld(bool, bool) added by SubworldLibrary
[05:13:02.853] [Main Thread/INFO] [tML]: Adding Content: StarsAbove ([c/EC1B9D:The Stars Above]) v2.0.2.1
[05:13:04.126] [Main Thread/DEBUG] [tML]: Hook Terraria.Graphics.Light.TileLightScanner::GetTileLight(int, int, out Vector3) added by StarsAbove
[05:13:04.137] [Main Thread/DEBUG] [tML]: Hook Terraria.Graphics.Light.TileLightScanner::GetTileLight(int, int, out Vector3) added by StarsAbove
[05:13:04.147] [Main Thread/WARN] [tML]: StarsAbove.Systems.Items.ItemMemorySystem has reference fields (EquippedMemories, globalItem) that may not be safe to share between clones.
For deep-cloning, add a custom Clone override and make proper copies of these fields. If shallow (memberwise) cloning is acceptable, mark the fields with [CloneByReference] or properties with [field: CloneByReference]
[05:13:04.196] [Main Thread/DEBUG] [tML]: ILHook Terraria.ModLoader.UI.UIModItem::OnInitialize() added by StarsAbove
[05:13:04.199] [Main Thread/INFO] [StarsAbove]: 'I've always wanted to write text in crash logs!' -A
[05:13:04.199] [Main Thread/INFO] [StarsAbove]: 'Eh? Doesn't that make you look like you caused it..?' -E
[05:13:04.315] [Main Thread/INFO] [tML]: Resizing...
[05:13:04.816] [Main Thread/INFO] [tML]: Configuring Content: ModLoader (tModLoader) v2023.10.3.0
[05:13:04.891] [Main Thread/INFO] [tML]: Configuring Content: SubworldLibrary (Subworld Library) v2.2.2
[05:13:04.945] [Main Thread/INFO] [tML]: Configuring Content: StarsAbove ([c/EC1B9D:The Stars Above]) v2.0.2.1
[05:13:05.555] [Main Thread/INFO] [tML]: Finalizing Content: ModLoader (tModLoader) v2023.10.3.0
[05:13:05.632] [Main Thread/INFO] [tML]: Finalizing Content: SubworldLibrary (Subworld Library) v2.2.2
[05:13:05.710] [Main Thread/INFO] [tML]: Finalizing Content: StarsAbove ([c/EC1B9D:The Stars Above]) v2.0.2.1
[05:13:05.803] [Main Thread/INFO] [tML]: RAM: tModLoader usage: 360.4 MB, All processes usage: 16.7 GB, Available: 3.3 GB, Total Installed: 20.0 GB
[05:13:06.118] [Main Thread/DEBUG] [tML]: GlobalItem registration stats. Count: 3, Slots per Entity: 3
	Instanced: 3, Conditional with slot: 0, Conditional by type: 0, Applies to single type: 0
	List Permutations: 1, Est Memory Consumption: 16 bytes
[05:13:06.202] [Main Thread/DEBUG] [tML]: GlobalNPC registration stats. Count: 15, Slots per Entity: 12
	Instanced: 12, Conditional with slot: 0, Conditional by type: 0, Applies to single type: 0
	List Permutations: 1, Est Memory Consumption: 16 bytes
[05:13:06.225] [Main Thread/DEBUG] [tML]: GlobalProjectile registration stats. Count: 1, Slots per Entity: 0
	Instanced: 0, Conditional with slot: 0, Conditional by type: 0, Applies to single type: 0
	List Permutations: 1, Est Memory Consumption: 16 bytes
[05:13:06.360] [Main Thread/INFO] [tML]: Adding Recipes...
[05:13:08.468] [Main Thread/DEBUG] [tML]: Sending Server Config StarsAbove:StarsAboveServersideConfig {}
[05:13:11.057] [14/DEBUG] [tML]: SSDP search line separator: CRLF
[05:13:11.660] [Main Thread/INFO] [Terraria]: stargazingCB has joined.
[05:13:21.702] [Main Thread/WARN] [tML]: Silently Caught Exception: 
System.ObjectDisposedException: Cannot access a closed Stream.
   at System.IO.MemoryStream.get_Position()
   at Terraria.ModLoader.ModNet.HandleModPacket(BinaryReader reader, Int32 whoAmI, Int32 length) in tModLoader\Terraria\ModLoader\ModNet.cs:line 502
   at Terraria.MessageBuffer.GetData(Int32 start, Int32 length, Int32& messageType) in tModLoader\Terraria\MessageBuffer.cs:line 3887
   at Terraria.NetMessage.CheckBytes(Int32 bufferIndex) in tModLoader\Terraria\NetMessage.cs:line 2384
   at Terraria.Netplay.UpdateServerInMainThread() in tModLoader\Terraria\Netplay.cs:line 59
   at Terraria.Main.DoUpdate(GameTime& gameTime) in tModLoader\Terraria\Main.cs:line 14195
   at Terraria.Main.Update(GameTime gameTime) in tModLoader\Terraria\Main.cs:line 14094
   at DMD<System.Void Terraria.Main:DedServ_PostModLoad(System.Boolean&)>(Main this, Boolean& reloadMods)
   at SyncProxy<System.Void Terraria.Main:DedServ_PostModLoad(System.Boolean&)>(Main , Boolean& )
   at Terraria.Main.DedServ() in tModLoader\Terraria\Main.cs:line 4528
   at Terraria.Program.RunGame() in tModLoader\Terraria\Program.cs:line 264
   at Terraria.Program.LaunchGame_(Boolean isServer) in tModLoader\Terraria\Program.cs:line 240
   at Terraria.Program.LaunchGame(String[] args, Boolean monoArgs) in tModLoader\Terraria\Program.cs:line 213
   at Terraria.MonoLaunch.Main_End(String[] args) in tModLoader\Terraria\MonoLaunch.cs:line 78
   at Terraria.MonoLaunch.<>c__DisplayClass1_0.<Main>b__1() in tModLoader\Terraria\MonoLaunch.cs:line 64
   at System.Threading.Thread.StartCallback()


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant