Server crash with Integrated Tunnels
AlabasterAlibi opened this issue ยท 6 comments
Modpack Version:
0.4.2
Describe the bug:
Using Round Robin mode on an Energy Importer from Integrated Tunnels can induce a StackOverflowError and crash the server.
Steps to reproduce:
- Place down a Mekanism Heat Generator, Thermal Series Redstone Furnace & Pulverizer, and a Refined Storage Controller on the four blocks adjacent to a central block.
- Put a Logic Cable in this central block.
- Add an Energy Importer to the cable facing the heat generator. Add a blank variable card to the "Import Energy" function.
- Add Energy Interfaces to the three previous machines.
- Not sure about this being necessary: wait until all machines are full of energy.
- Finally, enable Round Robin on the Energy Importer. This should crash the server.
crash-2021-03-08_17.11.26-server.txt
Turns out the client is a liar. It's actually a NoSuchMethodError.
Found issue, localize() doesnt use an integer, it uses a string. This is probably a typo by moddev.
Override of Localize()
Original Localize()
@Merlo17, can you factcheck for me?
I don't think it's a typo.
The first method mentioned above is implementing String localize(T instance)
from IIngredientMatcher
The second method is called by the implementation of the first method and has the form:
String localize(String key, Object... params)
Which is used correctly as (the varargs parameter will be a zero length Object array (implcit new Object[0]
):
L10NHelpers.localize("recipecomponent.minecraft.energy");
The real issue is, afaict, is that the second method is marked as @OnlyIn(Dist.CLIENT)
but it is being called on the server distribution (hence it is missing).
Also, no proper log was posted, and the crash report sent doesn't show the issue (NoSuchMethodError is mentioned but the crash report doesn't mention that???)
So I tried to reproduce it following the steps in the OP but it didn't crash when enabling round robin mode (yes, I was using a dedicated server).
debug.log
Okay, I was able to get my own dedicated server running so I can get an actual log, and from my tests, it seems to be a cross mod issue. That being said, Integrated Tunnels is just crashy in general. To note, doing this same thing on a singleplayer game does cause an error in the Energy Importer, where it no longer delivers energy to the controller no matter what setting round robin is on, but doesn't crash anything. Here's the error:
On a dedicated server, setting up a Powah Creative Capacitor -> (Energy Importer -> Logic Cable -> Energy Interface) -> Refined Storage Crafting Grid and then opening the energy importer's GUI crashed my client, and the logs for that are in this file.
2021-03-09-1.log
On the same dedicated server, it seems to be that having any power generation going into two separate power receiving devices, one being a controller using energy, crashes the server when round robin is enabled and both devices are full. These are the two logs for the two times I tested this:
2021-03-09-2.log
2021-03-09-1.log
So here are my revised steps to reproduce:
- On a dedicated server, place down a Powah Creative Capacitor. Adjacent to that, place a Logic Cable. Adjacent to this Logic Cable, place any energy storage device (I used an Integrated Dynamics Energy Battery), and a Refined Storage Controller. Adjacent to the Controller, place a Crafting Grid, so the Controller uses energy.
- Attach an Energy Importer to the Creative Capacitor, and Energy Interfaces on the Battery and Controller.
- In the Energy Importer, put a Variable Card in the "Import Energy" function. To speed up the process, change the rate to 10000.
- Once both energy receivers are full, change the "Import Energy" Round Robin setting to
true
. This should crash the server.
Your setup before enabling round robin should look like this: