Electrodynamics

Electrodynamics

503k Downloads

Corrosive gas in a gas network leads to a crash as it tries to overload the network's steel pipes, which are apparently null

9thCore opened this issue ยท 3 comments

commented

Repro:

  1. Tag any gas as corrosive under forge/tags/electrodynamics/gases/iscorrosive.json
  2. Increase its pressure so it can explode any pipe type
  3. Produce the now-corrosive gas
  4. Add a pipe rated for less pressure than the network currently hosts
  5. Crash

Test JSON:
{ "replace": false, "values": [ "electrodynamics:oxygen", "electrodynamics:hydrogen" ] }

Video:
https://github.com/user-attachments/assets/527885d5-fa23-42c4-9ec5-a677914be37b

Log:
https://mclo.gs/KekULpK

Technical data: (present in the logs as well, but for ease of verification)
Minecraft 1.20.1
Forge 47.3.1
Electrodynamics 1.20.1-0.9.1-0
KubeJS 2001.6.5-build.14 (Used to load tag changes)
Rhino 2001.2.2-build.18 (KJS dep)
Architectury 9.2.14 (KJS dep)

commented

admittedly i should have verified before opening the issue, but it does happen with just Electrodynamics as well, so its not a KJS incompatibility

commented

Been playing around with this for a bit, and it seems like the cause is not related to corrosive gasses: it errors if a steel pipe type should explode as a result of the gas transfer, which just so happens to occur only when the gas is corrosive as the 100 pressure required to destroy a steel pipe cannot be reached(?). The NullPointerException is caused by conductorTypeMap.get(SubtypeGasPipe.UNINSULATEDSTEEL) being null.
Still unsure why, however, as debugging seems to indicate it should be set up properly and exist no issue...
EDIT: I forgot to mention how gas pressure should exceed the minimum pressure in the network, such that line 326 passes

commented

Good catch.