Equivalent Exchange 3

Equivalent Exchange 3

2M Downloads

Crash (NPE) in EnergyValueRegistry, seems to be SMP only

maruohon opened this issue ยท 4 comments

commented

We just started a small mod testing server. We have EE3 build 417 on the server. Quickly people started noticing major lag when shift-clicking items in inventories.

Symptoms:
When hovering over items while holding shift, item names are displayed as "unnamed" due to a NPE in the ItemTooltipEvent. That also causes a big lag spike when it spits out traces and whatnot. (I guess it's the try-catch in EntityRenderer.updateCameraAndRender() that prevents the crash, I have had NPEs myself in Item.addInformation, and it just causes the item to be "unnamed", it won't crash the game.)
Also the game crashes completely when looking up the uses of any item in NEI (client side crash).

I just tried updating to the latest build 418 in a single player test world, it worked fine.
I then downgraded back to build 417 (which we have on the server), and tried that in the same single player world, it worked fine. So I can't say for sure it it still happens in 418 in SMP, since the server is not mine and I can't try upgrading EE3. But at least 417 in SMP is broken (all the players on the server have crashed from looking up uses in NEI).

Crashlog: http://pastebin.com/xqKQ2aET

commented

Investigating issues with the EnergyValueRegistry. Regarding the item tooltip event yes that should be client only.

I would recommend updating to 418 on both server and client. If you are testing try to keep up to date with the GitHub when debugging issues as thats the most recent code and far easier for me to troubleshoot on my end.

commented

Welp, I tried adding EE3 to my own small testing server, both 417 and 418 worked just fine. I then changed my server to use the same(-ish) pack we use on the other server (built based on the client pack on dropbox) and tried both 417 and 418 there, no problems.
So I don't know why it is freaking out on the other server. Maybe some EMC values or other data is messed up?

While I did my own testing, I first tried it just after logging in, then I tried logging in after the DynEMC calculations finished (almost 15 minutes after server start!), then I restarted the client and logged in, and finally I restarted the server and logged in. Every time it worked fine, no crashes or NPEs.

But since it is obviously possible for it to have some data as null in some case, maybe throw in some complementary free extra null checks? :p

Anyway, I'll report back after the actual community server updates to 418. In case it still crashes, what ee3 data should we try to delete to see if it fixes it? Is all of EE3 data saved under world/data/ee3/ ? So maybe remove that directory if it still crashes and let it regenerate?

Edit: btw, I'm quite unfamiliar with EE and EE3. Is everything supposed to have an exchange value? I noticed the items from my mod didn't have any. And also some values were quite wonky. At least one that caught my eye was a gold nugget having a value of something like 223.000 or so, although gold ingot had 2048 I believe.

commented

It appears that the problem was that build 417 produced a corrupt archive as the end result (we saw problems on ForgeCraft as well with that build). Later builds should work better.

The system as is does have a lot of null checks - the problem was that the archive was bad :)

Some EE3 data is stored in world/data/ee3 (that would be data that's independent of players, like the energy values and the transmutation knowledge template). There is also data stored in world/playerdata/ee3/ (player specific data like transmutation knowledge, etc).

Most things have an energy value, if one can be calculated from the recipe inputs that produce the item. If an item doesn't have a value it's because one of the recipe inputs that produce the item don't have a value or there is no recipe that EE3 is aware of to produce the item (custom recipe handlers for example, think IC2's macerator/etc).

If you want your mod to have energy values, have a look in the com.pahimar.ee3.api package in the source for the mod. More documentation on how to use this API is coming in the future but in short if you include this package in your mod and use its API functions, when EE3 is also present it will allow you to interface with EE3 to tell it your custom recipes, set energy values, etc.

commented

Alright, thank you for the explanation :)