Mekanism

Mekanism

111M Downloads

Server will crash after it finishes loading // 1.10.2

SebaSphere opened this issue ยท 10 comments

commented

FML Log Every Crash
https://zerobin.net/?3040b5b7833334c6#rlKtwPQJChX3dtvYPI1lMdboL/B2Ua3KRb1MJcIIryI=

Server Log Every Crash
https://pastebin.com/ptPF7qHn

One of my players on my server was messing around with logistical transporters and IC2 machines and crashed the server every time it loads.

On the servers discord, he said

SebaSphere - Yesterday at 2:39 PM
What exactly did u do. Reporting this on github

warr - Yesterday at 2:40 PM
i made alot of IC2 machines connected to mekanism pipes and sorters
my main imput chest gets glitched by the sorters
so whenever i put in a stack and the items get taken out sometimes there are negative items there and it makes it insta crash

Server has been down for several days already

commented

This is a IC2Exp & Mekanism issue not a IC2Classic & Mekanism issue

commented

Also this seems to be a mekanism issue since the report says: Caused by: java.lang.IllegalArgumentException: empty stack: 0xtile.basic_block_core.0@5
Stacksize is 0 and IC2Exp doesnt like that.

commented
commented

The destination inv shouldn't be attempting to copy a stack before determining if it's "valid", which 0 sized stacks are in certain instances. That said Mek should probably be ignoring them for transfer

commented

@thiakil it creates a copy to determen how much it can inject and using the original for that would be a bad choice, so it copies it. While it copies it makes a check if the stacksize is 0 if yes it should crash.
In the first place 0 stack items should be never being transfered, on the other hand other mods could also just say: if stacksize is 0 don't accept it. But yeah this is on Mekanism side.

commented

No. It only needs to copy if it is going to modify it. One most certainly does not need a copy to read the stack size or what the item is. Stack size of zero has nothing to do with the validity of a stack. They are often used pre-1.11 to say the slot will only accept a particular type of item.

Another thing, IllegalArgumentException means the caller gave the wrong arguments. Mekanism did not call the copy function, its the 3rd ic2 stack line.

Yes, this wouldn't happen if Mekanism checked for zero size stacks at the source, but the crash is ic2's fault, it should just be returning false. I've also not said that we won't fix it.

commented

Ofcourse the crash is on IC2s side because they don't really think about keeping the game running i agree on that one. And they copy it because they modify the stack they change the stacksize to Integer max value to see how much can be injected because their slot mechanic is a type based mechanic and their slots can contain multible mc inventoryslots.

commented

Yeah, it has been posted on their Mantis, but they don't respond as fast as you guys do

commented

oh the devs are well aware of it It takes just time until they patch something or something gets through their process.

commented

This issue has been marked as affecting Minecraft < 1.12. Due to time constraints and the lack of popularity of older versions, we don't support releases older than 1.12.2

Please leave a comment tagging Thiakil if you can reproduce it on 1.12.

If you or someone you know can fix the code, please submit a PR and we will make best efforts to accept it (after ensuring it doesn't break things in an obvious way)