Running "embark-anyone" when you don't have the "Choose Origin Civilization" menu open crashes the game.
Most other times when DF crashes it freezes the game for a bit before closing, but with this one it closes out almost instantly. It also doesn't write anything to the crashlog folder when it happens. I ran into the crash by trying to start a new fortress, then running the command during the embark map screen. It lets me look up civilizations to add, but crashes once you click any of them. Doing all of this but opening the "choose origin civilization" menu before running the command causes no problems.
I can't reproduce this, under v0.52.01 win64 ITCH 52.01-r1 Classic, Vanilla.
The script is definitely flawed; it uses viewscreen fields before validating that it's on the right viewscreen.
But that doesn't cause DF to crash on other viewscreens, it just aborts the script with
Cannot read field viewscreen_choose_game_typest.start_civ: not found.
@DeathOfDelta gave some more info in the discord discussion:
Yeah. I'm gonna make sure it's not a problem with any of my mods, first, though I doubt it is.
oh, this is weird. Generated a vanilla pocket world, and running the embark-anyone there causes zero issues.
Only mod I've got running in the world where it does crash adds some reactions to adventure mode. I don't see any way that could cause the crash... gonna keep toying around to see what does and doesn't cause the crash.
I think I figured it out. It might be stupid as hell.
So when I open the menu to "choose origin civilization" and THEN run the command, it causes zero issues. If I run it on any other screen (at least, if i run it in the embark map) it crashes.