Sodium Reloaded (Unofficial)

Sodium Reloaded (Unofficial)

0 Downloads

Fall into the void after creating a world with SpawnRadius and SpawnChunkRadius both set to 0

201921877 opened this issue ยท 16 comments

commented

Bug Description

After creating a world with SpawnRadius and SpawnChunkRadius both set to 0, you will immediately fall into the void and die. (1.21.4+sodium 0.6.10)
Maybe don't happen on all seeds, and maybe it also depends on the device.

Reproduction Steps

1.Use the seed: 6567655725687290152 and set both SpawnRadius and SpawnChunkRadius to 0 in gamerules before creating the world.
2.Create the world.
3.Wait for several seconds.
Observed result:
You will fall into the void and die.
Excepted result:
You will spawn at (0.5,69,0.5) normally and won't fall.
Video:

202503142035.mp4

Log File

latest.log

Crash Report

crash-2025-03-14_20.42.32-client.txt

commented

Does this also happen without sodium? Your log seems to indicate the server is running 10 seconds behind and thus isn't sending you any chunks. Can't keep up! Is the server overloaded? Running 10481ms or 209 ticks behind

commented

Sodium is a client-side rendering mod, so I don't see how it could possibly be affecting server-side behaviour.

In addition, according to the wiki, there is no SpawnChunkRadius rule. (reference: https://minecraft.wiki/w/Server.properties)

commented

Does this also happen without sodium? Your log seems to indicate the server is running 10 seconds behind and thus isn't sending you any chunks. Can't keep up! Is the server overloaded? Running 10481ms or 209 ticks behind

This won't happen without sodium.

commented

SpawnRadius and SpawnChunkRadius are game rules.

commented

Sodium is a client-side rendering mod, so I don't see how it could possibly be affecting server-side behaviour.

In addition, according to the wiki, there is no SpawnChunkRadius rule. (reference: https://minecraft.wiki/w/Server.properties)

You misunderstood.
It's a gamerule, usage like: /gamerule SpawnChunkRadius 0
And it's this

Image

commented

Just tried and was unable to reproduce.

Vanilla
Fabric
Fabric + Sodium

All three the player spawned in correctly.

commented

Using your reproduction steps, the problem does not occur for me with Sodium 0.6.10 on Fabric 1.21.4. To be clear, we don't modify any of the code involved in server logic, and the client isn't authoritative. So it should not be the case that Sodium is even capable of provoking this bug.

commented

Looking at the crash log I'd say they are having server-side lag due to very high memory usage.

Virtual memory max (MiB): 19815.05
Virtual memory used (MiB): 16500.74
commented

Just tried and was unable to reproduce.

Vanilla Fabric Fabric + Sodium

All three the player spawned in correctly.

I think this probably only happen on low-devices.

commented

Sodium cannot affect world generation or whether the server applies damage to you.

Disagree.
This is not cause by both world generation or whether the server applies damage.
This should be cause by how server move the player or something
In vanilla it still seems "fall into the void" when laggy but it's only client side, on server side you will still at (0,69,0) and you will finally "tp back" to that coord.

commented

Sodium cannot affect world generation or whether the server applies damage to you.

commented

Sodium cannot affect world generation or whether the server applies damage to you.

I just reproduced this behavior with Sodium 0.6.9 1.21.4 and can confirm that the same instance with Sodium disabled works as intended. I'll try to record a demo.

Here's the detailed reproduction steps:

  1. Create a new Fabric 1.21.4 instance with only Sodium installed
  2. Launch the game
  3. Click "Singleplayer"
  4. Wait until the prepairing is finished
  5. Go to the 3rd tab
  6. Go to "Gamerules"
  7. Set the mentioned gamerules to "0"
  8. Click "Done"
  9. Click "Create world"
  10. Open F3 right after joining the world
  11. See the character falling down
  12. Minecraft should teleport the character to the spawn location once the chunk is loaded. This happens in vanilla, but this doesn't happen with Sodium installed
commented

I think this probably only happen on low-devices

Sounds plausible, I tested the issue on my phone:

https://youtu.be/f2ohPZYSOsQ

It seems that the necessary condition is that the spawn chunk shouldn't be loaded at the time the player joins. Powerful PCs are fast enough to generate a single chunk. If a PC can't keep up, then the point 12 happens:

Minecraft should teleport the character to the spawn location once the chunk is loaded. This happens in vanilla, but this doesn't happen with Sodium installed

commented

Unless you have a hypothesis as to why Sodium is able to alter the server's behavior, this bug won't get re-opened. There is no plausible explanation currently. The client doesn't decide whether or not the server teleports it, and we don't modify anything to do with the player's movement logic.

Correlation is not causation.

commented

After further investigation, this appears to be a Vanilla bug that only occurs when both game rules are set to zero. The problem is multi-faceted:

  • Setting the number of spawn chunks to zero means the client won't wait on the server to generate chunks. This also likely means the code doesn't get immediately compiled, so that when it's used later, it needs more time to warm up.
  • Setting the spawn radius to zero means the server won't ever teleport the player from the initial zero position.
  • Sodium is allowing the client thread to run much faster, which in turn allows movement ticks to happen more frequently.
  • If the game takes a really long time to generate chunks, the loading screen disappears (as it has a time-out of 60 ticks), which allows the client to begin ticking movement in an unloaded area.
  • The integrated server doesn't perform all of the movement checks, which means it never tries to teleport the player back to the last known good position.
commented

But if I submit this to Mojira then they will say it's cause by the mods and it's invalid.