GeyserMC / Geyser

A bridge/proxy allowing you to connect to Minecraft: Java Edition servers with Minecraft: Bedrock Edition.
https://geysermc.org
MIT License
4.75k stars 687 forks source link

[Fabric] Worlds disappearing from "Select World" screen after playing in them (if you don't open to LAN) #5097

Closed SlimyFrog123 closed 4 weeks ago

SlimyFrog123 commented 1 month ago

Describe the bug

In the Fabric 1.21.1 version of Geyser, worlds seem to be disappearing from the "Select World" screen on the main menu after playing in them. Additionally, attempting to load another world after you have already played in a different one results in the game crashing with the error message:

java.lang.IllegalStateException
at knot//net.pcal.fastback.mod.fabric.BaseFabricProvider.setMinecraftServer(BaseFabricProvider.java:178)
at knot//net.pcal.fastback.mod.fabric.FabricClientInitializer.lambda$onInitializeClient$2(FabricClientInitializer.java:60)
at knot//net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents.lambda$static$0(ServerLifecycleEvents.java:38)
at knot//net.minecraft.server.MinecraftServer.handler$bcp000$fabric-lifecycle-events-v1$beforeSetupServer(MinecraftServer.java:3138)
at knot//net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:664)
at knot//net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:281)
at java.base/java.lang.Thread.run(Unknown Source)

I have tested this with and without Floodgate, as well as on a fresh install of Fabric with only Geyser installed, and with only Geyser and Floodgate installed.

This does not happen if you open the world to LAN.

The game did not lock up or crash when loading another world on the minimal installation.

After not opening the world to LAN and exiting, the following error message appears:

[23:47:15] [Server thread/ERROR]: Exception stopping the server
java.lang.NullPointerException: Cannot invoke "io.netty.channel.EventLoopGroup.shutdownGracefully(long, long, java.util.concurrent.TimeUnit)" because "this.childGroup" is null
    at knot/org.geysermc.geyser.network.netty.GeyserServer.shutdown(GeyserServer.java:183) ~[geyser-fabric-Geyser-Fabric-2.4.4-b694.jar:?]
    at knot/org.geysermc.geyser.GeyserImpl.runIfNonNull(GeyserImpl.java:907) ~[geyser-fabric-Geyser-Fabric-2.4.4-b694.jar:?]
    at knot/org.geysermc.geyser.GeyserImpl.disable(GeyserImpl.java:721) ~[geyser-fabric-Geyser-Fabric-2.4.4-b694.jar:?]
    at knot/org.geysermc.geyser.platform.mod.GeyserModBootstrap.onGeyserDisable(GeyserModBootstrap.java:131) ~[geyser-fabric-Geyser-Fabric-2.4.4-b694.jar:?]
    at knot/org.geysermc.geyser.platform.fabric.GeyserFabricBootstrap.lambda$onInitialize$2(GeyserFabricBootstrap.java:72) ~[geyser-fabric-Geyser-Fabric-2.4.4-b694.jar:?]
    at knot/net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents.lambda$static$4(ServerLifecycleEvents.java:63) ~[fabric-lifecycle-events-v1-2.3.1+6c1df36019-18dc3f364691c54a.jar:?]
    at knot/net.minecraft.server.MinecraftServer.handler$zfa000$fabric-lifecycle-events-v1$beforeShutdownServer(MinecraftServer.java:2648) ~[client-intermediary.jar:?]
    at knot/net.minecraft.server.MinecraftServer.method_3782(MinecraftServer.java) ~[client-intermediary.jar:?]
    at knot/net.minecraft.class_1132.method_3782(class_1132.java:228) ~[client-intermediary.jar:?]
    at knot/net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:735) ~[client-intermediary.jar:?]
    at knot/net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:281) ~[client-intermediary.jar:?]
    at java.base/java.lang.Thread.run(Unknown Source) [?:?]

To Reproduce

  1. Go to the "Select World" screen from the main menu
  2. Load into any world (creating one if necessary)
  3. Exit the world after any length of time in it (do not open to LAN)
  4. Return to the "Select World" menu
  5. The world will not be there

Expected behaviour

The worlds should not disappear in the "Select World" menu after playing in them.

Screenshots / Videos

This is a demonstration of how to reproduce the issue: https://youtu.be/lAf2wG3bYtE

Server Version and Plugins

Geyser version 2.4.4-b694 (git-master-e7ecb55) (Java: 1.21, Bedrock: 1.20.80/1.20.81 - 1.21.40/1.21.41)

Geyser Dump

https://dump.geysermc.org/Jrj5RBYlPL5liSzWbI8ZUzhAnEFiOZc5

Geyser Version

2.4.4-b694 (git-master-e7ecb55)

Minecraft: Bedrock Edition Device/Version

N/A

Additional Context

After further testing, his only seems to be happening when you do not open the world to LAN, at least so far.

onebeastchris commented 1 month ago

There appear to be multiple issues here - the first stack trace is not coming from either Geyser or Floodgate. Please attach a full log showing connecting & open a world to LAN. You can use mclo.gs to share it

SlimyFrog123 commented 4 weeks ago

Here is the log when you do NOT open the world to LAN: https://mclo.gs/KlRZA0s Here is the log when you DO open the world to LAN: https://mclo.gs/ozENXnG

(Edit: Using a minimal installation of Fabric 1.21.1, only containing Geyser and Floodgate along with any dependencies.)

onebeastchris commented 4 weeks ago

Thanks for reporting the issue! Should be fixed in the latest build.