Skip to content

INFO: Singleplayer 1.20 Crash on Switch #126

@sleepingdragoninn

Description

@sleepingdragoninn

In 1.20, in singleplayer, with default configs, switching profiles with switchy:

  • Kicks the singleplayer host
  • Prevents the integrated server from shutting down
  • Reconnects the singleplayer host

It does this both to save time over a full world reload, and to maintain compatibility with LAN hosting - the cost is, a good few mods assume, implementation-wise, that a flow like this is impossible, and end up either running setup code twice (and crashing) or running clean-up code incorrectly, or failing to run the correct clean-up code - usually by assuming the host leaving the game and the integrated server shutting down always happens at the same time.

Setting singleplayerFastReconnect=false instead shuts down the server and restarts it, each switch. this is slower, breaks compatibility with LAN, but won't break mods that assume host kick and shutdown always align.

Basically, there's a workaround, but you can
file the fast flow incompatibility on the crashing mod's repo and link this issue, just respect the dev's choice if they won't support this non-vanilla flow. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions