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

This subforum contains all the issues which we already resolved.
User avatar
IsaacOscar
Filter Inserter
Filter Inserter
Posts: 843
Joined: Sat Nov 09, 2024 2:36 pm
Contact:

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

Post 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.
Attachments
factorio-current.log
(9.75 KiB) Downloaded 15 times
Genhis
Factorio Staff
Factorio Staff
Posts: 740
Joined: Wed Dec 24, 2014 8:19 am
Contact:

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

Post 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.
Post Reply

Return to “Resolved Problems and Bugs”