Ultracube: Age of Cube


Unravel the mysteries of the ultradense utility cube in this devious overhaul mod. See the mod page for a complete list of compatible mods.

Overhaul
8 days ago
1.1 - 2.0
16.8K
Logistics Trains Circuit network Manufacturing Power

b (fixed) Invalid LuaEntity API call

10 months ago
(updated 10 months ago)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
    [C]: in function '__index'
    __Ultracube__/scripts/cube_search.lua:302: in function 'cube_search_inventories'
    __Ultracube__/scripts/cube_search.lua:499: in function 'cube_search_local'
    __Ultracube__/scripts/cube_search.lua:850: in function 'update'
    __Ultracube__/scripts/cube_fx.lua:286: in function 'tick'
    __Ultracube__/control.lua:265: in function <__Ultracube__/control.lua:264>

Proposed fix on line 302:

if e.valid then
      local inventory = e.get_inventory(defines.inventory.chest)
      if inventory and check_inventory(e, inventory) then return true end
    end
10 months ago
(updated 10 months ago)

Thanks for the report. Can I ask for the full list of mods you are using, and whether you were doing anything in particular in the game when this error occurred?

I ask since the error indicates something has gone awry with the cache the mod uses to keep track of entities (it seems like a chest or similar got removed without triggering an event), and while the proposed fix might avoid this specific error it won't address the root cause.

10 months ago

It's possible this is fixed in 0.2.6.

10 months ago

I believe it happened right after or right before an inserter placed the cube on the ground since that's when I got the error.

10 months ago
(updated 10 months ago)
Error while running event Ultracube::on_tick (ID 0)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
    [C]: in function '__index'
    __Ultracube__/scripts/cube_search.lua:319: in function 'cube_search_inventories'
    __Ultracube__/scripts/cube_search.lua:426: in function 'cube_search_full'
    __Ultracube__/scripts/cube_search.lua:887: in function 'update'
    __Ultracube__/scripts/cube_fx.lua:286: in function 'tick'
    __Ultracube__/control.lua:265: in function <__Ultracube__/control.lua:264>

Same issue but I wasn't by the cube so I don't know what was going on during then. It happened again right after I reloaded the save so it seems like it happens infrequently.

10 months ago

https://imgur.com/a/fWpcGNx

So I happen to be next to it this time

10 months ago

Do you have any other mods active?

10 months ago

Also, if it consistently happens and you can provide a save file (with steps to make it happen if known) that would also be tremendously helpful.

10 months ago

Oh yeah, my bad. https://drive.google.com/file/d/1BJkNjEKlP-ixIXzaKDOelIsCT1rwYcS1/view?usp=sharing
I think it happens when I use the TimeButtons mod. Usually, after some time I turn the tick speed back to 1 from 10. It doesn't happen every single time but it is frequent.

10 months ago

Happens consistently when a creative chest with the cube is removed or changes pages while the cube is in use as fuel or crafting in another machine, or when a duplicate cube is deleted. 'Ultracube warning: optimized cube control routes failed' also appears in the chat.

10 months ago

Thanks for the details both. I haven't done extensive testing with creative mode and the TimeButtons mod is probably up to something unexpected, I'll have a look.

10 months ago
(updated 10 months ago)

I'm fairly sure the problem in the save that was posted was down to the Merging Chests mod which doesn't play nicely with Ultracube and has been marked as incompatible after a different report.

10 months ago

Huh, that's something.

New response