[2.0.72] Crash and weirdness with game.simulation.write (BlueprintLibraryGui::rebuildGui)

jurgy
Inserter
Inserter
Posts: 34
Joined: Wed Feb 27, 2019 5:55 pm
Contact:

[2.0.72] Crash and weirdness with game.simulation.write (BlueprintLibraryGui::rebuildGui)

Post by jurgy »

I was messing about with creating tips-and-tricks simulations for my mod and was trying out the game.simulation.write method which lead to a crash to desktop.
Trying to get a minimal reproduction for it to report here I stumbled on some other weird behavior. With just story board:

Code: Select all

game.simulation.active_quickbars = 1
player = game.simulation.create_test_player{name = "big K"}
player.character.teleport{0, 4}

game.simulation.camera_player = player
game.simulation.camera_position = {0, 0.5}
game.simulation.camera_player_cursor_position = player.position

local story_table =
{
  {
    {
      name = "start",
      init = function() end,
      condition = story_elapsed_check(1)
    },
    {
      condition = story_elapsed_check(0.25),
      action = function()
        game.simulation.write{text="foo"}
      end
    }
  }
}
tip_story_init(story_table)
The character/simulation opens the Train Overview and starts walking to the left:
11-03-2025, 22-56-54.png
11-03-2025, 22-56-54.png (333.26 KiB) Viewed 285 times
"o" is the hotkey for the train overview, so I guess that has something to do with it, but other than that, idk.

I'll attach this smaller mod as well as the mod I was originally working on with the crash log so you could hopefully also reproduce the crash to desktop but if you need more info, let me know.
Attachments
factorio-current.log
(17.45 KiB) Downloaded 9 times
canal-excavator.rar
(74.71 KiB) Downloaded 7 times
tips-tricks-bug.rar
(30.62 KiB) Downloaded 7 times
jurgy
Inserter
Inserter
Posts: 34
Joined: Wed Feb 27, 2019 5:55 pm
Contact:

Re: [2.0.72] Crash and weirdness with game.simulation.write (BlueprintLibraryGui::rebuildGui)

Post by jurgy »

I was talking about another crash of the simulator with Jarg in the modding discord and he has created a pull request on your side for the fix for that, so maybe that also fixes this.

Edit:
Nevermind
justarandomgeek wrote: oh that one's a gui thing, i'm not touching that
justarandomgeek
Filter Inserter
Filter Inserter
Posts: 305
Joined: Fri Mar 18, 2016 4:34 pm
Contact:

Re: [2.0.72] Crash and weirdness with game.simulation.write (BlueprintLibraryGui::rebuildGui)

Post by justarandomgeek »

Just to confirm, the other pr (#7998 re: LuaPlayer.blueprints) does not in fact fix this - but i don't understand this one enough to do anything more helpful
Rseding91
Factorio Staff
Factorio Staff
Posts: 16272
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.72] Crash and weirdness with game.simulation.write (BlueprintLibraryGui::rebuildGui)

Post by Rseding91 »

Thanks for the report. I think you have the blueprint library bound to f, or o - and in the simulation it's opening the library (which is where the crash happened). That, or another tips-and-tricks simulation was opening the library GUI.

In either case, it's now fixed for 2.1.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Fixed for 2.1”