GUI Unifier

by snouz

Forces mod buttons to look uniform and aligned, harminizes icons, and adds visual options for buttons for 117 mods and counting from mods such as Factory Planner, Helmod, YARM, Module Inserter, Bob's mods, Pyanodon, Schall's mods, Todolist, Creative Mod and many, many more! Now updated & Maintained for Factorio 2.0 & Space Age by SolusCaelum

Tweaks
a month ago
1.1 - 2.0
55.9K

g Attempt to index global 'global' (a nil value)

2 months ago
(updated 2 months ago)
1377.388 Error MainLoop.cpp:1435: Exception at tick 14733475: The mod GUI Unifier (2.0.0) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event GUI_Unifyer::on_built_entity (ID 6)
__GUI_Unifyer__/control.lua:1037: attempt to index global 'global' (a nil value)
stack traceback:
    __GUI_Unifyer__/control.lua:1037: in function <__GUI_Unifyer__/control.lua:990>

I get A LOT of crashes because of this nil global. They were not always coming from on_built_entity, but I can't remember the other functions (one may be the callback for when a ghost is built).

I seem to have noticed that this happens often when loading a save after a crash caused by other mods. It may just be a coincidence though, or me being paranoid.

I can usually solve this by disabling the mod, loading the save, saving without the mod, quitting, enabling the mod, and finally loading the last save.
But it has become extremely annoying.

Is there some way to disable this mod and restore the original gui?
If not, can you explain to me why the gui breaks?

EDIT
The disable-save-enable trick works to reset the gui state.

2 months ago

Happens to me if i load up a save and place a building in quite fast pace, opening the inventory first and closing it does not lead to the error.

a month ago

Hello, thanks for reporting the issue. I'm sorry for getting back you two about this so late.

I've implemented a fix for them in the latest release 2.0.1, can you please try if this fixes it for you? If the issue still occurs, enable logging in the mod's settings under 'per player' and set the Log level to DEBUG. After that, provide the Factorio Log file. That should give me a better idea on what's causing the crashes.

Hopefully it shouldn't happen again though...

New response