Bewitchment

Bewitchment

7M Downloads

Server Desync?

VoidLock92 opened this issue ยท 3 comments

commented

Hello, I was chatting with a couple support people on the discord and they informed me I should open a ticket on the github.

The issue is that my server will not allow players to gain ME onto their character. Alters work just fine but the gaining of ME into the player to show on the left bar will not work. There is no crash log as the server or client do not crash.

Bewitchment version: bewitchment-1.16.5-16.jar
Minecraft version: 1.16.5
Fabric version: 0.11.6

What I have tried so far:

  • Running in single player (works fine in single player)
  • I was told maybe being killed could help (it did not)
  • Restarting server did not help either
  • Tried connecting over localhost
  • Tried to use a normal alter on the server and a alter with the blessed stone (neither worked)
  • Server is not lagging it has 20TPS and 5MSPT
  • Checked to see if it was just a visual bug or not by trying to use ME while not near an alter (did not work so it is not just a visual bug)

Not sure what else I can try to fix this. Any help would be awesome :) Thanks again for your time!

commented

I have figured out the issue, and it is a strange one. I will do my best to explain it. Firstly it appears to have NOTHING to do with ANY mods directly from what I can tell. What I mean by this is from my testing, it is not the mods themselves causing any of these issues (again only the mods I have tested from my pack some of which are listed up above)

Anything causing a memory leak seems to cause this issue, no matter how small the memory leak is. What I believe to be occurring is that when there is a memory leak the server is stuck in a constant state of desync... Causing internal 'ME' and thus brooms/trinkets to not work as intended.

My memory leak was caused by 2 things, the first was a small memory leak from 'AdventureZ' for 1.16.5. This mod has a small issue that has since been corrected in the 1.17 versions of the mod. It was spawning mammoths out of control not only causing lag but also causing a small memory leak to eat away at the servers total available memory over time.

The second and what I think to be the most important memory leak and issue has to do with the 'View Distance' setting in the server properties file. I had carried over a server properties file from a older server to save time on setting it up. This file had the server view distance set to 14. I am not sure what the max effective view distance for a server is but I think this is over that limit. Because the view distance was so high and over what I believe to be the limit for servers running mods on Fabric... It caused a memory leak that was substantial as it could not render that far out but the memory was getting allocated to it.

I tested with and narrowed it down to this by using VisualVM to see what was using all the memory and not freeing it up with Java16 garbage collection. The chart would slowly over several hours trend upward and upward allowing less and less total available ram until there was none left and eventually locking up the server. Now I'm not sure if this view distance limit is fluid or changes depending on other peoples hardware or mod loadout. But for my situation with the hardware I am using for the server rack and the modpack I am running this was the issue.

This explains why the testing to try and see what mods were 'causing issues' was so touchy and made no sense. I could add one mod and remove another but then add it back in and it would break then fix then break again... I think this is because the way the memory leaks were affecting the overall modded environment was simulating it as if these mods were having issues when in fact they were not. I am able to use ALL of the mods I was having issues with above once I fixed the memory leak. So those mods are NOT an issue (unless they cause memory leaks for you)

TLDR: Check for memory leaks! Also check your server view distance in the server properties file... make sure it is not set to high. I recommend at max 10, but I am using 8.

P.S. I am also now using a mod called 'Bobby' because I lowered the server view distance to 8. What this mod does is allow clients to cache the visuals of chunks so that their client view distance can be larger than that of the server. Even though it will not render mobs or animals or animate or even load those chunks, it creates a wonder feel to the world with no extra load on the server at all as they are simply visuals on the client side.

commented

I have since tested several mods to see how they react with Bewitchments ME usage. Below you will find a list of my findings that could help track down the issue. It does seem to be very random and touchy to any additions at all, so the list will look a bit off but this is just what I have found so far. Also keep in mind that these issues from these mods only break ME on a SERVER not in single player.

  • auto_third_person-1.16.4-1.1.0.jar (BREAKS 'ME' AND BROOMS/TRINKETS)

  • appleskin-fabric-mc1.16.x-2.0.0.jar (BREAKS 'ME' AND BROOMS/TRINKETS EVEN IF ON ONLY CLIENT HAS IT AND CONNECTS TO A SERVER BUT WORKS FINE IN SINGLE PLAYER) the mod says can work only client side, but server side is recommended to allow proper food regen data. This is with old version 2.0.0 I am testing NEW version uploaded today right now... version 2.1.0. NEW beta version of appleskin is STILL BROKEN! The mod works fine but it breaks the ME regen and BROOMS/TRINKETS.

  • appleskin-fabric-mc1.16.x-2.1.0.jar (BREAKS 'ME' AND BROOMS/TRINKETS)

  • mooblooms-1.4.0.jar (BREAKS 'ME' AND BROOMS/TRINKETS)

  • AnvilFix-1.2.1-1.16.jar (BREAKS 'ME' AND BROOMS/TRINKETS)

  • reroll-1.2.1-1.16.5.jar (BREAKS 'ME' AND BROOMS/TRINKETS)

  • winged-1.16.5-2.1.4.jar (BREAKS 'ME' AND BROOMS/TRINKETS)

  • strawdummy-1.4.0.jar (BREAKS 'ME' AND BROOMS/TRINKETS)

  • haema-1.7.1+1.16.ja (BREAKS 'ME' AND BROOMS/TRINKETS)

THESE LAST 3 USE THE SAME REQUIRED MOD fabric-language-kotlin-1.6.1+kotlin.1.5.10.jar THIS COULD BE THE CAUSE AND NOT THE OTHER 3 SINCE THEY BOTH REQUIRE THIS. HOWEVER THIS MOD WORKS ON ITS OWN, BUT THEN AGAIN IT DOES NOTHING ON ITS OWN SO IT COULD BE THE ISSUE... NOTE KOTLIN WORKS FINE ON ITS OWN, BUT I'M NOT SURE IF THAT'S BECAUSE IT DOES NOTHING ON ITS OWN OR NOT.

  • fabric-language-kotlin-1.6.1+kotlin.1.5.10.jar (BREAKS 'ME' AND BROOMS/TRINKETS? COULD BE ANYTHING USING IT HOWEVER)

  • WildWorld-2.0.0+1.16.5.jar (BREAKS 'ME' AND BROOMS/TRINKETS)

  • riverredux-0.1.6.jar (BREAKS 'ME' AND BROOMS/TRINKETS)

THESE ARE CONFIRMED, TESTING MORE NOW :)

NOTE ALL OF THESE ONLY BREAK THE 'ME' AND BROOMS/TRINKETS WHEN YOU ARE ON A SERVER... INTERNAL SINGLE PLAYER HAS 0 ISSUES WITH THE FULL MODPACK... STRANGE.

commented

Just tested also and having an owl familiar still will not let you ride a broom when this issue is occurring even though they make brooms cost no ME. Making owls useless as familiars. Snakes as familiars can also obviously not regen any of your ME because it will not fill also.