Page 1 of 1

[Genhis][2.0.28] Crash calling game.simulation.write in main menu simulation (PlayerInputSource::getGameView)

Posted: Tue Dec 31, 2024 2:03 pm
by IsaacOscar
Simply put this in a mod's data.lua and Factorio will crash when it tries to load the main menu:

Code: Select all

data.raw["utility-constants"]["default"].main_menu_simulations = {
	my_simulation = {
		init = [[game.simulation.write{text="hello world"}]] }}
This crash is probably my fault, however there's nothing in the documentation that suggests I'm doing anything wrong: Ideally though, I would like the game to actually give me an error messaging suggesting what I did wrong.

Re: [Genhis][2.0.28] Crash calling game.simulation.write in main menu simulation (PlayerInputSource::getGameView)

Posted: Fri Jan 24, 2025 2:41 pm
by Genhis
Thanks for the report, the crash is fixed for 2.0.33. You will have to assign camera_player before calling the function.