Storage Drawers: Natura Pack

Storage Drawers: Natura Pack

9M Downloads

[1.12.2] SD Causes server crash in AppliedEnergistics

Morpheus1101 opened this issue ยท 23 comments

commented

i've spoken to yueh and the following is the report and outcome from speaking iwth him about the crash i was getting an the eventual reasoning behind it. Since it was there i was told the cause of the issue was SD all information i know is with the below mentioned report.

AppliedEnergistics/Applied-Energistics-2#3426

commented

Makeshift crash report, if needed.

commented

I got the world loaded with the pack, but I'm a new player at heck knows where. And whoops there's the grid node crash, but not something I can really deal with yet.

  • Can you give me a working version of the world
  • What are the coordinates of the affected setup

This isn't really something I can load into a debug environment. Too many mods. Ultimately I have to reproduce the issue in a simplified setting.

commented

1557 87 8287 is the cords for the base in question, the world you have was a massive shrunk down version, i'll try an shrink it down more, but a working world, the only difference is i have changed the SotrageDrawers having a AE StorageBus to an Import bus an moved everything in the drawers into the AE system.

The map is running on a live public server, but a lot has changed since this issue 1st cropped up in terms of updating and removing mods

commented

Could you provide a world save or a more descriptive reproduction? Not sure what I should be testing, since I can put a single nether start into a basic network without issue.

commented

https://uploadfiles.io/h7d3u has a world that has the issue occuring,as for reproduction, all i know is that it was occuring so itd crash the server and only way to get back into the world was to go back to a working one an change the drawers from having storage bus to importing every item into the ME system at the affected base

commented

This snippet may or may not be related, but part of spam on server console:

[07:53:55] [Server thread/WARN] [AE2:S]: Removing item {Craft:0b,Cnt:1L,id:"storagenetwork:master",Count:1b,Damage:0s,Req:0L} from storage cell because the associated item type couldn't be found.

[07:53:55] [Server thread/WARN] [AE2:S]: Removing item {Craft:0b,Cnt:1L,id:"storagenetwork:remote",Count:1b,tag:{bound:1b,dim:0,sort:"NAME",c0:{id:"minecraft:air",Count:0b,Damage:0s},c1:{id:"minecraft:air",Count:0b,Damage:0s},c2:{id:"minecraft:air",Count:0b,Damage:0s},c3:{id:"minecraft:air",Count:0b,Damage:0s},c4:{id:"minecraft:air",Count:0b,Damage:0s},c5:{id:"minecraft:air",Count:0b,Damage:0s},c6:{id:"minecraft:air",Count:0b,Damage:0s},c7:{id:"minecraft:air",Count:0b,Damage:0s},c8:{id:"minecraft:air",Count:0b,Damage:0s},x:-893,y:69,z:1245},Damage:1s,Req:0L} from storage cell because the associated item type couldn't be found.
[

commented

OK, I more or less have it tracked down where it happens, but not why.

Responsible is a compacting drawer at BlockPos{x=1545, y=91, z=8291} storing nether stars.
It happens during the actual insert, not simulate (which runs fine).

The actual line, where it fails is FractionalDrawerGroup.java#L268.
FractionalStorage#pooledCount is 27813.

convRate is [0, 1, 0] so the previous poolMax evaluates to 0, which leads to (0 - 27813) / 1, which then sets willAdd to -27813 and continues from there.

Why pooledCount has this value, I have no idea. It seems to be set way earlier. So it might actually be some data corruption, as preventing the crash seems to auto correct it. I haven't yet looked at the actual NBT data, with the drawer location known, that might be an idea.

Hope this helps a bit.

Just in case the actual value we did get as remainder was not stable and fluctuated by a few thousand. So using an exact condition for pooledCount might not always work.


EDIT

The important info is probably that the netherstars are stored in the second slot. Not in the first like normally.

@Morpheus1101 is there a chance that some mod added nether star chunks/fragments/etc which could be compacted into nether stars? Which then was reduced?

commented

Thank you @yueh

I will take another look at this after work. The convRate you mentioned is invalid, so that will be something to figure out. I can probably do a better job protecting the inventory operations in that case though.

@Morpheus1101 might be able to say whether that pooledCount is reasonable or not. It represents the amount of the "smallest" item in the compacting drawer. So if you had nether star fragments, then you'd be looking at 3090 nether stars in storage.

commented

I should still have the instance around to test it indev, it more or less depends on different mods for chunkloading etc, otherwise it won't even crash.

Cannot guarantee that I still have the old breakpoints, as they need to be conditional ones. But I will try to attach the StorageDrawer source to step through it. I would not be surprised, if Forge just has corrupted some chunks like usual and it now runs into some under/overflows or similar. But maybe it is similar to the old issue with the prototype being removed too earlier, just here some other drawer leaks the stored amount as remainder.

commented

chunk loading is done via FTP Utilities

commented

The count that was there would have been quite high, exacts i couldn't say now since all of it was combined into my ME system

commented

The missing item theory isn't a bad one. Does your world have a compressed nether star object right now?

commented

Dosent have one now

commented

https://github.com/MinecraftModDevelopment/New-MMD-Public-Pack/tree/master/mods is a list of everything we have on the server currently.

commented

My guess is you originally had one, and it got lost among one of the mod or config changes recently. That item probably got blanked out on load (which has since been persisted back to disk), but did not trigger recalculating the compacting drawer, so it got left in an inconsistent state.

I should have something ready tonight that you could test.

If you've got some older backups of the world, I'd like a copy of the region file that contained that compacting drawer. That might confirm it.

commented

It is just a guess, but I suspect that at some point a smaller variant of the nether stars did exist and thus the normal ones where pushed to the second slot. Which is probably really rare to ever encounter, usually it is a vanilla block as base item or a mod providing all items (nugget,ingot,block). But would explain how the nether stars ended up in the second slot.

commented

The first slot would hold the larger item so in this case it would have to be a compressed nether star block. Presumably it should have had a convRate array of [9, 1, 0].

Then in that case the pooledCount would actually represent 27813 nether stars. Unless there was a fractional star that should have been in the third slot.

commented

Al i have is a copy of the world in which i sent you a link to, which has the issue occuring. But yes, we did have a compresed nether star block, which was added by the mod Tiny Progression, which for the update i was doing that caused the issue was 1 of the mods removed.

commented

I did a test removing a compressed block from the game. I did not get a grid crash with the AE system, but it did dupe quite massively. So I'm pretty sure that's what's up.

missing-comp-item

commented

Well, that is indeed quite a nasty lil glitch, glad this was identified and id imagine quite an unusual thing to occur.

commented

This should be fixed in 5.3.6 now. It should also repair your broken block when it loads.

Thanks @yueh for the heavy lifting on debugging this.

commented

Tested the new version with the broken world and it all loaded fine.

commented

jaquadro, by some small miracle, you dont happen to still have a copy of the world form this floating around?