MidnightControls

MidnightControls

447k Downloads

Unable to start after installation

cglang opened this issue ยท 2 comments

commented

Describe the bug
An error occurred when the game started

Desktop (please complete the following information):

  • OS: Windows 10
  • Minecraft: 1.19
  • Fabric: 1.19-Fabric 0.14.8
  • Mods: fabric-api-0.56.0+1.19, midnightcontrols-1.1.0+1.19, midnightlib-0.5.2
  • Launcher: PCL II this

Additional context

java.lang.NullPointerException: Cannot invoke "java.nio.ByteBuffer.flip()" because "buffer" is null
	at eu.midnightdust.midnightcontrols.client.controller.Controller.ioResourceToBuffer(Controller.java:139)
	at eu.midnightdust.midnightcontrols.client.controller.Controller.updateMappings(Controller.java:161)
	at eu.midnightdust.midnightcontrols.client.MidnightControlsClient.onMcInit(MidnightControlsClient.java:131)
	at net.minecraft.class_310.handler$bac001$onInit(class_310.java:6423)
	at net.minecraft.class_310.<init>(class_310.java:636)
	at net.minecraft.client.main.Main.main(Main.java:198)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:461)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)

crash-2022-06-18_12.57.07-client.txt

commented

You shoud do that from an I/O thread. Use net.minecraft.Util.ioPool().execute(() -> { updateMappings()}); and add a callback to main thread. You may also use HttpClient for auto connection retry.

commented

Was your computer connected to the internet in the moment this happened?