-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Infinite recursion when connecting GTCE cables to Compact Machine tunnels #1374
Comments
Thank you for creating this issue. This should be investigated. Our energy is probably not compatible with Compact Machine (if they are not using our energy API) but at least we should not crash game. |
Compact Machine tunnels pass through Forge Capabilities, which should make it possible for it to be compatible. |
I am having a hard time reproducing this issue on GTCE: 1.10.9.612 and Compact Machines: 3.0.18-b278. Specifically I am having a hard time getting the compact machine tunnel to connect to the cable that is placed outside the compact machine. In all the ways I have done so, the GTCE cable will not connect to the compact machine. Would you mind elaborating on how you got them to connect? |
Okay, I just redid the experiment from within FTB Interactions. In that experiment I never saw the cables connect. However, if the cables are in place and power is "sent" though the cables the crash occurs. I'll see if I can't craft up a minimal example outside of that modpack. |
Okay, I managed to create a minimal example.
In the
Any situation with a powered manasteel cable on the outside outside of a compact machine, a tunnel inside the machine to the side with the cable, and a cable adjacent to the tunnel on the inside of the machine causes the crash. |
Ok, thank you for the reproduction steps. This issue occurs only when the cables on either side of the compact machine (inside and outside) are the manasteel cables. It does not happen at all with the default GTCE cables, for which I tested with copper cables, and it does not occur when you attempt to use different cables on either side of the compact machine. |
Okay, this just got more interesting and difficult. Thank you both for providing us with more information regarding this. It seems that cables generated on custom material created via CT have (or miss) some property which causes this. So that should be vector for investigation. Anyway it should be fixed as it is provided functionality by GTCE. |
Some information on what is happening here (assuming you got the cables to connect): Gregtech will see the compact machine on the outside as a machine and send it power when the diesel generator makes power available to the cable. |
You could put a battery box on the inside of the compact machine next the tunnel and it will work fine. |
I have figured out a way to get the cables to connect, but it is does not reproduce the problem. What you do is place something that is an energy container on one side of the tunnel (e.g. a machine) then you can connect a cable to the other side. The tunnel gains the capability from the machine. The problem is that removing the machine to replace it with a cable causes the other side to disconnect because block changes are transferred through the tunnel. There might be a way to play with chunk loading to get this block update/disconnect not to happen but this doesn't sound like the circumstance of the original bug report? |
The issue as I see it is that is not really a bug in GregTech since you shouldn't ever have the situation where 2 cables can connect to a tunnel. The tunnel should never provide the capability to one side when the other side is not present and so the cables should not connect. There is nothing in that processing that depends on the material? The most likely cause is the tunnel is providing the capability due to lag, a chunk loading issue or some other glitch? But, the other glitch could be #1398 since this is an interdimensional thing. |
Is the fact that ordinary copper cables do not trigger the crash relevant at all? |
It would be for #1398 if there is a manasteel cable at the same block position as the compact machine |
* optimize creative tank * optimize fluid filling in recipe logic * add cached hashCode to FluidTankList * minor improvements to util methods * de-stream and optimize CraftTweakerItemInputWrapper#acceptsStack Co-authored-by: Tech22 <[email protected]>
Describe the bug
As a test, I created a compact machine and placed it next to an active Gregtech Community Edition cable. I added a tunnel to in the compact machine to the side with the cable. When I placed a GTCE cable next to the tunnel, the game crashed. The crash is due to infinite recursion in
CableEnergyContainer
betweendispatchEnergyToNode()
andacceptEnergyFromNetwork()
. The crash is persistent between reloads, so I have had to restore from backup.Versions
Forge: 14.23.5.2847
GTCE: 1.10.1.557
Modpack: FTB Interactions 2.0.10 found (from FTB discord) at https://drive.google.com/file/d/1maGmng2twpUpZ-ZTBEBHPtEJPTmRN_d4/view
Addons: none
Setup
Playing Solo
Steps To Reproduce
coppermanasteel cable to the generator's output.coppermanasteel cable next to the tunnel.Note: I originally wrote "copper cable" above. But in practice, I used the manasteel cables added by FTB Interactions. They are MV cables with a loss per block set to 0 and have an amperage of 4. When I retried the experiment using copper cables, no crash happened. So this may be considered specific to FTB Interactions.
Expected behavior
Since GTCE seems to be using Forge capabilities, I was expecting the cable to transmit energy into the compact machine through the tunnel. In the worst case, I expected the cables not to connect at all through the tunnel.
Relevant portion of crash log:
The text was updated successfully, but these errors were encountered: