Fabric API

Fabric API

106M Downloads

Issue with Fabric Networking API

christopherplaysminecraft opened this issue ยท 6 comments

commented

I've been getting random disconnects from Hypixel for the past week and I cannot seem to find out what's causing those disconnects, they happen every 5 Minutes to 3 Hours for seemingly no reason.

The only error message I'm getting is this:
io.netty.util.IllegalReferenceCountException: refCnt: 0

Looking into the logs gives this, but nothing else
fabricapi-kicks.txt

I remember getting disconnected with a slighty different error
io.netty.util.IllegalReferenceCountException: refCnt: 0, decrement: 1
But I could't find anything in the logs other than that exact message

Minecraft 1.20.4
Fabric-Loader 0.15.3
Fabric-API 0.92.0
Java 21

commented

Can you provide the full log for this please

Unfortunately not, because the logs contain some private chats, which would take hours to clear up
Would a log showing the game start help?

including any mods you are using?

I have tested different combinations of those mods, even removing both FAPI and ViaFabricPlus, and I still got disconnected, then I realized NoChatReports uses Fabric Networking API, I don't know if that's relevant though
Haven't been able to test any further (and I would also like to keep NoChatReports)

  • Fabric API [0.92.0+1.20.4]
  • FerriteCore [6.0.3]
  • Sodium [0.5.5]
  • ImmediatelyFast [1.2.8+1.20.4]
  • ViaFabricPlus [3.0.2]
  • No Chat Reports [1.20.4-v2.5.0]
  • ModernFix [5.11.1+mc1.20.4]

Adding the following JVM option may aid with debugging this issue
Check the game log for anything starting with LEAK:.

In general or only in cases where I get disconnected? (After having added the JVMarg of couse)

commented

@christopherplaysminecraft No, please provide logs for the entire gameplay.

commented

Can you maybe try wihout ViaFabricPlus and/or No Chat Reports, I expect these mods will make heavy adjustments to the networking stack. Im not sure what some of those peformance mods do either. I think this should be moved to a support disucssion, unless it can be reproduced with just fabric api, or with a minimal mod that shows a bug.

That system prop should force netty to run its leak detection on all packets basically, possibly making it crash more often, or providing extra details in the log.

commented

๐Ÿ‘‹ We use the issue tracker exclusively for final bug reports and feature requests. However, this issue appears to be better suited for either a discussion thread, or a message on our discord server. Please post your request on one of these, and the conversation can continue there.

commented

I have been able to reproduce this issue, in FAPI's dev env.
Screenshot 2024-01-04 at 22 30 25

commented

Can you provide the full log for this please, including any mods you are using?

Adding the following JVM option may aid with debugging this issue: -Dio.netty.leakDetection.level=paranoid. Check the game log for anything starting with LEAK:.