Fabric API

Fabric API

112M Downloads

AssertionError upon joining world due to assert currentConfigurationAddon != null

Moulberry opened this issue ยท 1 comments

commented

Current Behavior

Running the game with -enableassertions crashes upon joining world

Analysis (mojmap)

ClientNetworkingImpl#setClientPlayAddon has an assertion that checks if currentConfigurationAddon is null
ClientNetworkingImpl#setClientPlayAddon is called when a ClientPacketListener is initialized
currentConfigurationAddon is set to null when Connection#setListener is called

ClientConfigurationPacketListenerImpl contains this code:
this.connection.setListener(new ClientPacketListener(...))
The ctor is invoked before setListener, causing the assertion to fail.

Steps to reproduce

  1. Add -enableassertions JVM flag
  2. Join a world

Environment

Minecraft 1.20.2
Fabric Loader 0.14.22
Fabric API 0.89.1

commented

Thanks I can reproduce this. I wrongly assumed that we had asserations enabled in Fabric APIs dev env!