Not realizing I could simply use "game.print", I tried preserving the player's personal print function to be used in an event handler, like so:
/c local print=game.player.print script.on_event(defines.events.on_player_crafted_item, function() print("hello") end)
It could be any event, presumably (I first caused it using on_research_finished), but for this example crafting an item will then reliably cause the game to crash, even on a brand new map without any running mods.
I doubt this would be considered very high priority, but hey, a crash is a crash.
[0.15.23] Lua "stale print" crash
-
- Manual Inserter
- Posts: 4
- Joined: Sat Apr 29, 2017 1:22 am
- Contact:
-
- Manual Inserter
- Posts: 4
- Joined: Sat Apr 29, 2017 1:22 am
- Contact:
Re: [0.15.23] Lua "stale print" crash
Thanks for the report. This is however a known limitation of how the Lua API works in Factorio. I could stop it from crashing but it would lead to save corruption if the game was ever saved in that state so the crashing is better.
Simply don't do that if you don't want it to crash
Simply don't do that if you don't want it to crash
If you want to get ahold of me I'm almost always on Discord.