Instability potion effect from RLCraft modpack crashes all minecraft clients (forge+sponge server)

I’ll go straight to the point: after doing a lot of research, I’m pretty sure that Sponge is the mod generating the crashes in my server running the RLCraft modpack.

Check this reddit thread to see the full discussion:

All of this is obvious if I say that before adding Sponge to my Forge server, the instability potion effect didn’t crash Minecraft clients.

I think I’ve discovered a big incompatibility between Sponge and the RLCraft modpack. Basically because if clients crash, there’s literally no way to get them back in the game, other than being quick via server console, change their gamemode to 1, and the issue would be fixed. Because if you don’t do that, they’ll crash again and again.

This crash doesn’t happen in creative mode, that’s why that “fix” works.
For now, I have disabled temporarily the instability potion effect completely in my server.

Was this a known crash? Does somebody know if a fix has been found or not?

Sponge version: spongeforge-1.12.2-2838-7.3.0
Forge server version: 14.23.5.2854
RLCraft modpack version: Server Pack 1.12.2 - Beta v2.8.2
https://www.curseforge.com/minecraft/modpacks/rlcraft/files/2935323

Have you got a copy of your crash? Just to make sure it is related. Seems odd to have a server mod mess with a client so much that they cannot join again (its possible for sure).

Is there any crash on the server side too?
Also what happens when the client attempts to join again? Does it just crash again? Say the connection was refused? Or something else like it doesnt even attempt to connect?

Seems odd to have a server mod mess with a client so much that they cannot join again (its possible for sure).

As long as they have this potion effect applied, of course.

Is there any crash on the server side too?

No, the server never stops working.
Clients crash, but no message would appear in the server console, just that they disconnected and left the game.

Also what happens when the client attempts to join again? Does it just crash again?

Yes, they would keep crashing until I do something about it.
Why? Because the instability potion effect is there yet when they try to join again. So it’s an instant crash obviously.
If at the exact moment they are establishing the connection, basically I spam in the console “gamemode 1 playername”, the problem would be fixed. Because the moment they switch to creative mode, this issue won’t happen.

Say the connection was refused? Or something else like it doesn’t even attempt to connect?

The exact error message they get in their screen is:

A fatal error has occurred, this connection is terminated

Have you got a copy of your crash?

Here.
That’s what they will see if they check their latest.log after the crash.

This was my error log when I reproduced the problem, consciously knowing what I was going to try.
I was checking if the instability potion effect was the root of the problem, and It was indeed.

So looking at RLCraft source code compared to your crash log it seems like its attempting to get the velocity of something from a network packet, however failing to read it, resulting in a primitive to be a null (this is a very bad thing). If its not that then update to the latest RLCraft (if you havent already).

If sponge is the cause of this, its likely due to the phase tracker saying “mods are supposed to work in this way. Your not so im going to force you to” (which most mods dont care about).

You can disable this behaviour for specified mods by going into the sponge global.conf file and putting the id under broken mods. Here is the wiki link for it.

https://docs.spongepowered.org/stable/en/server/getting-started/configuration/sponge-conf.html#configtype-brokenmod

So looking at RLCraft source code compared to your crash log it seems like its attempting to get the velocity of something from a network packet, however failing to read it, resulting in a primitive to be a null (this is a very bad thing).

Instability is a potion effect that makes run in all directions. Maybe with “velocity”, you mean the velocity at which the player will move during this effect? And, is trying to get this value from a network package?

Also, I’m more into sysadmin rather than programming but I know that null pointer exceptions are always a bad sign.

If its not that then update to the latest RLCraft (if you havent already).

I’m indeed running the latest version of RLCraft 2.8.2. Here’s the link to it (server version specifically).

If sponge is the cause of this, its likely due to the phase tracker saying “mods are supposed to work in this way. Your not so im going to force you to” (which most mods don’t care about).

I don’t understand quite well what a “phase tracker” is, and that explanation sorry.

You can disable this behaviour for specified mods by going into the sponge global.conf file and putting the id under broken mods.

Ok, so I guess that since the mod causing trouble is “Lycanites Mobs”, I should get the id for this one.
I could get it simply by looking at the in-game menu of forge mods.
Its ID is: lycanitesmobs

My broken-mods configuration looks like this now:

    broken-mods {
        # A list of mod ids that have broken network handlers (they interact with the game from a Netty handler thread).
        # All network handlers from a forcibly scheduled to run on the main thread.
        # Note that this setting should be considered a last resort, and should only be used as a stopgap measure
        # while waiting for a mod to properly fix the issue.
        broken-network-handler-mods=[lycanitesmobs]
    }

I hope that this is the right syntax.

I’ve read the wiki but still I’m a bit confused about what this is going to do. I have background in sysadmin, but I still struggle to understand.

Does this mean something like, the mods I list there, will use the same TCP connection as the other ones or something?

I ask this because I always love to understand perfectly all that’s happening, why it’s happening, etc etc.

EDIT 1: After making that change in Sponge configuration, I re-enabled the instability potion effect on Lycanites Mobs, and the crash would happen again.

When it comes to velocity IDK, all I know its it mentions velocity in the XYZ directions (im not reading all the code just to find out).

Null pointer on a primitive value is worse then a normal null pointer, but glad your a sysadmin so I can talk technical … Even if its not programming technical :slight_smile:

When it comes to the latest version, i didnt compare your version to the latest, just wanted to make sure

The Sponge Phase tracker is the heart of what makes Sponge so good for plugin devs. It checks everything and allows devs to grab anything. So for example, in Bukkit (which doesn’t have any phase tracking) you could listen to a Block Change Event (so when any block changes its stage such as growing, being activated by redstone or a arrow hit it or something) however you could only get the immediate cause and even then you couldn’t actually get the data of the cause, just the knowledge that it was caused by X. In sponge however I can get that immediate cause, the data that belongs to it, as well as the cause of the cause (so if you think of redstone, i can get the single block of redstone that changed as well as the immediate redstone wiring that caused the original redstone to change, as well as the redstone wiring that caused that to change. All the way to the switch (or whatever) that started the whole thing … As well as even further then that such as the player that pressed the switch. So the phase tracker is a really good and powerful thing. The issue is that it expects the minecraft server to act in a certain way (a way that forge wants mods to run) which causes mods that dont act in this way to not play nice.

The value you added to should allow network data to pass between the server and client like it was normal. The phase tracker hates it as it cannot keep track of it and may lead to other issues. Sadly i haven’t ever used it so not sure if what you put is right.

The value you added to should allow network data to pass between the server and client like it was normal. The phase tracker hates it as it cannot keep track of it and may lead to other issues.

I’ve noticed why my configuration on Sponge wasn’t solving the crash.
Sponge is deleting what I write in global.conf, and switching it back to the default value every time I start the server.

If It write it like this:

    broken-mods {
        # A list of mod ids that have broken network handlers (they interact with the game from a Netty handler thread).
        # All network handlers from a forcibly scheduled to run on the main thread.
        # Note that this setting should be considered a last resort, and should only be used as a stopgap measure
        # while waiting for a mod to properly fix the issue.
        broken-network-handler-mods=[lycanitesmobs]
    }

It will be reset.

As I read in the Sponge docs, this variable is a string…so I tried this:

    broken-mods {
        # A list of mod ids that have broken network handlers (they interact with the game from a Netty handler thread).
        # All network handlers from a forcibly scheduled to run on the main thread.
        # Note that this setting should be considered a last resort, and should only be used as a stopgap measure
        # while waiting for a mod to properly fix the issue.
        broken-network-handler-mods=["lycanitesmobs"]
    }

It was reset again.

Then, I tried it like this:

    broken-mods {
        # A list of mod ids that have broken network handlers (they interact with the game from a Netty handler thread).
        # All network handlers from a forcibly scheduled to run on the main thread.
        # Note that this setting should be considered a last resort, and should only be used as a stopgap measure
        # while waiting for a mod to properly fix the issue.
        broken-network-handler-mods=['lycanitesmobs']
    }

Reset again.

Do you know what could be resetting this value to the default one (blank)?
Because we can’t know for sure if this configuration will fix anything until the changes actually stay there.

Sponge reads the config when it boots and then rewrites it when it shuts down based on the values it had in memory.

So make sure that the server is fully off before you make any changes to Sponge files.

If you are then its likely that the format is wrong and therefore when the server boots up, sponge cannot read it and therefore has no value in memory.

The sponge config files use the format of HCON. From what I can remember a list data value works as follows

Key=[
  - "value 1"
]

However you may want to make sure.

Hope that helps

Sponge reads the config when it boots and then rewrites it when it shuts down based on the values it had in memory.
So make sure that the server is fully off before you make any changes to Sponge files.

Sorry my fault, I realized what happened. The order of my actions were:

  • Write configuration (server is still running)
  • Save configuration
  • Turn off the server
  • Turn on the server

Then, now that you say that’s how Sponge works, It makes much more sense.

Now, what I did was:

  • Turn off the server
  • Write configuration
  • Turn on the server

It worked, and the broken mods section looks like this now:

    broken-mods {
        # A list of mod ids that have broken network handlers (they interact with the game from a Netty handler thread).
        # All network handlers from a forcibly scheduled to run on the main thread.
        # Note that this setting should be considered a last resort, and should only be used as a stopgap measure
        # while waiting for a mod to properly fix the issue.
        broken-network-handler-mods=[
            lycanitesmobs
        ]
    }

Sponge replaced my syntax with the correct one.
It was really close to what you said, except for the hyphen+space.


I’ve just tried this new Sponge configuration, plus, re-enabling the instability effect…and It crashes.
Unfortunately, this way won’t solve the issue.

Im sorry. It was worth a try.

If its only happening with that one effect then maybe get a plugin that disables that item? A small sacrifice for a server with both Sponge and lymobs

Im sorry. It was worth a try.

Don’t worry, an error’s an error, and in sysadmin/programming we have a bunch :slight_smile:

If its only happening with that one effect then maybe get a plugin that disables that item? A small sacrifice for a server with both Sponge and lymobs

Actually, when in this thread I was talking about “enabling” and “disabling” this potion effect for testing purposes, it’s because lycanites mobs allows you to block certain features indeed.

I’ve already talked about this in the reddit thread I linked at the start of this Sponge thread…
But for any curious Google readers who might encounter the same error as me, and don’t have time to check the reddit link, I’ll tell you all quick how to disable instability.

Go to /config/lycanitesmobs/general.cfg, and there, modify this:

    B:"instability enabled"=false

Every time you disable this value, at server start, you’ll need to write /fml confirm for the server to continue its boot process.


To end this thread, my main question is…Who should I address in order to try to solve this problem?
Because, this is a bug, and a big one. And I believe that Forge servers using modpacks + Sponge, are not that rare as people may think.

Why? Well, I need Sponge in order for my Forge server to work with waterfall proxy (because Sponge adds the forwarding functionality that needs).

I have RLCraft installed, but the modpack doesn’t add let’s say, grief prevention stuff. I’d need plugins for that, and I need Sponge for that.

And for example, I’ve tried to run magma instead of Forge but for your own sake people, don’t do that with a modpack. Literally ALL will go wrong with your world.

To sum up, who’s the one that should make changes? Sponge or Lycanites mobs?

Thanks for your time, by the way.

I would contact both to be honest. Sponge have made exceptions for mods and the phase tracker in the past however it seems like the Sponge team are focused on getting a 1.16 version out so it maybe a while for the Sponge team to respond in action. They have said they will continue to maintain 1.12 afterwards as API 7.X is LTS.

However on the other hand, this bug is caused by a network handler going wrong within the mod. Why sponge makes it act this way I don’t know but its typically because of the phase tracker which enforces good standards which were in Forges guidelines on how to build a mod.

Based upon the sponge mod compatibility it seems like if a fix were to come in place, it would go on the mods side, however there are some where its fixes you do to sponge (such as disabling async lighting).

I do remember HammerCore being added to the mod compatibility and the fix for that where it got mentioned to both, so the Sponge team talked with the HammerCore devs to sort out a fix.

I would contact both to be honest.

I actually opened an issue here on Lycanites Mobs project repository, but it seems that their response time is frankly slow (having checked dates of last answers and such).

Regarding the Sponge team, how should I contact them? At least to publicly open a bug or something, so when they are able to, they can review it.

However on the other hand, this bug is caused by a network handler going wrong within the mod. Why sponge makes it act this way I don’t know but its typically because of the phase tracker which enforces good standards which were in Forges guidelines on how to build a mod.

Then, does this mean that Lycanites Mobs wasn’t coded following Forge standards, hence they have to fix their code?

To report issues with sponge. Go to the github page and write on the issues tab. As its specific to 1.12 and forge then make sure you mention API 7 and write on the SpongeForge part of the github.

As for whats causing it. Typically mod incompatibility with Sponge comes down to a mod breaking standard. Thats why i mentioned it.

Like i said, the sponge team seem to be focused on getting a 1.16 build out. So your topic may take a while to respond to as well.

The Sponge team also need to fix the download page before any new releases can come out