Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0010624Dwarf FortressWorld Generation -- Generalpublic2018-03-14 13:252018-08-11 04:33
Reportersquamouss 
Assigned ToLoci 
PrioritynormalSeverityminorReproducibilitysometimes
Statusneeds feedbackResolutionopen 
PlatformOSOS Version
Product Version0.44.07 
Target VersionFixed in Version 
Summary0010624: Random crash at the end of worldgen
DescriptionWhen generating a world, said world will sometimes crash right at the end of worldgen, when it reaches the last portion ("finalizing sites" I think.) Its entirely random but common enough to be irritating.
Steps To ReproduceGenerate a world a couple of times. It'll crash if you do it enough. Maybe 100+ years increases the chance, I don't know for sure.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0037938)
Loci (manager)
2018-03-15 10:53

Can you provide settings and a seed which crash repeatably?
(0038059)
squamouss (reporter)
2018-03-28 19:14

I cannot do that. It is just something that happens at random at the very end of worldgen, the 'finalizing sites' stage. Multiple other people seem to have this problem at well. And of course since crashing before finalizing the world does not leave a save file I have nothing to submit.
(0038066)
Shonai_Dweller (reporter)
2018-03-29 01:16

You could try duplicating by re-genning with the seed of a world which crashes. If you can replicate it, it would probably help a lot.
(0038068)
PatrikLundell (reporter)
2018-03-29 03:17

The problem with that is to get the seed out of a crashed world gen... You'd need to use DFHack to extract the seeds during world gen until you get one that crashes, and then retry the world gen with the extracted seeds. If that does NOT crash, it would still tell us it's not the seeds themselves that cause the issue, but something like access to memory outside of the intended data structure.
(0038069)
Shonai_Dweller (reporter)
2018-03-29 03:20

Ah. Ok. I thought they were recorded somewhere like the gamelog. Never mind then.
(0038071)
PatrikLundell (reporter)
2018-03-29 04:04
edited on: 2018-03-29 04:09

Here's a DFHack script that exports the parameters to worldgenparms.txt (assuming Mantis doesn't eat up parts of the script like the forum does unless you say you really mean that it's code):

To use it, pause world gen, run the script from the DFHack terminal, resume world gen. Repeat until world gen crashes. Once it does, paste the contents of worldgenparms.txt (found at the DF top level) into <DF>\data\init\world_gen.txt and use advanced world gen to select the profile you just pasted.

function pole_to_string (pole)
  if pole == -1 then
    return "NONE"
    
  elseif pole == 0 then
    return "NORTH"
    
  elseif pole == 1 then
    return "SOUTH"
    
  else
    return "NORTH_AND_SOUTH"
  end
end

--=============================
  
function boolean_to_int (b)
  if true then
    return 1
    
  else
    return 0
  end
end
  
--=============================
  
function worlgenparms ()
  local file = io.open (dfhack.getDFPath().."/worldgenparms.txt", "w")
  local param = df.global.world.worldgen.worldgen_parms

  file:write ("[WORLD_GEN]\n")
  file:write (" [TITLE:" .. param.title .. "]\n")
  file:write (" [SEED:" .. param.seed .. "]\n")
  file:write (" [HISTORY_SEED:" .. param.history_seed .. "]\n")
  file:write (" [NAME_SEED:" .. param.name_seed .. "]\n")
  file:write (" [CREATURE_SEED:" .. param.creature_seed .. "]\n")
  file:write (" [DIM:" .. tostring (param.dim_x) .. ":" ..
                              tostring (param.dim_y) .. "]\n")
  file:write (" [EMBARK_POINTS:" .. tostring (param.embark_points) .. "]\n")
  file:write (" [END_YEAR:" .. tostring (param.end_year) .. "]\n")
  file:write (" [BEAST_END_YEAR:" .. tostring (param.beast_end_year) .. ":" ..
                                          tostring (param.beast_end_year_percent) .. "]\n")
  file:write (" [REVEAL_ALL_HISTORY:" .. tostring (param.reveal_all_history) .. "]\n")
  file:write (" [CULL_HISTORICAL_FIGURES:" .. tostring (param.cull_historical_figures) .. "]\n")
  file:write (" [ELEVATION:" .. tostring (param.ranges [0] [df.worldgen_range_type.ELEVATION]) .. ":" ..
                                    tostring (param.ranges [1] [df.worldgen_range_type.ELEVATION]) .. ":" ..
                                    tostring (param.ranges [2] [df.worldgen_range_type.ELEVATION]) .. ":" ..
                                    tostring (param.ranges [3] [df.worldgen_range_type.ELEVATION]) .. "]\n")
  file:write (" [RAINFALL:" .. tostring (param.ranges [0] [df.worldgen_range_type.RAINFALL]) .. ":" ..
                                   tostring (param.ranges [1] [df.worldgen_range_type.RAINFALL]) .. ":" ..
                                   tostring (param.ranges [2] [df.worldgen_range_type.RAINFALL]) .. ":" ..
                                   tostring (param.ranges [3] [df.worldgen_range_type.RAINFALL]) .. "]\n")
  file:write (" [TEMPERATURE:" .. tostring (param.ranges [0] [df.worldgen_range_type.TEMPERATURE]) .. ":" ..
                                      tostring (param.ranges [1] [df.worldgen_range_type.TEMPERATURE]) .. ":" ..
                                      tostring (param.ranges [2] [df.worldgen_range_type.TEMPERATURE]) .. ":" ..
                                      tostring (param.ranges [3] [df.worldgen_range_type.TEMPERATURE]) .. "]\n")
  file:write (" [DRAINAGE:" .. tostring (param.ranges [0] [df.worldgen_range_type.DRAINAGE]) .. ":" ..
                                   tostring (param.ranges [1] [df.worldgen_range_type.DRAINAGE]) .. ":" ..
                                   tostring (param.ranges [2] [df.worldgen_range_type.DRAINAGE]) .. ":" ..
                                   tostring (param.ranges [3] [df.worldgen_range_type.DRAINAGE]) .. "]\n")
  file:write (" [VOLCANISM:" .. tostring (param.ranges [0] [df.worldgen_range_type.VOLCANISM]) .. ":" ..
                                    tostring (param.ranges [1] [df.worldgen_range_type.VOLCANISM]) .. ":" ..
                                    tostring (param.ranges [2] [df.worldgen_range_type.VOLCANISM]) .. ":" ..
                                    tostring (param.ranges [3] [df.worldgen_range_type.VOLCANISM]) .. "]\n")
  file:write (" [SAVAGERY:" .. tostring (param.ranges [0] [df.worldgen_range_type.SAVAGERY]) .. ":" ..
                                   tostring (param.ranges [1] [df.worldgen_range_type.SAVAGERY]) .. ":" ..
                                   tostring (param.ranges [2] [df.worldgen_range_type.SAVAGERY]) .. ":" ..
                                   tostring (param.ranges [3] [df.worldgen_range_type.SAVAGERY]) .. "]\n")
  file:write (" [ELEVATION_FREQUENCY:" .. tostring (param.elevation_frequency [0]) .. ":" ..
                                              tostring (param.elevation_frequency [1]) .. ":" ..
                                              tostring (param.elevation_frequency [2]) .. ":" ..
                                              tostring (param.elevation_frequency [3]) .. ":" ..
                                              tostring (param.elevation_frequency [4]) .. ":" ..
                                              tostring (param.elevation_frequency [5]) .. "]\n")
  file:write (" [RAIN_FREQUENCY:" .. tostring (param.rain_frequency [0]) .. ":" ..
                                         tostring (param.rain_frequency [1]) .. ":" ..
                                         tostring (param.rain_frequency [2]) .. ":" ..
                                         tostring (param.rain_frequency [3]) .. ":" ..
                                         tostring (param.rain_frequency [4]) .. ":" ..
                                         tostring (param.rain_frequency [5]) .. "]\n")
  file:write (" [DRAINAGE_FREQUENCY:" .. tostring (param.drainage_frequency [0]) .. ":" ..
                                             tostring (param.drainage_frequency [1]) .. ":" ..
                                             tostring (param.drainage_frequency [2]) .. ":" ..
                                             tostring (param.drainage_frequency [3]) .. ":" ..
                                             tostring (param.drainage_frequency [4]) .. ":" ..
                                             tostring (param.drainage_frequency [5]) .. "]\n")
  file:write (" [TEMPERATURE_FREQUENCY:" .. tostring (param.temperature_frequency [0]) .. ":" ..
                                                tostring (param.temperature_frequency [1]) .. ":" ..
                                                tostring (param.temperature_frequency [2]) .. ":" ..
                                                tostring (param.temperature_frequency [3]) .. ":" ..
                                                tostring (param.temperature_frequency [4]) .. ":" ..
                                                tostring (param.temperature_frequency [5]) .. "]\n")
  file:write (" [SAVAGERY_FREQUENCY:" .. tostring (param.savagery_frequency [0]) .. ":" ..
                                             tostring (param.savagery_frequency [1]) .. ":" ..
                                             tostring (param.savagery_frequency [2]) .. ":" ..
                                             tostring (param.savagery_frequency [3]) .. ":" ..
                                             tostring (param.savagery_frequency [4]) .. ":" ..
                                             tostring (param.savagery_frequency [5]) .. "]\n")
  file:write (" [VOLCANISM_FREQUENCY:" .. tostring (param.volcanism_frequency [0]) .. ":" ..
                                              tostring (param.volcanism_frequency [1]) .. ":" ..
                                              tostring (param.volcanism_frequency [2]) .. ":" ..
                                              tostring (param.volcanism_frequency [3]) .. ":" ..
                                              tostring (param.volcanism_frequency [4]) .. ":" ..
                                              tostring (param.volcanism_frequency [5]) .. "]\n")
  file:write (" [POLE:" .. pole_to_string (pole) .."]\n") -- pole_map [param.pole] .."]\n")
  file:write (" [MINERAL_SCARCITY:" .. tostring (param.mineral_scarcity) .. "]\n")
  file:write (" [MEGABEAST_CAP:" .. tostring (param.megabeast_cap) .. "]\n")
  file:write (" [SEMIMEGABEAST_CAP:" .. tostring (param.semimegabeast_cap) .. "]\n")
  file:write (" [TITAN_NUMBER:" .. tostring (param.titan_number) .. "]\n")
  file:write (" [TITAN_ATTACK_TRIGGER:" .. tostring (param.titan_attack_trigger [0]) .. ":" ..
                                               tostring (param.titan_attack_trigger [1]) .. ":" ..
                                               tostring (param.titan_attack_trigger [2]).. "]\n")
  file:write (" [DEMON_NUMBER:" .. tostring (param.demon_number) .. "]\n")
  file:write (" [NIGHT_TROLL_NUMBER:" .. tostring (param.night_troll_number) .. "]\n")
  file:write (" [BOGEYMAN_NUMBER:" .. tostring (param.bogeyman_number) .. "]\n")
  file:write (" [VAMPIRE_NUMBER:" .. tostring (param.vampire_number) .. "]\n")
  file:write (" [WEREBEAST_NUMBER:" .. tostring (param.werebeast_number) .. "]\n")
  file:write (" [SECRET_NUMBER:" .. tostring (param.secret_number) .. "]\n")
  file:write (" [REGIONAL_INTERACTION_NUMBER:".. tostring (param.regional_interaction_number).. "]\n")
  file:write (" [DISTURBANCE_INTERACTION_NUMBER:" .. tostring(param.disturbance_interaction_number) .. "]\n")
  file:write (" [EVIL_CLOUD_NUMBER:" .. tostring (param.evil_cloud_number) .. "]\n")
  file:write (" [EVIL_RAIN_NUMBER:" .. tostring (param.evil_rain_number) .. "]\n")
  local generate_divine_materials
  if not dfhack.pcall (function () generate_divine_materials = param.generate_divine_materials end) then -- Expected new name
    generate_divine_materials = param.anon_1 -- Will probably be renamed soon.
  end
  file:write (" [GENERATE_DIVINE_MATERIALS:" .. tostring (generate_divine_materials) .. "]\n")
  file:write (" [GOOD_SQ_COUNTS:" .. tostring (param.good_sq_counts_0) .. ":" ..
                                         tostring (param.good_sq_counts_1) .. ":" ..
                                         tostring (param.good_sq_counts_2) .. "]\n")
  file:write (" [EVIL_SQ_COUNTS:" .. tostring (param.evil_sq_counts_0) .. ":" ..
                                         tostring (param.evil_sq_counts_1) .. ":" ..
                                         tostring (param.evil_sq_counts_2) .. "]\n")
  file:write (" [PEAK_NUMBER_MIN:" .. tostring (param.peak_number_min) .. "]\n")
  file:write (" [PARTIAL_OCEAN_EDGE_MIN:" .. tostring (param.partial_ocean_edge_min) .. "]\n")
  file:write (" [COMPLETE_OCEAN_EDGE_MIN:" .. tostring (param.complete_ocean_edge_min) .. "]\n")
  file:write (" [VOLCANO_MIN:" .. tostring (param.volcano_min) .. "]\n")
  file:write (" [REGION_COUNTS:SWAMP:" .. tostring (param.region_counts [0] [df.worldgen_region_type.SWAMP]) .. ":" ..
                                              tostring (param.region_counts [1] [df.worldgen_region_type.SWAMP]) .. ":" ..
                                              tostring (param.region_counts [2] [df.worldgen_region_type.SWAMP]) .. "]\n")
  file:write (" [REGION_COUNTS:DESERT:" .. tostring (param.region_counts [0] [df.worldgen_region_type.DESERT]) .. ":" ..
                                               tostring (param.region_counts [1] [df.worldgen_region_type.DESERT]) .. ":" ..
                                               tostring (param.region_counts [2] [df.worldgen_region_type.DESERT]) .. "]\n")
  file:write (" [REGION_COUNTS:FOREST:" .. tostring (param.region_counts [0] [df.worldgen_region_type.FOREST]) .. ":" ..
                                               tostring (param.region_counts [1] [df.worldgen_region_type.FOREST]) .. ":" ..
                                               tostring (param.region_counts [2] [df.worldgen_region_type.FOREST]) .. "]\n")
  file:write (" [REGION_COUNTS:MOUNTAINS:" .. tostring (param.region_counts [0] [df.worldgen_region_type.MOUNTAINS]) .. ":" ..
                                                  tostring (param.region_counts [1] [df.worldgen_region_type.MOUNTAINS]) .. ":" ..
                                                  tostring (param.region_counts [2] [df.worldgen_region_type.MOUNTAINS]) .. "]\n")
  file:write (" [REGION_COUNTS:OCEAN:" .. tostring (param.region_counts [0] [df.worldgen_region_type.OCEAN]) .. ":" ..
                                              tostring (param.region_counts [1] [df.worldgen_region_type.OCEAN]) .. ":" ..
                                              tostring (param.region_counts [2] [df.worldgen_region_type.OCEAN]) .. "]\n")
  file:write (" [REGION_COUNTS:GLACIER:" .. tostring (param.region_counts [0] [df.worldgen_region_type.GLACIER]) .. ":" ..
                                                tostring (param.region_counts [1] [df.worldgen_region_type.GLACIER]) .. ":" ..
                                                tostring (param.region_counts [2] [df.worldgen_region_type.GLACIER]) .. "]\n")
  file:write (" [REGION_COUNTS:TUNDRA:" .. tostring (param.region_counts [0] [df.worldgen_region_type.TUNDRA]) .. ":" ..
                                               tostring (param.region_counts [1] [df.worldgen_region_type.TUNDRA]) .. ":" ..
                                               tostring (param.region_counts [2] [df.worldgen_region_type.TUNDRA]) .. "]\n")
  file:write (" [REGION_COUNTS:GRASSLAND:" .. tostring (param.region_counts [0] [df.worldgen_region_type.GRASSLAND]) .. ":" ..
                                                  tostring (param.region_counts [1] [df.worldgen_region_type.GRASSLAND]) .. ":" ..
                                                  tostring (param.region_counts [2] [df.worldgen_region_type.GRASSLAND]) .. "]\n")
  file:write (" [REGION_COUNTS:HILLS:" .. tostring (param.region_counts [0] [df.worldgen_region_type.HILLS]) .. ":" ..
                                              tostring (param.region_counts [1] [df.worldgen_region_type.HILLS]) .. ":" ..
                                              tostring (param.region_counts [2] [df.worldgen_region_type.HILLS]) .. "]\n")
  file:write (" [EROSION_CYCLE_COUNT:" .. tostring (param.erosion_cycle_count) .. "]\n")
  file:write (" [RIVER_MINS:" .. tostring (param.river_mins [0]) ..":" ..
                                     tostring (param.river_mins [1]) .. "]\n")
  file:write (" [PERIODICALLY_ERODE_EXTREMES:" .. tostring (param.periodically_erode_extremes) .. "]\n")
  file:write (" [OROGRAPHIC_PRECIPITATION:" .. tostring (param.orographic_precipitation) .. "]\n")
  file:write (" [SUBREGION_MAX:" .. tostring (param.subregion_max) .. "]\n")
  file:write (" [CAVERN_LAYER_COUNT:" .. tostring (param.cavern_layer_count) .. "]\n")
  file:write (" [CAVERN_LAYER_OPENNESS_MIN:" .. tostring (param.cavern_layer_openness_min) .. "]\n")
  file:write (" [CAVERN_LAYER_OPENNESS_MAX:" .. tostring (param.cavern_layer_openness_max) .. "]\n")
  file:write (" [CAVERN_LAYER_PASSAGE_DENSITY_MIN:" .. tostring (param.cavern_layer_passage_density_min) .. "]\n")
  file:write (" [CAVERN_LAYER_PASSAGE_DENSITY_MAX:" .. tostring (param.cavern_layer_passage_density_max) .. "]\n")
  file:write (" [CAVERN_LAYER_WATER_MIN:" .. tostring (param.cavern_layer_water_min) .. "]\n")
  file:write (" [CAVERN_LAYER_WATER_MAX:" .. tostring (param.cavern_layer_water_max) .. "]\n")
  file:write (" [HAVE_BOTTOM_LAYER_1:" .. tostring (boolean_to_int (param.have_bottom_layer_1)) .. "]\n")
  file:write (" [HAVE_BOTTOM_LAYER_2:" .. tostring (boolean_to_int (param.have_bottom_layer_2)) .. "]\n")
  file:write (" [LEVELS_ABOVE_GROUND:" .. tostring (param.levels_above_ground) .. "]\n")
  file:write (" [LEVELS_ABOVE_LAYER_1:" .. tostring (param.levels_above_layer_1) .. "]\n")
  file:write (" [LEVELS_ABOVE_LAYER_2:" .. tostring (param.levels_above_layer_2) .. "]\n")
  file:write (" [LEVELS_ABOVE_LAYER_3:" .. tostring (param.levels_above_layer_3) .. "]\n")
  file:write (" [LEVELS_ABOVE_LAYER_4:" .. tostring (param.levels_above_layer_4) .. "]\n")
  file:write (" [LEVELS_ABOVE_LAYER_5:" .. tostring (param.levels_above_layer_5) .. "]\n")
  file:write (" [LEVELS_AT_BOTTOM:" .. tostring (param.levels_at_bottom) .. "]\n")
  file:write (" [CAVE_MIN_SIZE:" .. tostring (param.cave_min_size) .. "]\n")
  file:write (" [CAVE_MAX_SIZE:" .. tostring (param.cave_max_size) .. "]\n")
  file:write (" [MOUNTAIN_CAVE_MIN:" .. tostring (param.mountain_cave_min) .. "]\n")
  file:write (" [NON_MOUNTAIN_CAVE_MIN:" .. tostring (param.non_mountain_cave_min) .. "]\n")
  file:write (" [ALL_CAVES_VISIBLE:" .. tostring (param.all_caves_visible) .. "]\n")
  file:write (" [SHOW_EMBARK_TUNNEL:" .. tostring (param.show_embark_tunnel) .. "]\n")
  file:write (" [TOTAL_CIV_NUMBER:" .. tostring (param.total_civ_number) .. "]\n")
  file:write (" [TOTAL_CIV_POPULATION:" .. tostring (param.total_civ_population) .. "]\n")
  file:write (" [SITE_CAP:" .. tostring (param.site_cap) .. "]\n")
  file:write (" [PLAYABLE_CIVILIZATION_REQUIRED:" .. tostring (param.playable_civilization_required) .. "]\n")
  file:write (" [ELEVATION_RANGES:" .. tostring (param.elevation_ranges_0) .. ":" ..
                                           tostring (param.elevation_ranges_1) .. ":" ..
                                           tostring (param.elevation_ranges_2) .. "]\n")
  file:write (" [RAIN_RANGES:" .. tostring (param.rain_ranges_0) .. ":" ..
                                      tostring (param.rain_ranges_1) .. ":" ..
                                      tostring (param.rain_ranges_2) .. "]\n")
  file:write (" [DRAINAGE_RANGES:" .. tostring (param.drainage_ranges_0) .. ":" ..
                                          tostring (param.drainage_ranges_1) .. ":" ..
                                          tostring (param.drainage_ranges_2) .. "]\n")
  file:write (" [SAVAGERY_RANGES:" .. tostring (param.savagery_ranges_0) .. ":" ..
                                          tostring (param.savagery_ranges_1) .. ":" ..
                                          tostring (param.savagery_ranges_2) .. "]\n")
  file:write (" [VOLCANISM_RANGES:" .. tostring (param.volcanism_ranges_0) .. ":" ..
                                           tostring (param.volcanism_ranges_1) .. ":" ..
                                           tostring (param.volcanism_ranges_2) .. "]\n")

  file:flush()
  file:close()
end

worlgenparms ()

(0038086)
Loci (manager)
2018-03-30 10:04
edited on: 2018-03-30 10:06

I'm 10/10 creating pocket worlds with short histories and no crashes, so more detail is necessary to reproduce. You can view the seeds selected for a particular world in gamelog.txt:

Generating world using parameter set CREATE WORLD NOW = 1222233
 Seed: ouiKGAG8MsAiiuysIY8u
 History Seed: iKciwIY4uWwMAEwQYoCM
 Name Seed: SUmyw4C0iEQSIggIegga
 Creature Seed: 0Q24c8a2gqgMIkYY8M2C

Combined with the world options you selected, that should allow you to re-generate the same world and see if it crashes repeatably. Even if it doesn't, posting the seeds/options which crashed would allow other people to attempt to reproduce the problem.

(0038713)
TomiTapio2 (reporter)
2018-08-11 04:33
edited on: 2018-08-11 07:57

I have uploaded modded raws and seed, which cause worldgen crash.
http://dffd.bay12games.com/file.php?id=13946 [^]

Found my raws problem: hyena male and female castes were declared TWICE. But how does that crash worldgen finalizing sites...


- Issue History
Date Modified Username Field Change
2018-03-14 13:25 squamouss New Issue
2018-03-15 10:53 Loci Note Added: 0037938
2018-03-15 10:53 Loci Assigned To => Loci
2018-03-15 10:53 Loci Status new => needs feedback
2018-03-28 19:14 squamouss Note Added: 0038059
2018-03-28 19:14 squamouss Status needs feedback => assigned
2018-03-29 01:16 Shonai_Dweller Note Added: 0038066
2018-03-29 03:17 PatrikLundell Note Added: 0038068
2018-03-29 03:20 Shonai_Dweller Note Added: 0038069
2018-03-29 04:04 PatrikLundell Note Added: 0038071
2018-03-29 04:09 PatrikLundell Note Edited: 0038071 View Revisions
2018-03-30 10:04 Loci Note Added: 0038086
2018-03-30 10:04 Loci Status assigned => needs feedback
2018-03-30 10:06 Loci Note Edited: 0038086 View Revisions
2018-08-11 04:33 TomiTapio2 Note Added: 0038713
2018-08-11 07:57 TomiTapio2 Note Edited: 0038713 View Revisions


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker