Better Statistics Screen

Better Statistics Screen

25M Downloads

[`v3.13.2+fabric-1.21`] Connection is lost (almost) immediately after (LAN and Essential) multiplayer world join, with "Internal Exception: `io.netty.handler.codec.EncoderException`: `io.netty.util.IllegalReferenceCountException`: `refCnt`: 0".

RokeJulianLockhart opened this issue · 84 comments

commented

What happened?

I attempted to join a world via LAN and Elemental, hosted on another machine (same hardware, launcher, and mod-pack, but different OS) but it would frequently (yet inconsistently) fail with any of the undermentioned error messages:

  • Reference Count Error

    1. Quotation

      Connection Lost

      Internal Exception: io.netty.handler.codec.EncoderException: io.netty.util.IllegalReferenceCountException: refCnt: 0

    2. Screenshot

      image

  • Mere Disconnection Error

    1. Quotation

      Connection Lost

      Disconnected

    2. Screenshot

      image

Steps to reproduce

  1. Environment Configuration

    1. Install the OS:

      • cpe:/o:microsoft:windows:11

        Via microsoft.com/en-us/software-download/windows11 (or microsoft.com/en-us/software-download/windowsinsiderpreviewiso).

        1. #!/usr/bin/env pwsh
          #Requires -PSEdition Core
          #Requires -PSEdition 7.5
          Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" | Format-List
        2. SystemRoot                : C:\WINDOWS
          BuildBranch               : ge_release
          BuildLab                  : 26100.ge_release.240331-1435
          BuildLabEx                : 26100.1.amd64fre.ge_release.240331-1435
          CompositionEditionID      : Enterprise
          CurrentBuild              : 26100
          CurrentBuildNumber        : 26100
          CurrentMajorVersionNumber : 10
          CurrentMinorVersionNumber : 0
          CurrentType               : Multiprocessor Free
          CurrentVersion            : 6.3
          DisplayVersion            : 24H2
          EditionID                 : Professional
          InstallationType          : Client
          InstallDate               : 1719779588
          LCUVer                    : 10.0.26100.2152
          ProductName               : Windows 10 Pro
      • cpe:/o:fedoraproject:fedora:40

        Via Fedora-KDE-Live-x86_64-40-1.14.iso.

        1. #!/usr/bin/env sh
          kinfo
        2. Operating System: Fedora Linux 40
          KDE Plasma Version: 6.2.1
          KDE Frameworks Version: 6.7.0
          Qt Version: 6.7.2
          Kernel Version: 6.11.3-200.fc40.x86_64 (64-bit)
          Graphics Platform: Wayland
          Processors: 12 × AMD Ryzen 5 7600X 6-Core Processor
          Memory: 30.4 GiB of RAM
          Graphics Processor: AMD Radeon RX 7900 XTX
    2. Install Prism Launcher:

      • cpe:/o:microsoft:windows:11 1

        #!/usr/bin/env pwsh
        winget install --id 'PrismLauncher.PrismLauncher' --version 8.4
      • cpe:/o:fedoraproject:fedora:40 2

        #!/usr/bin/env sh
        flatpak install 'https://dl.flathub.org/repo/appstream/org.prismlauncher.PrismLauncher.flatpakref' && \
        flatpak update 'app/org.prismlauncher.PrismLauncher/x86_64/stable' --commit=0e60b64e9454ee7808fa1cd24849debbb1c3efbfc3a6dfa4cf40d4202bceb904
  2. Import (and configure) the modifications:

    1. Download kim.nl.tab.digital/s/QsmpqSeZnwsQ2BY.

    2. Create an instance:

      image

    3. Select the pack:

      1. image

      2. image

    4. Leave these disabled (or disable them):

      image

    5. If you see this, create a new one. You shouldn't see it the first time you do so.

      image

    6. Wait for it to extract and import:

      1. image

      2. image

  3. Confirmation

    1. Launch the instance.

    2. Host a world on one machine.

    3. Attempt to join it on the other.

      This should consistently work, without any failures.

  4. Better Statistics Screen Installation

    1. Install better-stats/version/3.13.2+fabric-1.21 from modrinth.com:

      1. image

      2. image

    2. Enable it (if not already so):

      image

  5. Confirmation

    1. Launch the instance.

    2. Host a world on one machine.

    3. Attempt to join it on the other.

      If the error doesn't reproduce immediately, continue to attempt to rejoin. It should occur consistently frequently.

Relevant log output or crash report

I've attached it at gist.github.com/RokeJulianLockhart/d2a7ca0b31f2eb45d8e835112749da86. It isn't from after instance closure 1. instead, it's immediately after the reference count error occurred:

Other installed mods

  1. Operative

    Without mc-better-stats.

    1. Extra Mod Integrations [0.4.6+1.20.1]
    2. Collective [7.84]
    3. BCLib [3.0.14]
    4. Chipped x Create Fabric [1.0.0]
    5. More Armor Trims [1.4.0-1.20.1]
    6. Athena [3.1.2]
    7. Fast IP Ping [1.0.5]
    8. spark [1.10.53]
    9. YetAnotherConfigLib [3.6.0+1.20.1-fabric]
    10. YUNG's Better Witch Huts [1.20-Fabric-3.0.3]
    11. Visual Workbench [8.0.0]
    12. Simple Discord Rich Presence [4.0.3-build.40+mc1.20.1]
    13. EMIffect [1.1.2+mc1.20.1]
    14. Faster Random [5.1.0]
    15. Create [0.5.1-f-build.1417+mc1.20.1]
    16. Polymorphic Energistics [0.1.1-1.20.1]
    17. Iris Flywheel Compat [1.1.4]
    18. FTB Chunks [2001.3.1]
    19. Nullscape [1.2.8]
    20. Xaero's World Map [1.39.0]
    21. Fzzy Config [0.5.4+1.20.1]
    22. FerriteCore [6.0.1]
    23. Clear Despawn [1.1.15]
    24. Animal Feeding Trough [1.1.0+1.20.1]
    25. ImmediatelyFast [1.2.21+1.20.4]
    26. Item Borders [1.2.2]
    27. Lithium [0.11.2]
    28. Smarter Farmers [1.20-2.1.0]
    29. Fabric Language Kotlin [1.12.3+kotlin.2.0.21]
    30. Lootr [0.7.33.81]
    31. AmbientSounds [6.1.1]
    32. Cherished Worlds [6.1.6+1.20.1]
    33. Fabric Shield Lib [1.7.2-1.20.1]
    34. Create Enchantment Industry [1.2.16]
    35. Starlight [1.1.2+fabric.dbc156f]
    36. DarkUtilities [17.0.5]
    37. Croptopia [3.0.3]
    38. Chipped [3.0.7]
    39. Amendments [1.20-1.2.12]
    40. Just Enough Items [15.20.0.104]
    41. Better Archeology [1.2.1-1.20.1]
    42. AE2 EMI Crafting Integration [1.3.1]
    43. DynamicTrim [1.4.1]
    44. Satisfying Buttons [1.1.2]
    45. SwingThrough [1.0.6+1.20]
    46. Common Network [1.0.5-1.20.1]
    47. CreativeCore [2.12.14]
    48. FTB XMod Compat [2.1.1]
    49. NetherPortalFix [13.0.1]
    50. Supplementaries Squared [1.20-1.1.15]
    51. TCD Commons API [3.12.3+fabric-1.20.1]
    52. Thaumon [2.3.0+1.20.1]
    53. More Music Discs [1.20.1-33.1-fabric]
    54. Frostiful [1.0.11]
    55. oωo [0.11.2+1.20]
    56. Easy Anvils [8.0.2]
    57. EpheroLib [1.2.0]
    58. Polytone [1.20-2.3.3]
    59. Cloth Config v11 [11.1.136]
    60. Load My F***ing Tags [1.0.2+1.20]
    61. End Remastered [5.2.4]
    62. Mouse Tweaks [2.26]
    63. Applied Energistics 2 [15.2.12]
    64. Basic Shields [Fabric] [1.4.1-1.20.2]
    65. Backported Wolves & Terralith 1. Compat [1.0]
    66. Entity Model Features [2.2.6]
    67. Overflowing Bars [8.0.1]
    68. 3d-Skin-Layers [1.6.7]
    69. YUNG's API [1.20-Fabric-4.0.6]
    70. Better Nether [9.0.10]
    71. Stoneworks [8.0.0]
    72. Lavender [0.1.9+1.20]
    73. Chat Heads [0.13.3]
    74. Item Filters [2001.1.0-build.53]
    75. Uranus [1.7.1]
    76. ChatAnimation [1.0.5]
    77. You Shall Not Spawn [2.0.2]
    78. Fusion [1.1.1]
    79. More Chat History [1.3.0]
    80. Villager Names [8.1]
    81. Decorative Blocks [4.1.3]
    82. Villagers Plus [3.1]
    83. Animatica [0.6.1+1.20.4]
    84. Bobby [5.0.1]
    85. YUNG's Better Ocean Monuments [1.20-Fabric-3.0.4]
    86. Jupiter [1.1]
    87. YUNG's Extras [1.20-Fabric-4.0.3]
    88. Create: New Age [1.1.2]
    89. More Culling [1.20.4-0.24.0]
    90. DarkPaintings [17.0.4]
    91. FTB Quests [2001.4.9]
    92. Neruina [${version}]
    93. Dynamic FPS [3.7.3]
    94. BadOptimizations [2.1.4]
    95. ChoiceTheorem's Overhauled Village [3.4.9a]
    96. Comforts [6.4.0+1.20.1]
    97. Memory Leak Fix [1.1.5]
    98. Configured [2.2.3]
    99. essential-container [1.0.0]
    100. Lithostitched [1.3.1a]
    101. GeckoLib 4 [4.4.9]
    102. Yeetus Experimentus [2.3.0-build.4+mc1.20.1]
    103. AE2 + Mouse Tweaks Fix [2.0.0+1.20.1+fabric]
    104. Balm [7.3.9]
    105. Creeper Overhaul [3.0.2]
    106. FabricSkyBoxes Interop [1.3.6+mc1.20.1-build.50]
    107. Simple Voice Chat [1.20.1-2.5.24]
    108. Winterly [0.9.3+1.20]
    109. Croptopia Additions [2.0.0]
    110. Not Enough Crashes [4.4.7+1.20.1]
    111. Ping Wheel [1.9.1]
    112. EMI Trades [1.2.1+mc1.20.1]
    113. Craftify [1.16.0]
    114. Patchouli [1.20.1-84-FABRIC]
    115. Model Gap Fix [1.15]
    116. Create: Compat BetterEnd & BetterNether [1.1]
    117. Moonlight [1.20-2.13.13]
    118. EMI Loot [0.7.4+1.20.1+fabric]
    119. TooFast [1.2.0]
    120. Continuity [3.0.0-beta.5+1.20.1]
    121. Better End [4.0.11]
    122. CraftTweaker [14.0.43]
    123. Controlling For Fabric [12.0.2]
    124. Konkrete [1.8.1]
    125. Gpu memory leak fix mod [1.20.1-1.8]
    126. AppleSkin [2.5.1+mc1.20]
    127. Aquamirae [6]
    128. Way2Way [0.0.6]
    129. Windchimes [1.2.4+1.20]
    130. Debugify [1.20.1+2.0]
    131. Cristel Lib [1.1.5]
    132. Better Advancements [0.4.2.10]
    133. Pick Up Notifier [8.0.0]
    134. Artifacts [9.5.13]
    135. FTB Essentials [2001.2.2]
    136. Better Mount HUD [1.2.2]
    137. Highlighter [1.1.9]
    138. Cosmetic Armor [1.6.0]
    139. Mod Menu [7.2.2]
    140. Shulker Box Tooltip [4.0.4+1.20.1]
    141. Iceberg [1.1.18]
    142. NotEnoughAnimations [1.7.6]
    143. YUNG's Better Desert Temples [1.20-Fabric-3.0.3]
    144. Custom Entity Attributes (CEA) [1.0.0]
    145. Ice and Fire: Dragon Finder [1.0.0-1.20.1]
    146. OptiGUI [2.3.0-beta.6+1.20]
    147. Capes [1.5.2+1.20]
    148. lazy-language-loader [0.3.3]
    149. Ice And Fire [0.6.3]
    150. Fabric Seasons [2.4.2-BETA+1.20]
    151. Puzzles Lib [8.1.24]
    152. Build Guide [0.4.3]
    153. YUNG's Bridges [1.20-Fabric-4.0.3]
    154. Botarium [2.3.4]
    155. Create: Copycats+ [2.1.4+mc.1.20.1-fabric]
    156. Easy Magic [8.0.1]
    157. JamLib [0.6.1+1.20.x]
    158. FTB Ranks [2001.1.3]
    159. Necronomicon [1.6.0]
    160. Derelict [1.1.1]
    161. Jade [11.12.0+fabric]
    162. No Chat Reports [1.20.1-v2.2.2]
    163. Resourcefulconfig [2.1.2]
    164. Elytra Slot [6.4.4+1.20.1]
    165. Boat Item View Fabric [0.0.5]
    166. Terralith Andesite Patch [1.0.0]
    167. Remove Reloading Screen [4.0.6.1+mc1.20.1-fabric]
    168. Sodium Extra [0.5.4+mc1.20.1-build.115]
    169. Twigs [3.1.0]
    170. Sophisticated Backpacks [1.20.1-3.20.11.26]
    171. Friends&Foes 1. Beekeeper Hut [2.0.1]
    172. EMI Enchanting [0.1.2+1.20.1]
    173. Falling Leaves [1.15.6]
    174. StackDeobfuscator [1.4.3+08e71cc]
    175. Tierify [1.2.0]
    176. Sophisticated Core [1.20.1-0.6.33.31]
    177. EnchantmentDescriptions [17.1.18]
    178. EMI [1.1.16+1.20.1+fabric]
    179. Structory: Towers [1.0.7]
    180. Indium [1.0.34+mc1.20.1]
    181. Deeper and Darker [1.3.2.1]
    182. Fabric Seasons: Terralith Compat [1.0-2.3.7]
    183. Puzzle [1.5.2+1.20]
    184. Backported Wolves [1.1.0-1.19.3-1.20.4]
    185. FPS Reducer [1.20-2.5]
    186. Iris [1.7.5+mc1.20.1]
    187. PigPen [15.0.2]
    188. When Dungeons Arise [2.1.57]
    189. Better Tridents [8.0.1]
    190. Fabric API [0.92.2+1.20.1]
    191. Custom Item Attributes (CIA) [2.0.0]
    192. Recipe Advancements Nuker [1.20-1.4]
    193. Friends&Foes 1. Flowery Mooblooms [2.0.2]
    194. Resourceful Lib [2.1.29]
    195. Forge Config API Port [8.0.0]
    196. FastQuit [3.0.0+1.20+]
    197. Remove Terralith Intro Message [1.1]
    198. Double Doors [5.9]
    199. FTB Teams [2001.3.0]
    200. Nether Depths Upgrade [fabric-3.1.6-1.20]
    201. Paginated Advancements [2.3.0]
    202. Runelic [18.0.2]
    203. Friends & Foes [3.0.5]
    204. Bookshelf [20.2.13]
    205. Block Swap [5.0.0.0]
    206. YOSBR [0.1.2]
    207. Dungeon Now Loading [1.5]
    208. YUNG's Better Strongholds [1.20-Fabric-4.0.3]
    209. Forge Config Screens [8.0.2]
    210. Enhanced Block Entities [0.9+1.20]
    211. Visuality [0.7.1+1.20]
    212. Zoomify [2.14.0+1.20.1]
    213. Server Browser [1.1.2]
    214. Create: Steam 'n' Rails [1.6.4+fabric-mc1.20.1]
    215. FTB Library [2001.2.4]
    216. SuperMartijn642's Config Lib [1.1.8+a]
    217. Better Beds [1.3.0]
    218. Xaero's Minimap [24.5.0]
    219. Structory [1.3.5]
    220. Searchables [1.0.3]
    221. Supplementaries [1.20-2.8.17]
    222. e4mc [5.2.1]
    223. Language Reload [1.6.1+1.20.1]
    224. Nicer Skies [1.3.0]
    225. BetterCompatibilityChecker [4.0.1]
    226. Sodium [0.5.11+mc1.20.1]
    227. Better Ping Display [1.1.1]
    228. Swampier Swamps [1.20-4.0.0]
    229. Right Click Harvest [3.2.3+1.19.x-1.20.1-fabric]
    230. Clumps [12.0.0.4]
    231. Waystones [14.1.5]
    232. Roguelike Dungeons [2.0.4-build4-1.20.1-fabric]
    233. WaveyCapes [1.4.10]
    234. Terralith [2.5.4]
    235. Fabrishot [1.10.1]
    236. Obscure API [16]
    237. Better Trim Tooltips [1.0.1]
    238. Legendary Tooltips [1.4.5]
    239. AttributeFix [21.0.4]
    240. Advancement Plaques [1.6.7]
    241. Faux-Custom-Entity-Data [6.0.1]
    242. Trinkets [3.7.2]
    243. Prism [1.0.5]
    244. Seamless Loading Screen [2.0.3+1.20.1]
    245. Tiny Skeletons [8.0.1]
    246. Towns and Towers [1.10.2
      ]
    247. Things [0.3.3+1.20]
    248. Block Runner [8.0.4]
    249. Icarus [2.10.0]
    250. Blur (Fabric) [3.1.0]
    251. Create Crafts & Additions [NONE]
    252. Dungeons and Taverns [3.0.3.f]
    253. BetterF3 [7.0.2]
    254. ModernFix [5.19.4+mc1.20.1]
    255. YUNG's Better Dungeons [1.20-Fabric-4.0.4]
    256. Essential Dependencies [0]
    257. Architectury [9.2.14]
    258. Fabric Seasons: Extras [1.3.2-BETA+1.20]
    259. Presence Footsteps [1.9.4+1.20.1]
    260. Leaves Be Gone [8.0.0]
    261. EntityCulling [1.7.0]
    262. You're in Grave Danger [2.0.10]
    263. Thermoo [2.3.2]
    264. Polymorph [0.49.7+1.20.1]
    265. Concurrent Chunk Management Engine [0.2.0+alpha.11.13]
    266. Sophisticated Storage [1.20.1-0.10.44.23]
    267. Fabric Seasons: Croptopia Compat [1.0-2.2.2]
    268. Geophilic [3.1.3]
    269. Entity Texture Features [6.2.5]
    270. FabricSkyBoxes [0.7.3+mc1.20.1]
    271. Reese's Sodium Options [1.7.2+mc1.20.1-build.101]
  2. Inoperative

    With mc-better-stats installed and enabled.

    1. Extra Mod Integrations [0.4.6+1.20.1]
    2. Collective [7.84]
    3. BCLib [3.0.14]
    4. Chipped x Create Fabric [1.0.0]
    5. More Armor Trims [1.4.0-1.20.1]
    6. Athena [3.1.2]
    7. Fast IP Ping [1.0.5]
    8. spark [1.10.53]
    9. YetAnotherConfigLib [3.6.0+1.20.1-fabric]
    10. YUNG's Better Witch Huts [1.20-Fabric-3.0.3]
    11. Visual Workbench [8.0.0]
    12. Simple Discord Rich Presence [4.0.3-build.40+mc1.20.1]
    13. EMIffect [1.1.2+mc1.20.1]
    14. Faster Random [5.1.0]
    15. Create [0.5.1-f-build.1417+mc1.20.1]
    16. Polymorphic Energistics [0.1.1-1.20.1]
    17. Iris Flywheel Compat [1.1.4]
    18. FTB Chunks [2001.3.1]
    19. Nullscape [1.2.8]
    20. Xaero's World Map [1.39.0]
    21. Fzzy Config [0.5.4+1.20.1]
    22. FerriteCore [6.0.1]
    23. Clear Despawn [1.1.15]
    24. Animal Feeding Trough [1.1.0+1.20.1]
    25. ImmediatelyFast [1.2.21+1.20.4]
    26. Item Borders [1.2.2]
    27. Lithium [0.11.2]
    28. Smarter Farmers [1.20-2.1.0]
    29. Fabric Language Kotlin [1.12.3+kotlin.2.0.21]
    30. Lootr [0.7.33.81]
    31. AmbientSounds [6.1.1]
    32. Cherished Worlds [6.1.6+1.20.1]
    33. Fabric Shield Lib [1.7.2-1.20.1]
    34. Create Enchantment Industry [1.2.16]
    35. Starlight [1.1.2+fabric.dbc156f]
    36. DarkUtilities [17.0.5]
    37. Croptopia [3.0.3]
    38. Chipped [3.0.7]
    39. Amendments [1.20-1.2.12]
    40. Just Enough Items [15.20.0.104]
    41. Better Archeology [1.2.1-1.20.1]
    42. AE2 EMI Crafting Integration [1.3.1]
    43. DynamicTrim [1.4.1]
    44. Satisfying Buttons [1.1.2]
    45. SwingThrough [1.0.6+1.20]
    46. Common Network [1.0.5-1.20.1]
    47. CreativeCore [2.12.14]
    48. FTB XMod Compat [2.1.1]
    49. NetherPortalFix [13.0.1]
    50. Supplementaries Squared [1.20-1.1.15]
    51. TCD Commons API [3.12.3+fabric-1.20.1]
    52. Thaumon [2.3.0+1.20.1]
    53. More Music Discs [1.20.1-33.1-fabric]
    54. Frostiful [1.0.11]
    55. oωo [0.11.2+1.20]
    56. Easy Anvils [8.0.2]
    57. EpheroLib [1.2.0]
    58. Polytone [1.20-2.3.3]
    59. Cloth Config v11 [11.1.136]
    60. Load My F***ing Tags [1.0.2+1.20]
    61. End Remastered [5.2.4]
    62. Mouse Tweaks [2.26]
    63. Applied Energistics 2 [15.2.12]
    64. Basic Shields [Fabric] [1.4.1-1.20.2]
    65. Backported Wolves & Terralith 1. Compat [1.0]
    66. Entity Model Features [2.2.6]
    67. Overflowing Bars [8.0.1]
    68. 3d-Skin-Layers [1.6.7]
    69. YUNG's API [1.20-Fabric-4.0.6]
    70. Better Nether [9.0.10]
    71. Stoneworks [8.0.0]
    72. Lavender [0.1.9+1.20]
    73. Chat Heads [0.13.3]
    74. Item Filters [2001.1.0-build.53]
    75. Uranus [1.7.1]
    76. ChatAnimation [1.0.5]
    77. You Shall Not Spawn [2.0.2]
    78. Fusion [1.1.1]
    79. More Chat History [1.3.0]
    80. Villager Names [8.1]
    81. Decorative Blocks [4.1.3]
    82. Villagers Plus [3.1]
    83. Animatica [0.6.1+1.20.4]
    84. Bobby [5.0.1]
    85. YUNG's Better Ocean Monuments [1.20-Fabric-3.0.4]
    86. Jupiter [1.1]
    87. YUNG's Extras [1.20-Fabric-4.0.3]
    88. Create: New Age [1.1.2]
    89. More Culling [1.20.4-0.24.0]
    90. DarkPaintings [17.0.4]
    91. FTB Quests [2001.4.9]
    92. Neruina [${version}]
    93. Dynamic FPS [3.7.3]
    94. BadOptimizations [2.1.4]
    95. ChoiceTheorem's Overhauled Village [3.4.9a]
    96. Comforts [6.4.0+1.20.1]
    97. Memory Leak Fix [1.1.5]
    98. Configured [2.2.3]
    99. essential-container [1.0.0]
    100. Lithostitched [1.3.1a]
    101. GeckoLib 4 [4.4.9]
    102. Yeetus Experimentus [2.3.0-build.4+mc1.20.1]
    103. AE2 + Mouse Tweaks Fix [2.0.0+1.20.1+fabric]
    104. Balm [7.3.9]
    105. Creeper Overhaul [3.0.2]
    106. FabricSkyBoxes Interop [1.3.6+mc1.20.1-build.50]
    107. Simple Voice Chat [1.20.1-2.5.24]
    108. Winterly [0.9.3+1.20]
    109. Croptopia Additions [2.0.0]
    110. Not Enough Crashes [4.4.7+1.20.1]
    111. Ping Wheel [1.9.1]
    112. EMI Trades [1.2.1+mc1.20.1]
    113. Craftify [1.16.0]
    114. Patchouli [1.20.1-84-FABRIC]
    115. Model Gap Fix [1.15]
    116. Create: Compat BetterEnd & BetterNether [1.1]
    117. Moonlight [1.20-2.13.13]
    118. EMI Loot [0.7.4+1.20.1+fabric]
    119. TooFast [1.2.0]
    120. Continuity [3.0.0-beta.5+1.20.1]
    121. Better End [4.0.11]
    122. CraftTweaker [14.0.43]
    123. Controlling For Fabric [12.0.2]
    124. Konkrete [1.8.1]
    125. Gpu memory leak fix mod [1.20.1-1.8]
    126. AppleSkin [2.5.1+mc1.20]
    127. Aquamirae [6]
    128. Way2Way [0.0.6]
    129. Windchimes [1.2.4+1.20]
    130. Debugify [1.20.1+2.0]
    131. Cristel Lib [1.1.5]
    132. Better Advancements [0.4.2.10]
    133. Pick Up Notifier [8.0.0]
    134. Artifacts [9.5.13]
    135. FTB Essentials [2001.2.2]
    136. Better Mount HUD [1.2.2]
    137. Highlighter [1.1.9]
    138. Cosmetic Armor [1.6.0]
    139. Mod Menu [7.2.2]
    140. Shulker Box Tooltip [4.0.4+1.20.1]
    141. Iceberg [1.1.18]
    142. NotEnoughAnimations [1.7.6]
    143. YUNG's Better Desert Temples [1.20-Fabric-3.0.3]
    144. Custom Entity Attributes (CEA) [1.0.0]
    145. Ice and Fire: Dragon Finder [1.0.0-1.20.1]
    146. OptiGUI [2.3.0-beta.6+1.20]
    147. Capes [1.5.2+1.20]
    148. lazy-language-loader [0.3.3]
    149. Ice And Fire [0.6.3]
    150. Fabric Seasons [2.4.2-BETA+1.20]
    151. Puzzles Lib [8.1.24]
    152. Build Guide [0.4.3]
    153. YUNG's Bridges [1.20-Fabric-4.0.3]
    154. Botarium [2.3.4]
    155. Create: Copycats+ [2.1.4+mc.1.20.1-fabric]
    156. Easy Magic [8.0.1]
    157. JamLib [0.6.1+1.20.x]
    158. FTB Ranks [2001.1.3]
    159. Necronomicon [1.6.0]
    160. Derelict [1.1.1]
    161. Jade [11.12.0+fabric]
    162. No Chat Reports [1.20.1-v2.2.2]
    163. Resourcefulconfig [2.1.2]
    164. Elytra Slot [6.4.4+1.20.1]
    165. Boat Item View Fabric [0.0.5]
    166. Terralith Andesite Patch [1.0.0]
    167. Remove Reloading Screen [4.0.6.1+mc1.20.1-fabric]
    168. Sodium Extra [0.5.4+mc1.20.1-build.115]
    169. Twigs [3.1.0]
    170. Sophisticated Backpacks [1.20.1-3.20.11.26]
    171. Friends&Foes 1. Beekeeper Hut [2.0.1]
    172. EMI Enchanting [0.1.2+1.20.1]
    173. Falling Leaves [1.15.6]
    174. StackDeobfuscator [1.4.3+08e71cc]
    175. Tierify [1.2.0]
    176. Sophisticated Core [1.20.1-0.6.33.31]
    177. EnchantmentDescriptions [17.1.18]
    178. EMI [1.1.16+1.20.1+fabric]
    179. Structory: Towers [1.0.7]
    180. Indium [1.0.34+mc1.20.1]
    181. Deeper and Darker [1.3.2.1]
    182. Fabric Seasons: Terralith Compat [1.0-2.3.7]
    183. Puzzle [1.5.2+1.20]
    184. Backported Wolves [1.1.0-1.19.3-1.20.4]
    185. FPS Reducer [1.20-2.5]
    186. Iris [1.7.5+mc1.20.1]
    187. PigPen [15.0.2]
    188. When Dungeons Arise [2.1.57]
    189. Better Tridents [8.0.1]
    190. Fabric API [0.92.2+1.20.1]
    191. Custom Item Attributes (CIA) [2.0.0]
    192. Recipe Advancements Nuker [1.20-1.4]
    193. Friends&Foes 1. Flowery Mooblooms [2.0.2]
    194. Resourceful Lib [2.1.29]
    195. Forge Config API Port [8.0.0]
    196. FastQuit [3.0.0+1.20+]
    197. Remove Terralith Intro Message [1.1]
    198. Double Doors [5.9]
    199. FTB Teams [2001.3.0]
    200. Nether Depths Upgrade [fabric-3.1.6-1.20]
    201. Paginated Advancements [2.3.0]
    202. Runelic [18.0.2]
    203. Friends & Foes [3.0.5]
    204. Bookshelf [20.2.13]
    205. Block Swap [5.0.0.0]
    206. YOSBR [0.1.2]
    207. Dungeon Now Loading [1.5]
    208. YUNG's Better Strongholds [1.20-Fabric-4.0.3]
    209. Forge Config Screens [8.0.2]
    210. Enhanced Block Entities [0.9+1.20]
    211. Visuality [0.7.1+1.20]
    212. Zoomify [2.14.0+1.20.1]
    213. Server Browser [1.1.2]
    214. Create: Steam 'n' Rails [1.6.4+fabric-mc1.20.1]
    215. FTB Library [2001.2.4]
    216. SuperMartijn642's Config Lib [1.1.8+a]
    217. Better Beds [1.3.0]
    218. Xaero's Minimap [24.5.0]
    219. Structory [1.3.5]
    220. Searchables [1.0.3]
    221. Supplementaries [1.20-2.8.17]
    222. e4mc [5.2.1]
    223. Language Reload [1.6.1+1.20.1]
    224. Nicer Skies [1.3.0]
    225. BetterCompatibilityChecker [4.0.1]
    226. Sodium [0.5.11+mc1.20.1]
    227. Better Ping Display [1.1.1]
    228. Swampier Swamps [1.20-4.0.0]
    229. Right Click Harvest [3.2.3+1.19.x-1.20.1-fabric]
    230. Clumps [12.0.0.4]
    231. Waystones [14.1.5]
    232. Roguelike Dungeons [2.0.4-build4-1.20.1-fabric]
    233. WaveyCapes [1.4.10]
    234. Terralith [2.5.4]
    235. Fabrishot [1.10.1]
    236. Obscure API [16]
    237. Better Trim Tooltips [1.0.1]
    238. Legendary Tooltips [1.4.5]
    239. AttributeFix [21.0.4]
    240. Advancement Plaques [1.6.7]
    241. Faux-Custom-Entity-Data [6.0.1]
    242. Trinkets [3.7.2]
    243. Prism [1.0.5]
    244. Seamless Loading Screen [2.0.3+1.20.1]
    245. Tiny Skeletons [8.0.1]
    246. Towns and Towers [1.10.2]
    247. Things [0.3.3+1.20]
    248. Block Runner [8.0.4]
    249. Icarus [2.10.0]
    250. Blur (Fabric) [3.1.0]
    251. Create Crafts & Additions [NONE]
    252. Dungeons and Taverns [3.0.3.f]
    253. BetterF3 [7.0.2]
    254. ModernFix [5.19.4+mc1.20.1]
    255. YUNG's Better Dungeons [1.20-Fabric-4.0.4]
    256. Essential Dependencies [0]
    257. Architectury [9.2.14]
    258. Fabric Seasons: Extras [1.3.2-BETA+1.20]
    259. Presence Footsteps [1.9.4+1.20.1]
    260. Leaves Be Gone [8.0.0]
    261. EntityCulling [1.7.0]
    262. You're in Grave Danger [2.0.10]
    263. Thermoo [2.3.2]
    264. Polymorph [0.49.7+1.20.1]
    265. Concurrent Chunk Management Engine [0.2.0+alpha.11.13]
    266. Sophisticated Storage [1.20.1-0.10.44.23]
    267. Fabric Seasons: Croptopia Compat [1.0-2.2.2]
    268. Geophilic [3.1.3]
    269. Entity Texture Features [6.2.5]
    270. FabricSkyBoxes [0.7.3+mc1.20.1]
    271. Reese's Sodium Options [1.7.2+mc1.20.1-build.101]
    272. Better Statistics Screen [3.12.6+fabric-1.20.1]

Code of Conduct

  1. I agree that if the issue is regarding a crash, I gave the logs and the crash report.
  2. I agree that I will be available later for any follow-up questions to help diagnose and resolve the issue.

(Lack of) Duplicates

issues?q=is%3Aissue+is%3Aopen+io.netty.handler.codec.EncoderException returned 0 results at +2024-10-19T10:16:56+01:00.

Footnotes

  1. github.com/PrismLauncher/prismlauncher.org/blob/f311e6547868ab96fb6f7020049c00f963b34cd0/src/download/windows.md#winget-package

  2. github.com/PrismLauncher/prismlauncher.org/blob/29f0352fbc3bc6c7572c24070d9d9f65977af592/src/download/linux.md#-centos-stream---fedora---red-hat-enterprise-linux

commented
commented

Can confirm I am having this issue as well

commented

Thank you so much for the quick response!

As for

How do you suggest that I log it?

You do not have to do anything regarding the error logging, as I* will be responsible for tracing the error to its origin once I recreate the issue on my end. Actually logging the error would require you to mod the game yourself and program it to do that, which obviously, I do not expect anyone to do (nor should you).

I will now get to reproducing the environment and the issue you have described, after which I'll work on a patch. Hopefully everything goes as planned. Thank you once again, and have a great day!

commented

Hello!
Sorry for the delayed response, as I usually respond sooner.
Now that 1.21.3 ports are out, I'd like to focus on resolving this issue. First off, thank you so much for such a detailed bug report! Very few people put in the effort to try and describe an issue in that much detail.

Now, I'd like to focus on reproducing the issue on my end, so I can find a way to resolve it. To do this, I need to clear up a few issues;

  1. Could you please provide information on what "Elemental" is? Apologies for not knowing this already. I tried looking it up, but using the search-term "elemental" is too vague to find meaningful results on Google and other search engines.
  2. The link you have provided, https://kim.nl.tab.digital/s/QsmpqSeZnwsQ2BY, is inaccessible to me. I assume this could be a mod-pack or some sort of configs, however I am unable to reach them (Something called "NextCloud" tells me the file is not found).
  3. The biggest one so far; Minecraft doesn't log network-related errors, so the log file you have provided has no useful information unfortunately (go figure, something Minecraft should log, isn't coded by Mojang to be logged). Now I understand this isn't an issue on your end, but I am still stating this just so it's known. This network-related error also just so happens to be the main focal point of this issue report, so the best I can do is recreate the issue on my end, given the logs do not have the details I need, and the stack-trace shown on-screen doesn't have enough lines to explain the error's origin.

Once I manage to recreate the issue on my end, it will hopefully help me get closer to the line of code that caused this issue, after which a patch can be made. ((In the meantime, I suppose it'd be a good idea for me to implement (togglable/configurable) network-related error loggers in my mods, if possible.))

Edit:
All edits are typo-corrections.

commented

Could you please provide information on what "Elemental" is? Apologies for not knowing this already. I tried looking it up, but using the search-term "elemental" is too vague to find meaningful results on Google and other search engines.

Apologies. I meant Essential. Filing bugs at night does things to a brain.


The link you have provided, kim.nl.tab.digital/s/QsmpqSeZnwsQ2BY, is inaccessible to me. I assume this could be a mod-pack or some sort of configs, however I am unable to reach them (Something called "NextCloud" tells me the file is not found).

Yeah, that wasn't meant to expire. I didn't upload it, but I'll reupload and provide a permanent URI when @JaredRichardWilliam is available again - it's indeed a modpack, and he created it with prismlauncher-9.0-1.fc40.x86_64.

If you're interested, github.com/nextcloud/.github/blob/a7b41dc98d8844b64d9c372c84b4afd68e532f9a/profile/README.md explains that NC is just FOSS filehosting platform software.


The biggest one so far; Minecraft doesn't log network-related errors, so the log file you have provided has no useful information unfortunately (go figure, something Minecraft should log, isn't coded by Mojang to be logged). Now I understand this isn't an issue on your end, but I am still stating this just so it's known.

How do you suggest that I log it? I don't mind filing an issue on MC's Jira to eventually have the work performed in the main client, but they'll probably close it as a suggestion (even if I phrase the absence as a bug). Otherwise, I don't mind trying any of the non-destructive options at this Ask Ubuntu answer revision (like WireShark) or superuser.com/revisions/22571/1, but I'm unfamiliar with them.


This network-related error also just so happens to be the main focal point of this issue report, so the best I can do is recreate the issue on my end, given the logs do not have the details I need, and the stack-trace shown on-screen doesn't have enough lines to explain the error's origin.

I'll use debug symbols if you can provide them, but I'm unfamiliar with whether those are necessary for languages like DotNet and Java (considering they use microcode), much less how to install them (considering that gdb's debuginfo shan't install them, and they're not available via any OS's package manager).

commented

Hello again!
If you do not mind, I have one more question I'd like to ask.

In the latest versions of the game (I used 1.21), I intentionally recreated a scenario where the client would get disconnected due to a network error (by intentionally cutting the server's internet access). To my surprise, I noticed the game is actually logging the error in my case, and it even shows me a button to click on it and view the logs;

image

I was wondering if something like this takes place on your end, and if the game is leaving any more traces of the error. For me, the game saved an error log file in the [game folder]/debug directory.

And here's the example error log file I was able to find:

---- Minecraft Network Protocol Error Report ----
// I heard pigeons are more reliable

Time: 2024-10-26 13:48:49
Description: Packet handling error

java.net.SocketException: Connection reset
	at java.base/sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:401)
	at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:434)
	at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:254)
	at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132)
	at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:357)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at java.base/java.lang.Thread.run(Thread.java:1583)

Now that I have the time to, I will also recreate a modded environment using your mod-pack and using the scenario you have provided, and see if any traces are left by the game in that instance as well.

-

Edit to add (after some time passed):

I have recreated the environment by installing the mod-pack to my client and to a server hosted on a VM. I made attempts to join the server both with and without BSS installed. In both instances, I encountered no issues, even after repeated rejoins.
Note that the modpack you have provided is 1.20.1, so I don't know if that plays a role. Now, I also know you mentioned Essential, however I am unfortunately unable to use it due to not having two purchased Minecraft accounts. Lastly, I will see if it's possible for me to attempt regular LAN sessions using two non-authenticated clients aka ones used in mod development environments (and not onces found in "cracked" launchers).

If nothing works, then this could be some sort of incompatibility with Essential, but I am unfortunately unable to verify or check this. I will also have a deep look at my networking-related code, specifically one dealing with ByteBuf-s, as the error message you have shown does usually originate from mishandling of ByteBuf-s.

commented

I had this issue on quilt 1.20.1 0.27.0 when joining a single player world, but when I updated to 0.28.0-beta.3 it started to work.

commented

I had this issue on quilt 1.20.1 0.27.0 when joining a single player world, but when I updated to 0.28.0-beta.3 it started to work.

Never mind. Now the issue is back.

commented

I also encountered this bug in version 1.20.1 with the same error message like this:

[01:16:16] [Netty Server IO #2/ERROR]: Error receiving packet 23
io.netty.util.IllegalReferenceCountException: refCnt: 0
	at io.netty.buffer.AbstractByteBuf.ensureAccessible(AbstractByteBuf.java:1454) ~[netty-buffer-4.1.82.Final.jar:?]
	at io.netty.buffer.AbstractByteBuf.checkIndex(AbstractByteBuf.java:1383) ~[netty-buffer-4.1.82.Final.jar:?]
	at io.netty.buffer.UnpooledHeapByteBuf.copy(UnpooledHeapByteBuf.java:534) ~[netty-buffer-4.1.82.Final.jar:?]
	at io.netty.buffer.AbstractByteBuf.copy(AbstractByteBuf.java:1194) ~[netty-buffer-4.1.82.Final.jar:?]
	at net.minecraft.class_2540.copy(class_2540.java:1628) ~[server-intermediary.jar:?]
	at net.minecraft.class_2540.copy(class_2540.java:1628) ~[server-intermediary.jar:?]
	at net.minecraft.class_2658.method_11052(class_2658.java:55) ~[server-intermediary.jar:?]
	at net.minecraft.class_2545.method_10838(class_2545.java:45) ~[server-intermediary.jar:?]
	at net.minecraft.class_2545.encode(class_2545.java:14) ~[server-intermediary.jar:?]
	at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-codec-4.1.82.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.82.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) ~[netty-transport-4.1.82.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) ~[netty-transport-4.1.82.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) ~[netty-transport-4.1.82.Final.jar:?]
	at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:113) ~[netty-codec-4.1.82.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.82.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764) ~[netty-transport-4.1.82.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:790) ~[netty-transport-4.1.82.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:758) ~[netty-transport-4.1.82.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:808) ~[netty-transport-4.1.82.Final.jar:?]
	at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1025) ~[netty-transport-4.1.82.Final.jar:?]
	at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:306) ~[netty-transport-4.1.82.Final.jar:?]
	at net.minecraft.class_2535.method_36942(class_2535.java:220) ~[server-intermediary.jar:?]
	at net.minecraft.class_2535.method_10761(class_2535.java:212) ~[server-intermediary.jar:?]
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[netty-common-4.1.82.Final.jar:?]
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[netty-common-4.1.82.Final.jar:?]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.82.Final.jar:?]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:566) ~[netty-transport-4.1.82.Final.jar:?]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.82.Final.jar:?]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.82.Final.jar:?]
	at java.lang.Thread.run(Thread.java:1583) ~[?:?]
[01:16:16] [Netty Server IO #2/ERROR]: Exception occurred in netty pipeline
io.netty.handler.codec.EncoderException: io.netty.util.IllegalReferenceCountException: refCnt: 0
	at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:125) ~[netty-codec-4.1.82.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.82.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) ~[netty-transport-4.1.82.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) ~[netty-transport-4.1.82.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) ~[netty-transport-4.1.82.Final.jar:?]
	at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:113) ~[netty-codec-4.1.82.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-transport-4.1.82.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764) ~[netty-transport-4.1.82.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:790) ~[netty-transport-4.1.82.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:758) ~[netty-transport-4.1.82.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:808) ~[netty-transport-4.1.82.Final.jar:?]
	at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1025) ~[netty-transport-4.1.82.Final.jar:?]
	at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:306) ~[netty-transport-4.1.82.Final.jar:?]
	at net.minecraft.class_2535.method_36942(class_2535.java:220) ~[server-intermediary.jar:?]
	at net.minecraft.class_2535.method_10761(class_2535.java:212) ~[server-intermediary.jar:?]
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[netty-common-4.1.82.Final.jar:?]
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[netty-common-4.1.82.Final.jar:?]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.82.Final.jar:?]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:566) ~[netty-transport-4.1.82.Final.jar:?]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.82.Final.jar:?]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.82.Final.jar:?]
	at java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: io.netty.util.IllegalReferenceCountException: refCnt: 0
	at io.netty.buffer.AbstractByteBuf.ensureAccessible(AbstractByteBuf.java:1454) ~[netty-buffer-4.1.82.Final.jar:?]
	at io.netty.buffer.AbstractByteBuf.checkIndex(AbstractByteBuf.java:1383) ~[netty-buffer-4.1.82.Final.jar:?]
	at io.netty.buffer.UnpooledHeapByteBuf.copy(UnpooledHeapByteBuf.java:534) ~[netty-buffer-4.1.82.Final.jar:?]
	at io.netty.buffer.AbstractByteBuf.copy(AbstractByteBuf.java:1194) ~[netty-buffer-4.1.82.Final.jar:?]
	at net.minecraft.class_2540.copy(class_2540.java:1628) ~[server-intermediary.jar:?]
	at net.minecraft.class_2540.copy(class_2540.java:1628) ~[server-intermediary.jar:?]
	at net.minecraft.class_2658.method_11052(class_2658.java:55) ~[server-intermediary.jar:?]
	at net.minecraft.class_2545.method_10838(class_2545.java:45) ~[server-intermediary.jar:?]
	at net.minecraft.class_2545.encode(class_2545.java:14) ~[server-intermediary.jar:?]
	at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-codec-4.1.82.Final.jar:?]
	... 21 more

When I disable this Mod on the server, even if the client still loads it, there won't be any issues.

commented

If the error doesn't reproduce immediately, continue to attempt to rejoin. It should occur consistently frequently.

This doesn't appear to reproduce on cpe:/o:fedoraproject:fedora:41 (via LAN and Essential, on prismlauncher-9.2-1.fc41.x86_64). 1 I wonder whether this relates to how MC or Java interacts with the network stack on cpe:/o:microsoft:windows:11, specifically.

@ninjaguardian and @YELANDAOKONG, what OSes did you use when you encountered this?

Footnotes

  1. Image

commented

Windows 11

commented

#142 (comment)

This potentially partially reproduces 1 on cpe:/o:microsoft:windows:11 with 9.2.0.0:

Image

However, but it's certainly more stable than beforehand.

I say “partially” because I don't see a ./debug directory in $Env:AppData\PrismLauncher\instances\Redy's Pack (Fabric)(1):

  1. #!/usr/bin/env pwsh
    #Requires -PSEdition Core
    #Requires -PSEdition 7.5
    tree "$Env:AppData\PrismLauncher\instances\Redy's Pack (Fabric)(1)" | Select-String -SimpleMatch -Pattern 'debug'
  2. $Null

Though, perhaps that's only generated when it segmentation faults?

Irrespective, the problem with the other OS was that I didn't have mc-better-stats installed, because I'm a moron, and thus uploaded the .mrpack without it. 2 I'll re-test on fedora:41 again tomorrow.

Environment

  1. OS

    1. #!/usr/bin/env pwsh
      #Requires -PSEdition Core
      #Requires -PSEdition 7.5
      Get-ComputerInfo | Select-Object -Property @(
      	'OsName', 
      	'OsOperatingSystemSKU',
      	'OsVersion',
      	'OsBuildNumber'
      ) | Format-List
    2. OsName               : Microsoft Windows 11 Pro
      OsOperatingSystemSKU : 48
      OsVersion            : 10.0.26120
      OsBuildNumber        : 26120
  2. Application

    1. #!/usr/bin/env pwsh
      #Requires -PSEdition Core
      #Requires -PSEdition 7.6.0
      Get-Process -Name 'prismlauncher' | Format-list -Property ProductVersion

      3

    2. ProductVersion : 9.2.0.0

Footnotes

  1. mclo.gs/dNdP5iE

  2. #issuecomment-2438260588

  3. stackoverflow.com/revisions/40259031/1

commented

#142 (comment)

The .mrpack with mc-better-stats installed is available at user-attachments/files/19406183/TEST.zip. Please replace your previous installation with it, if applicable.

commented

My next best guess is that it could be with the way ByteBuf-s are handled by the codes of my mod and another mod. I will have to look further into this once I get the time.

To explain my current speculation, some technical context;

  • A ByteBuf, as the name suggests, is a "byte buffer". It represents a byte array allocated somewhere on the device's RAM. They are commonly used when software deals with binary data. The game's and mods' networking codebases too, often use byte buffers.
  • Given a ByteBuf allocates a chunk RAM, said RAM needs to be "released" once the buffer is no longer needed. Not releasing the buffer results in a memory leak (because you then have junk occupying RAM).
  • One catch about releasing ByteBufs is, if you attempt to release a buffer that's already been released, the buffer throws a refCnt: 0 error. So before releasing such buffers, it's usually a good idea to first check if it was already released.

Now onto my mod's code. My mod, specifically when dealing with some network and packet related aspects, has to handle buffers and on some occasions even create new buffers, all so it can work with binary data and server/client data exchange as it handles networking packets. As explained above, to avoid memory leaks, my mod has to release the buffers it dealt with, to avoid any memory leaks (I believe this behavior is coming from TCDCommons, as that mod of mine is the one that has a bunch of networking code). And yes, I do in my mods's code make refCnt checks to ensure buffers weren't released prior to releasing them.

Now my speculation is that mayhaps another mod that also deals with networking code, also just so happens to hold a reference to one of the netowrking buffers, and in an assumption nothing else released them, they attempt to release said buffers, causing the refCnt error. So in other words;

  1. My mod uses a buffer to deal with binary data
  2. My mod checks if the buffer was released, and if not, it releases it to avoid memory leaks
  3. Another mod holding the same buffer, also chooses to release the buffer for the same reason, but with an assumption nothing else already released it
  4. The refCnt error is thrown.

In other words, my speculation boils down to a conflict in mod behaviors. And the reason I speculate it could be another mod is because this doesn't appear to happen in vanilla instances (by vanilla I mean lack of other mods's presence).

Now if this speculation is true, you may ask "Well, can you just, not release the buffer yourself on your end?", to wich I say;

  • "No, it's too risky to let the buffer be. I do not and cannot know if another mod will release the buffer for me, so ignoring it will certainly cause a memory leak if there isn't anything else out there to release it."

At least, that's my best guess. I may look further into this once I get the time. Although, I am hoping a future update I make will fix this issue. As for other mod developers, I'd ask them to make refCnt checks before releasing buffers.

Issue for me happened after updating Geckolib, Balm, Fabric Language Kotlin, Fzzy Config, and Scholar, so not sure which would be the reason.

commented

#142 (comment)

Apologies for the spam. Reproduced, under cpe:/o:fedoraproject:fedora:41 on both server and client, 1 2 so it's not OS-bound. However, I still see no debug (nor crash-report) directory, @TheCSDev:

  1. #!/usr/bin/env sh
    tree "$HOME/.local/share/PrismLauncher/instances/Redy's Pack (Fabric)/minecraft" | grep -E debug
  2. │   │   │   │   ├── debug_chunk_loader.json5
    │   │   │   │   ├── debug_cube_gen.json5
    │   │   │   │   ├── debug_energy_gen.json5
    │   │   │   │   ├── debug_item_gen.json5
    │   │   │   │   ├── debug_phantom_node.json5
    │   ├── debugify-descriptions.json
    │   ├── debugify.json
    │   │   ├── jei-debug.ini
    

Additionally, @YELANDAOKONG, :~:text= with refCnt and connection%20reset return null.

Footnotes

  1. mclo.gs/tZcjWQP, < #L4776

  2. Image

commented

Can confirm it happens on 1.20.1 with Cloudflared too, just started happening today all of a sudden so not sure why.

commented

My next best guess is that it could be with the way ByteBuf-s are handled by the codes of my mod and another mod. I will have to look further into this once I get the time.

To explain my current speculation, some technical context;

  • A ByteBuf, as the name suggests, is a "byte buffer". It represents a byte array allocated somewhere on the device's RAM. They are commonly used when software deals with binary data. The game's and mods' networking codebases too, often use byte buffers.
  • Given a ByteBuf allocates a chunk RAM, said RAM needs to be "released" once the buffer is no longer needed. Not releasing the buffer results in a memory leak (because you then have junk occupying RAM).
  • One catch about releasing ByteBufs is, if you attempt to release a buffer that's already been released, the buffer throws a refCnt: 0 error. So before releasing such buffers, it's usually a good idea to first check if it was already released.

Now onto my mod's code. My mod, specifically when dealing with some network and packet related aspects, has to handle buffers and on some occasions even create new buffers, all so it can work with binary data and server/client data exchange as it handles networking packets.
As explained above, to avoid memory leaks, my mod has to release the buffers it dealt with, to avoid any memory leaks (I believe this behavior is coming from TCDCommons, as that mod of mine is the one that has a bunch of networking code).
And yes, I do in my mods's code make refCnt checks to ensure buffers weren't released prior to releasing them.

Now my speculation is that mayhaps another mod that also deals with networking code, also just so happens to hold a reference to one of the netowrking buffers, and in an assumption nothing else released them, they attempt to release said buffers, causing the refCnt error. So in other words;

  1. My mod uses a buffer to deal with binary data
  2. My mod checks if the buffer was released, and if not, it releases it to avoid memory leaks
  3. Another mod holding the same buffer, also chooses to release the buffer for the same reason, but with an assumption nothing else already released it
  4. The refCnt error is thrown.

In other words, my speculation boils down to a conflict in mod behaviors. And the reason I speculate it could be another mod is because this doesn't appear to happen in vanilla instances (by vanilla I mean lack of other mods's presence).

Now if this speculation is true, you may ask "Well, can you just, not release the buffer yourself on your end?", to wich I say;

  • "No, it's too risky to let the buffer be. I do not and cannot know if another mod will release the buffer for me, so ignoring it will certainly cause a memory leak if there isn't anything else out there to release it."

At least, that's my best guess. I may look further into this once I get the time. Although, I am hoping a future update I make will fix this issue. As for other mod developers, I'd ask them to make refCnt checks before releasing buffers.