UniDict

UniDict

50M Downloads

Log Error: Immersive Engineering Integration: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

Krutoy242 opened this issue ยท 12 comments

commented

Describe the bug
debug.log output this line. But no crashes or ingame errors found yet:

[15:44:17] [pool-9-thread-4/ERROR] [unidict]: Immersive Engineering Integration: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

Should i be worried? How to fix this error?
debug.zip

commented

Hello,

Does this exception get logged to the main log file or only to the debug one? I assume you ran into this problem while developing Enigmatica2Expert-Extended. If yes then could you provide a minimal way for me to reproduce this issue?

Thanks!

commented

logged to the main log file or only to the debug one

Exists in latest.log too:
2021-02-21-2.log.gz

you ran into this problem while developing Enigmatica2Expert-Extended.

Yes, it is. This error appear recently, probably with recent mods updates.

a minimal way for me to reproduce this issue?

Minimal mod set?
This would take whole working day, because operate 10+ minute loading pack is a challenge.
As far this problem is not critical and not causing crashes, i could skip it.

Through, i could give you whole pack, so you could run it yourself, if you have more time or patience ๐Ÿ˜ƒ

commented

Hello, I've added some code to print additional information when an error occurs, could you run this build in your environment and send me the log with the error?

Custom build download:

build.zip

commented

Sure! There debug.log with your test build:
debug.zip

commented

Hello, thanks for the log, I've made an attempt to fix this issue in the following build. Feedback would be appreciated.
build.zip

It seams like UniDict was trying to fetch a oredict name with no items in it ๐Ÿค”

commented

That's strange, i'm pretty positive the problem is in a IE crusher recipe that has a ore dictionary input but for some reason UniDict can't detect any items in that entry. Do you add any crusher recipes via crafttweaker that use a oredict input? If yes, then could you verify that the oredict input has any items in it? I will try to add some code to make sure that UniDict can handle these malformed inputs.

commented

Do you add any crusher recipes via crafttweaker that use a oredict input?

I just removed scripts/ folder entirely and now debug.log hasn't this error. So yes, probably CT code add this.

verify that the oredict input has any items in it

It took some time, but i found that <ore:itemBlazeRod> have no items in it and was used as input for crusher.
This is weird, because TellMe show this OreDict has 1 item - minecraft:blaze_rod. Also, /ct hand shows oredict name on Blaze Rod too.

Probably, item added into oredict after crusher recipes added
I checked - im not manipulate this OreDictEntry in .zs files, so its not the case if other .zs file with different priority changing it.

It would be great, if UniDict warn if used oredict name with no items in it.

commented

I dont see changes with new build. Same error appears.
debug.zip

commented

Ok, then this means that that the blaze rod is only added to the itemBlazeRod key after PostInit stage where UniDict runs. Since this information is only used for the duplication removal option, I don't think it's necessary to add a warning. The input would still be the original one and would be resolved normally by IE. The only problem that this can cause is that if there are two recipes with the same output and an empty oredict key would make UniDict remove one of them as it would think they are the same. Sadly there isn't any way to fix this problem easily.

I have made another attempt to fix this issue, could you try this build with the 2nd fix attempt? I've added a check to verify that an oredict key contains any entries.
attempt2.zip

commented

2nd fix attempt

Tested. No more IndexOutOfBoundsException error.
debug.zip

commented

The fix will be part of the 3.0.7 version, as well as an Astral Sorcery Grindstone integration and an improvement to IE crusher integration, and maybe some other new things :)
I might play E2E-E sometime in the future since it looks interesting E2E was a bit easy :)

Good luck with your pack!

commented

@Krutoy242 Hello, I'm extremely sorry that I didn't release a version on curse forge yet, I thaught I did and I just checked now that I didn't! I'm extremely sorry for this!