owmii / Powah

Discord:
https://discord.gg/A8TP9JY
GNU Lesser General Public License v3.0
28 stars 22 forks source link

[1.16.5] Crash when placing a Powah Energy Cable ontop of @Pipez Energy Pipes w/ Energizing Rods ontop. #174

Open Gbergz opened 3 years ago

Gbergz commented 3 years ago

Versions:

Issue description:

This is from a user in my discord his description of the crash: (On a server) Just discovered an interaction between Powah energy cables and Pipez energy cable A Pipez energy cable was connected to a Powah energy cable, and when going to configure it to break the cable, it instead tried to pull energy in a loop? and crashed the server.

Steps to reproduce:

(SETUP EXAMPLE & VIDEO BELOW)

  1. Be on a server with only Pipez, Powah & Lollipop
  2. Place down a Pipez Energy Pipes in a line.
  3. Place down Powah Energy Cable ontop of the Pipez Energy Pipes.
  4. Now place Energizing Rods ontop of the Powah Energy Cables.
  5. Place a Powah Energy Cell connecting to the Pipez Energy Pipes.
  6. Now configure the Pipez Energy Pipe that is connected right next to the Powah Energy Cell.
  7. Put a Pipez Ultimate Pipe Upgrade into the pipe you configured right next to the Powah Energy Cell. (like this: https://i.imgur.com/UNx7hho.png)
  8. Now sneak right-click the top Pipez Energy Pipes in the line with the Pipez wrench. (like that https://i.imgur.com/eDbSEuL.png)
  9. Game / Server Crashed.
  10. See Crash Report. (below)

Setup

116067677-aaba5280-a689-11eb-8ea0-6afefe5d5e8a

Video of the crash:

https://user-images.githubusercontent.com/26634554/116085951-9ed98b00-a69f-11eb-9008-af801af37e2c.mp4

Crash Report

https://gist.github.com/Gbergz/6c96f3c370e3ad180156e74c51e2556c

More Info:

Had a conversation with HenkelMax the Author / Creator of the Pipez Mod on their issue tracker about this issue. That issue can be found here: https://github.com/henkelmax/pipez/issues/33 | It contains more info on this crash.

Hopefully I've included enough info. - Gbergz

jebjordan commented 3 years ago

... it's been a while; no response though?

BlueAgent commented 3 years ago

Seems like both cables have no capacitance and instantly transfer from source to destination. Both mods can fix this by having a network wide lock when simulating/actually transfering energy to prevent recursion.

Powah cables probably need a rework though due to the O(n^2) memory usage where n is the cables in a network.