[2.1.12] Crash when clicking on linked shortcut that is hidden
Posted: Fri Jul 24, 2026 8:02 pm
I apologize in advance, but this would be a great usecase for triggering events by clicking on [shortcut=...] links in chat/factoriopedia while not cluttering the shortcut bar:
- Start game and link it in chat or in a factoriopedia description: [shortcut=my-shortcut]
- Click the linked shortcut
What did you do
- Create a shortcut with hidden = trueCode: Select all
data:extend{ {
type = "shortcut",
name = "my-shortcut",
hidden = true, -- essential for crash
action = "lua",
toggleable = false,
icon = "__base__/graphics/icons/upgrade-planner.png",
small_icon = "__base__/graphics/icons/upgrade-planner.png",
icon_size = 64,
small_icon_size = 64,
}, }
- Click the linked shortcut
What happened
Game crashed. Stack trace:Code: Select all
Factorio crashed. Generating symbolized stacktrace, please wait ...
src/Util/StacktraceToStream.cpp (52): walkStackAndPrintToStream
src/Util/StacktraceToStream.cpp (60): printStacktraceToStream
src/Util/Logger.cpp (340): writeStacktrace
src/Util/Logger.cpp (385): logStacktrace
src/Util/Logging.cpp (59): logStackTrace
src/Util/Logging.cpp (107): logAndAbortOrThrow
src/Util/Logging.cpp (96): logAndAbortOrThrow
src/Gui/ShortcutBarGui.cpp (204): getBehavior
src/Gui/RichTextHoverManager.cpp (594): handleIdHover<PrototypeList<ShortcutPrototype>, void>
src/Gui/RichTextHoverManager.cpp (114): handleHover
/opt/gcc-16.1.0/lib/gcc/x86_64-pc-linux-gnu/16.1.0/../../../../include/c++/16.1.0/bits/std_function.h (581): operator()
libraries/Agui/Widget/Widget.cpp (1718): dispatchClick
libraries/Agui/Widget/Widget.cpp (1697): dispatchMouseDown
libraries/Agui/Gui.cpp (272): handleMouseDown
libraries/Agui/Gui.cpp (231): handleMouseDown
libraries/Agui/Gui.cpp (1041): dispatchMouseEvents
libraries/Agui/Gui.cpp (849): logic
src/GlobalContext.cpp (1461): updateGui
src/MainLoop.cpp (1139): processEvent
src/MainLoop.cpp (817): processEvents
src/MainLoop.cpp (613): prePrepare
src/MainLoop.cpp (695): mainLoopStep
src/MainLoop.cpp (416): run
src/Main.cpp (951): fmain
src/Main.cpp (973): main
0x77b699677ca7
__libc_start_main
_start
0xffffffffffffffff
Stack trace logging done
224.827 Error ShortcutBarGui.cpp:204: Unknown shortcut with ID 4
224.827 Error CrashHandler.cpp:616: Received 6
Logger::writeStacktrace skipped.
224.827 Error CrashHandler.cpp:163: Map tick at moment of crash: 22897113
224.827 Error Util.cpp:95: Unexpected error occurred. If you're running the latest version of the game you can help us solve the problem by posting the contents of the log file on the Factorio forums.
Please also include the save file(s), any mods you may be using, and any steps you know of to reproduce the crash.