Tech Reborn

Tech Reborn

30M Downloads

Game crashes when you attach Wireless Energy Heater to TechReborn's Generators

QuantumEPR opened this issue ยท 9 comments

commented

Describe the bug
For any TechReborn Generator, if one side has the Wireless Energy Heater Block from IronFurnaces attached directly and that side has auto-output auto-input on, the game crashes.

Steps to Reproduce
Steps to reproduce the behavior:

  1. Place any TechReborn Generator down.
  2. Place the Wireless Energy Heater Block on any of the generator's sides.
  3. Toggle on auto-output auto-input of that attached side.
  4. Client/Game Server Crashes.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information with the version):

  • Minecraft: 1.18.1
  • Mod Loader: Fabric 0.13.3
  • Fabric API: 0.46.6+1.18
  • IronFurnaces 1.18-3.0.0 Fabric

Logs
Pastebin the log [e.g. logs/latest.log] and link it below:

Additional context
I have also submitted a crash report to IronFurnaces' repo.

commented

Cannot reproduce in 1.18.2. For example, works with solar generators. Also, generators usually have no auto-output except fluids. Tried with a grinder and auto output, but everything worked fine as well. Can you give your exact set-up and configuration?

commented

Minecraft: 1.18.1

I'm afraid we wouldn't backport a solution anyway. But I will see if it holds in current mods.

commented

an obvious workaround is to place a hopper between the machine and the furnace.

commented

Iron furnaces has weird slot behavior, not only wireless heater will be the problem. It actually only outputs into vanilla storage (chests, barrels) but none of modded inventories, so I suggest opening issue there.... I can't even find its updated source code unfortunately.

It will void items when iron furnaces try to output items into 'sidedInventory' :W

commented

My mistake. I wanted to say it's caused by auto-input. I am unsure if auto-output has the same problem.

I just attempted with Thermal and Diesel Generator in 1.18.2. The game consistently crashes. It seems to be the same problem reading from the crash report/log.

Caused by: java.lang.NullPointerException: Cannot read the array length because "availableSlots" is null

Exact Steps with Image

Here we have all five "generators." (Solar does not have an item output UI and does not have Generator in its name)
2022-04-27_13 24 11

Now, for example, we choose diesel.
2022-04-27_13 24 14

We select the tab to configure slots.
2022-04-27_13 24 18

We also choose the Up direction as an example. Enable input on the Upside, and enable auto-input.
2022-04-27_13 24 24

Get a wireless heat transmitter .
2022-04-27_13 24 45

Place it on the upside -> Game Crashes. (No Image for this since the game exits into the launcher's crash log page. Here I used MultiMC.)

The Idea

  • The problem naturally occurs when you have used your generator with an auto-input setup for fuel intake and decide to repurpose that side with a wireless heat transmitter without changing the side settings.
  • Now, suppose other faces are occupied by machines (many people would attach machines/chests to generators when they don't want to make cables).
  • You decide to remove the top chest that was supposed to be fuel intake (where auto-input is enabled) and put your wireless energy heater there since you need energy now to smelt something.
  • The game crashes and cannot be logged into without removing the block by either disabling one of the mods and logging into the game, so one of the blocks is removed or using Minecraft world editors like Amulet to edit the ticking block away manually.

Logs

New Crash Report
New Log

commented

Cannot reproduce in 1.18.2. For example, works with solar generators. Also, generators usually have no auto-output except fluids. Tried with a grinder and auto output, but everything worked fine as well. Can you give your exact set-up and configuration?

Yes, the exact set-up is posted above.

commented

I noticed, but didn't have time to check again atm, sorry.

commented

can confirm now

commented

Please, report this issue to Wireless Heat Emitters.

TR uses Fabric API to get items from adjacent inventory and have no ability to stop crash in FAPI if that adjacent inventory doesn't play nicely.