sodium-fabric icon indicating copy to clipboard operation
sodium-fabric copied to clipboard

Sodium client hangs on "Loading terrain..." when logging into a Paper 1.18.2 server while dead

Open mdcfe opened this issue 2 years ago • 17 comments

Version information

mc1.18.2-0.4.1+build.15

Expected Behavior

The client logs into the server and sees the "You died!" screen, with the option to either respawn or return to the title screen (disconnecting from the server).

2022-03-13_14 34 05 .

Actual Behavior

The client hangs at the "Loading terrain..." screen and does not progress.

2022-03-13_14 38 20

Reproduction Steps

  1. Connect to a Paper server.
  2. Die (in my case I jumped into fire)
  3. Rather than respawning, click Title Screen to disconnect from the server.
    • At this point you will stay dead until you next log in.
  4. Try to connect to the server again.
    • A vanilla client shows the "Loading terrain..." screen for a brief moment, then displays the same "You died!" screen as before logging off.
    • A Sodium client will reach the "Loading terrain..." screen and stay there indefinitely.

Java version

OpenJDK 64-Bit Server VM Temurin-17.0.1+12 (build 17.0.1+12, mixed mode, sharing)

CPU

AMD Ryzen 5 3600 6-Core Processor

GPU

NVIDIA GeForce RTX 2060

Additional information

Paper sends an empty chunk at the player's current position when they join. This is intended to close the ReceivingLevelScreen.
If a player is dead when they join, Paper won't send the actual chunks until the player respawns.

Paper version

This server is running Paper version git-Paper-"1358d1e" (MC: 1.18.2) (Implementing API version 1.18.2-R0.1-SNAPSHOT) (Git: 1358d1e)
You are running the latest version
Previous version: git-Paper-"ab03538" (MC: 1.18.2)

mdcfe avatar Mar 13 '22 15:03 mdcfe

Can confirm this issue. Doesn't happen with vanilla clients

Snewmy avatar Mar 22 '22 22:03 Snewmy

I confirm the issue. This happened to me and several players on my server. Everything is fine without Sodium.

shideus avatar Apr 09 '22 13:04 shideus

Can replicate this as well. ^

Ibotmealot avatar Apr 12 '22 18:04 Ibotmealot

Can replicate.

BakiDance avatar Apr 17 '22 03:04 BakiDance

The problem is that Paper isn't sending the neighboring chunks around the player while in this state, which leads to Sodium never submitting the chunk the player is within for rebuilds. The condition for leaving the "Loading terrain" screen requires that a chunk is built for the location you're standing in, and given it never gets built without the neighbors being there, the game freezes.

We need to patch this on our side, as I could imagine other edge cases which would freeze the game. We're finishing up Sodium 0.5 right now, and one of the final work items for it is cleaning up the chunk building/loading code. So I imagine this will only get fixed in the next major release.

jellysquid3 avatar Apr 21 '22 19:04 jellysquid3

The alternative is that Paper sends some empty chunks around the player so that Sodium will feel confident enough to re-build things. But I don't really see a reason for them to implement workarounds on their side.

jellysquid3 avatar Apr 21 '22 20:04 jellysquid3

A number of players on my server have been experiencing this issue.

Astralchroma avatar Apr 22 '22 15:04 Astralchroma

This happened to me and my friend on a pvp server all the time, we had no clue what it was so we and some other people had to ask the owner every time it happened. Fortunately he found this and sent it to us xD

WitherV avatar Apr 22 '22 15:04 WitherV

happened to me and it's super annoying

StereoMadnessss avatar May 14 '22 15:05 StereoMadnessss

I had this exact same problem when trying to connect to a considerably buggy lifesteal server experiencing null pointer errors, it was a perfect sequence of events where i was in combat, got disconnected and thus killed by combat logger, i tried to rejoin back as fast as possible and then my computer overheated.

I was running the Fabulously Optimized mod pack which included Sodium.

mettlephaontoms avatar May 26 '22 20:05 mettlephaontoms

Same issue, I had to tell the server owner to delete my playerdata file for the third time in this week now! Super annoying.

azurenekowo avatar Jun 01 '22 04:06 azurenekowo

Press esc

ghhg621 avatar Jun 07 '22 00:06 ghhg621

No as that exits the server and this is an issue when trying to join a server

StereoMadnessss avatar Jun 07 '22 14:06 StereoMadnessss

Happened to me on test.2b2t.org (paper 1.18.2) while i was NOT dead and to my friend on my paper 1.18.2 server, joining works after removing sodium or the player.dat file

dement6d avatar Jun 08 '22 21:06 dement6d

Same issue, I had to tell the server owner to delete my playerdata file for the third time in this week now! Super annoying.

Join without sodium

dement6d avatar Jun 08 '22 21:06 dement6d

Press esc

it's doesn't work

SkyWatcher2019 avatar Jun 12 '22 00:06 SkyWatcher2019

I can't join to the Paper 1.18.2 servers with sodium

BSFGP avatar Jun 17 '22 19:06 BSFGP

Any progress being made on this?

Flexico avatar Dec 13 '22 10:12 Flexico

This should be fixed in the latest version of Sodium. If not, open a new issue...

jellysquid3 avatar Jul 22 '23 02:07 jellysquid3