Integrated Dynamics

Integrated Dynamics

63M Downloads

Seemingly infinite loop crash on world load

IrationalReticulatingAugment opened this issue ยท 3 comments

commented

Issue type:

  • ๐Ÿ› Bug

Short description:

On world load, integrated dynamics appears to end up in an infinite loop. I believe one of my networks is using a Get on a dynamic list, which may be related to #265 ?

Steps to reproduce the problem:

Mostly followed the following setup from @natalie on the CyclopsMC discord. If you search the #integratedmods channel for "Deck of Cards", I largely followed the "Advance a List Index based on a condition" set of cards, with some tweak of my own to make it work for me.

List of Wool

Card: List
Type: List
Value: as Item

The list you'll iterate through.

0, 1

Card: Integer
Type: Integer
Value: 0, 1

Null Item

Card: Item
Type: Item
Value:

Current Delayer List

Card: From a Delayer output. You can get this from an empty Delayer.
Type: List

Delay Value

Card: Get Or Default
Type: Any
Value: [Current Delayer List] get index [0] or default value [0]

Delay + 1

Card: Add
Type: Number
Value: [Delay Value] + [1]

Inventory IS Empty

Card: "Inventory Empty" Aspect from an Inventory Reader
Type: Boolean

Item In Inventory

Card: "Slot Item" Aspect from the same Inventory Reader
Type: Item

Current Item Index

Card: Get
Type: Any
Value: [List of Storage Drawer Items] get index [Delay Value]
[List of Storage Drawer Items] = a list of all the items in a storage drawer network, sliced [1:number of slots in SD network] (in my case, it's sliced 1:4 and I have 3 items. This is because the first result in an item list from a storage drawer is empty.

Export Index If Empty (Held in item exporter)

Card: Choice
Type: Any
Value: [Inventory IS Empty] ? [Current Wool Index] : [Null Item]

Match ? +1 : +0

Card: Choice
Type: Any
Value: [Inventory IS Empty] ? [Delay + 1] : [Delay Value]

Delay Value Mod 16 (Held in delayer)

Card: Modulus
Type: Integer
Value: [Match ? +1 : +0] mod [16]

Then I believe I took both the export card [Export Index If Empty] card and the [Match ? +1 : +0] cards and wrapped them in an additional choice statement [Redstone Signal ? Export/Match : Null/0] so I could turn the system on and off with a lever. The Redstone signal came from a redstone reader with a lever on it.

I might have written a "get" on my dynamic list of items from the storage drawer while trying to get a display to show me what item it was currently exporting.

Expected behaviour:

I'm not sure what the expected behavior would be, since I'm not 100% what is actually breaking, but it seems like it's getting stuck in a loop and then MC is dying when I try to load the world, so anything but that.


Versions:

  • This mod: IntegratedDynamics-1.12.2-0.11.18.jar
    IntegratedTunnels-1.12.2-1.5.6.jar
  • Minecraft: 1.12.2
  • Forge: 1.12.2-14.23.5.2768-universal

Log file:

https://gist.github.com/IrationalReticulatingAugment/f9f27b037fe842d99a960d8425dc250c

commented

https://i.imgur.com/HlEpNOj.png

This card appears to have been the issue. Loaded the world in safemode, and pulled it out. Went back to the main screen, disabled safemode, and loaded the world again and it loaded fine. The display panel that card was in was behaving a little oddly though. Previously, it wasn't showing anything, but now it's showing an item: https://i.imgur.com/NChNrPR.png

Also, despite safemode being set to false, nothing appeared to be working, so I completely restarted the client and loaded the world again. The display panel is still stuck on compressed dust.

Breaking a cable brought things back to life and cleared the phantom item from the display panel.

Edit: here are all of the cards involved in the problem card, I believe: https://i.imgur.com/B0B5OGR.png

commented

The mystery deepens. https://gist.github.com/IrationalReticulatingAugment/2b623c16c07223b009cbbe04b47be7b2

That's after removing/deleting what I thought was the problem card.

Gist
GitHub Gist: instantly share code, notes, and snippets.
commented

Ok, this was an edge-edge-case. It looks like ID tried to throw an error due to an invalid value type being passed to an operator, but validation happened too late.

This will be fixed in the next update, sorry for the delay.