PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

50M Downloads

Crash when PneumaticCraft Smart Chest attempts to push into Blood Altar

MuteTiefling opened this issue ยท 7 comments

commented

Issue Description:

Out of Bounds crash. Logs below.

What happens:

Crash when PneumaticCraft Smart Chest attempts to push into Blood Altar

What you expected to happen:

Nothing, there's already an item in the altar, so it shouldn't do anything.

Steps to reproduce:

  1. Place Stone in Blood Altar
  2. Place Smart Chest next to altar
  3. Place items in the Chest
  4. Set the Chest to push into the altar (this happens naturally as you're attempting to toggle to pull mode)

Affected Versions (Do not use "latest"):

  • BloodMagic: BloodMagic-1.16.4-3.1.2-17
  • Minecraft: 1.16.5
  • Forge: 36.2.2
  • PneumaticCraft: pneumaticcraft-repressurized-1.16.5-2.14.1-245

Logs:
latest.log

Not really sure if this is on BM or PNC side. Reporting to both.

commented

I can't reproduce this in the current release. Smart chest can push and pull items to/from a Blood Altar with no problems in my test world. Tested both with an empty altar, and trying to push to an altar with an item already in it.

Can you test with 2.14.2 please?

Related, there was a fix for a similar problem in 2.13.5: #882 But if you're still seeing a problem in 2.14.1, that's concerning. (In that case, the target inventory reported itself as a 0-size inventory which confused the smart chest. I don't think that's the case with the Blood Altar, which appears to be a 1-slot inventory).

Also, your stacktrace indicates the crash happened when the chest was pulling, not pushing. See the reference to tryPull() in the trace.

commented

Actually, I think I can see a case where this might go wrong. Did you previously have some inventory with a larger number of slots adjacent to the smart chest? The smart chest caches the slot number of the neighbouring inventory it last interacted with (to minimise inventory scanning), so if that inventory is replaced with one with fewer slots (e.g. Chest -> Blood Altar), the cached value could be out of range for the new inventory.

Going to push a change shortly which should fix that, so there will be a dev build for you to play with.

commented

Build 248

commented

Ok, managed to reproduce it and realized I left out a step. The chest was filtered.

Fresh log:
latest.log

Video showing steps taken.
https://streamable.com/hpmlf4

You'll see once it's filtered I set it to pull (thought it was push last time, but you're right, was actually in pull mode) and it immediately crashed. I have forge set to delete erroring tile entities, so it just closes out of the chest and when I re-open it you see it's all cleared out.

I'll try your build here shortly and see if I can reproduce there

commented

Yep. Seems to be fixed in this build ๐Ÿ‘ Thanks! Your efforts are always appreciated!

commented

Fixed in 2.14.3