Factory Search


Search your factory for items, fluids, entities, signals, tags and more with Shift + F. Displays a list of matching buildings: clicking on a result opens it in the map. Supports Space Exploration (works across all surfaces). Control + Shift + Click on almost anything (e.g. built entity, inventory item, recipe) to open the search with that item selected. Similar to BeastFinder and Where is it Made?

Utilities
3 months ago
1.1
69.6K

b [Fixed-1.1.2] Crash when selecting virtual signal

2 years ago

The GUI for selecting the item show a question mark in a "Unsorted Category": https://ibb.co/KXWrYG7
When I clicked that item (no name or description to help me find what mod introduced), the application crashs: https://ibb.co/pjpY86b


1088.284 Error MainLoop.cpp:1284: Exception at tick 59321223: The mod Factory Search (1.1.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event FactorySearch::on_gui_elem_changed (ID 68)
FactorySearch/scripts/ui.lua:77: bad argument #1 of 2 to 'next' (table expected, got nil)
stack traceback:
[C]: in function 'next'
FactorySearch/scripts/ui.lua:77: in function 'build_result_gui'
FactorySearch/scripts/ui.lua:293: in function 'start_search'
FactorySearch/scripts/ui.lua:305: in function <FactorySearch/scripts/ui.lua:298>


Thanks

2 years ago

Thanks for reporting this, I actually found it myself last night, and it is fixed now in v1.1.2.

The select item GUI is provided by the game API so isn't made by me. The only control I have over it is to set its elem_type (from the options listed here: https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.elem_filters), but there's no option for "item-and-fluid", so I have to use "signal" instead, which includes all items and fluids, but also (unfortunately) the signals (number icons, etc) and the mysterious 'unknown signal'. The mod just ignores it when you select a signal instead of an item/fluid, but I broke that bit of the code in v1.1.0 hence the crash :)

The 'unknown signal' option appears even at the start of a save, so it doesn't actually mean that there is a missing signal. You can +1 the forums request (https://forums.factorio.com/viewtopic.php?f=28&t=97127) to attempt to convince the devs to add a "item-and-fluid" elem_type to avoid the unwanted signals appearing.

New response