Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Crashes on saving with custom tree  (Read 622 times)

CalmBit

  • Escaped Lunatic
    • View Profile
Crashes on saving with custom tree
« on: December 04, 2017, 05:09:43 pm »

Hello all,

Tried sticking my toes into modding again with a simple Ctrl+C/V modification of trees, to play with the tokens and see what affected what. I took the apple tree raws, modified them a bit, created a new world, saw most everything working as expected, and then tried to save. It got most of the way though saving, but suddenly the window disappeared, but the music continued playing. Running the game from the terminal produces no unexpected output. Is there anything that sticks out in these modifications that would cause a crash?

Code: [Select]
plant_modded_trees

[OBJECT:PLANT]

[PLANT:NIGHTWOOD]
[NAME:nightwood plant][NAME_PLURAL:nightwood plants][ADJ:nightwood]
[USE_MATERIAL_TEMPLATE:STRUCTURAL:STRUCTURAL_PLANT_TEMPLATE]
[DISPLAY_COLOR:5:0:0]
[BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]
[USE_MATERIAL_TEMPLATE:WOOD:WOOD_TEMPLATE]
[STATE_NAME:ALL_SOLID:nightwood]
[STATE_ADJ:ALL_SOLID:nightwood]
[PREFIX:NONE]
[SOLID_DENSITY:200]
[DISPLAY_COLOR:5:0:0]
[STATE_COLOR:ALL_SOLID:PURPLE]
[USE_MATERIAL_TEMPLATE:DRINK:PLANT_ALCOHOL_TEMPLATE]
[STATE_NAME_ADJ:ALL_SOLID:frozen nightfruit wine]
[STATE_NAME_ADJ:LIQUID:nightfruit wine]
[STATE_NAME_ADJ:GAS:boiling nightfruit wine]
[MATERIAL_VALUE:2]
[DISPLAY_COLOR:5:0:1]
[EDIBLE_RAW]
[EDIBLE_COOKED]
[PREFIX:NONE]
[DRINK:LOCAL_PLANT_MAT:DRINK]
[USE_MATERIAL_TEMPLATE:LEAF:LEAF_TEMPLATE]
[STATE_COLOR:ALL:TEAL]
[DISPLAY_COLOR:3:0:0]
[USE_MATERIAL_TEMPLATE:FLOWER:FLOWER_TEMPLATE]
[STATE_COLOR:ALL:MAROON]
[DISPLAY_COLOR:4:0:0]
[USE_MATERIAL_TEMPLATE:FRUIT:FRUIT_TEMPLATE]
[STATE_COLOR:ALL:FUCHSIA]
[DISPLAY_COLOR:5:0:1]
[EDIBLE_VERMIN]
[EDIBLE_RAW]
[EDIBLE_COOKED]
[STOCKPILE_PLANT_GROWTH]
[MATERIAL_REACTION_PRODUCT:DRINK_MAT:LOCAL_PLANT_MAT:DRINK]
[MATERIAL_REACTION_PRODUCT:SEED_MAT:LOCAL_PLANT_MAT:SEED]
[USE_MATERIAL_TEMPLATE:SEED:SEED_TEMPLATE]
[MATERIAL_VALUE:1]
[EDIBLE_VERMIN]
[SEED:nightwood growth:nightwood growths:0:0:1:LOCAL_PLANT_MAT:SEED]
[TREE:LOCAL_PLANT_MAT:WOOD][TREE_TILE:216]
[SAPLING_TILE:232]
[DEAD_SAPLING_TILE:227]
[SAPLING_COLOR:5:0:0]
[TRUNK_PERIOD:10]
[HEAVY_BRANCH_DENSITY:5]
[BRANCH_DENSITY:15]
[MAX_TRUNK_HEIGHT:8]
[HEAVY_BRANCH_RADIUS:4]
[BRANCH_RADIUS:6]
[TRUNK_BRANCHING:4]
[MAX_TRUNK_DIAMETER:2]
[TRUNK_WIDTH_PERIOD:200]
[ROOT_DENSITY:4]
[ROOT_RADIUS:4]
[STANDARD_TILE_NAMES]
[PREFSTRING:indomitable growth]
[PREFSTRING:garish colours]
[DRY]
[BIOME:ANY_LAND]
[SAPLING]
[GROWTH:LEAVES]
[GROWTH_NAME:nightwood leaf:nightwood leaves]
[GROWTH_ITEM:PLANT_GROWTH:NONE:LOCAL_PLANT_MAT:LEAF]
[GROWTH_DENSITY:1000]
[GROWTH_HOST_TILE:BRANCHES_AND_TWIGS]
[GROWTH_HOST_TILE:SAPLING]
[GROWTH_TIMING:0:300000]
[GROWTH_PRINT:0:232:3:0:0:0:300000:1]
[GROWTH_DROPS_OFF]
[GROWTH:FLOWERS]
[GROWTH_NAME:nightwood spot:STP]
[GROWTH_ITEM:PLANT_GROWTH:NONE:LOCAL_PLANT_MAT:FLOWER]
[GROWTH_DENSITY:1000]
[GROWTH_HOST_TILE:BRANCHES_AND_TWIGS]
[GROWTH_TIMING:60000:119999]
[GROWTH_PRINT:167:167:6:0:1:60000:119999:2]
[GROWTH:FRUIT]
[GROWTH_NAME:nightfruit:STP]
[GROWTH_ITEM:PLANT_GROWTH:NONE:LOCAL_PLANT_MAT:FRUIT]
[GROWTH_DENSITY:1000]
[GROWTH_HOST_TILE:BRANCHES_AND_TWIGS]
[GROWTH_TIMING:120000:200000]
[GROWTH_DROPS_OFF_NO_CLOUD]
[GROWTH_PRINT:168:168:5:0:1:120000:200000:3]
[GROWTH_HAS_SEED]

EDIT: The crash seemed to go away after I did an unrelated raid in the fresh world. These crashes still do not happen without the aforementioned tree.
« Last Edit: December 04, 2017, 08:31:13 pm by CalmBit »
Logged

DoomOnion

  • Bay Watcher
    • View Profile
Re: Crashes on saving with custom tree
« Reply #1 on: December 04, 2017, 07:57:39 pm »

Do you have an errorlog?
Logged

CalmBit

  • Escaped Lunatic
    • View Profile
Re: Crashes on saving with custom tree
« Reply #2 on: December 04, 2017, 07:59:43 pm »

The errorlog is empty, unfortunately.
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Crashes on saving with custom tree
« Reply #3 on: December 04, 2017, 08:55:35 pm »

could you be saving with a caravan on the map?

could be a unrelated bug causing the crash
Logged

CalmBit

  • Escaped Lunatic
    • View Profile
Re: Crashes on saving with custom tree
« Reply #4 on: December 04, 2017, 08:57:45 pm »

It's absolutely new worlds which seem to crash, so I can't imagine it's related to caravans. I tested with the previous version, I get this crash there too :\

EDIT: This time I got a crash on embark. Interesting - still no references in errorlog, though.

EDIT 2: It seems after one saving cycle, the crash doesn't happen. The crash seems to happen on Cleaning game objects, so the save stays intact. I'm extremely confused - how did I end up with such a heisencrash?

EDIT 3: Aaaaaand it crashes on start in adventure mode sometimes. I repeat - how cursed are my trees...
« Last Edit: December 04, 2017, 09:43:46 pm by CalmBit »
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Crashes on saving with custom tree
« Reply #5 on: December 04, 2017, 10:35:47 pm »

try 32 bit and 64 bit DF
Logged

CalmBit

  • Escaped Lunatic
    • View Profile
Re: Crashes on saving with custom tree
« Reply #6 on: December 05, 2017, 03:36:08 am »

Confirmed to still crash w/ both 32 and 64-bit dwarf fortress.

EDIT: I did however, get some stderr output from running it in the terminal:

Code: [Select]
*** Error in `./libs/Dwarf_Fortress': corrupted size vs. prev_size: 0xc971d718 ***
./df: line 6:  2255 Aborted                 (core dumped) ./libs/Dwarf_Fortress

Seems vaguely bug-like.

EDIT 2: Did some tweaking based on some suspected (meaningful) tweaks to the base raws, and something in the difference between the following lines seems to be causing the issue:

Apple Tree:
Code: [Select]
[TRUNK_PERIOD:10]
[HEAVY_BRANCH_DENSITY:25]
[BRANCH_DENSITY:50]
[MAX_TRUNK_HEIGHT:3]
[HEAVY_BRANCH_RADIUS:1]
[BRANCH_RADIUS:2]
[TRUNK_BRANCHING:2]
[MAX_TRUNK_DIAMETER:1]
[TRUNK_WIDTH_PERIOD:200]
[ROOT_DENSITY:5]
[ROOT_RADIUS:3]

Nightwood Tree:
Code: [Select]
        [TRUNK_PERIOD:10]
[HEAVY_BRANCH_DENSITY:5]
[BRANCH_DENSITY:15]
[MAX_TRUNK_HEIGHT:8]
[HEAVY_BRANCH_RADIUS:4]
[BRANCH_RADIUS:6]
[TRUNK_BRANCHING:4]
[MAX_TRUNK_DIAMETER:2]
[TRUNK_WIDTH_PERIOD:200]
[ROOT_DENSITY:4]
[ROOT_RADIUS:4]

« Last Edit: December 05, 2017, 03:47:48 am by CalmBit »
Logged

CalmBit

  • Escaped Lunatic
    • View Profile
Re: Crashes on saving with custom tree
« Reply #7 on: December 05, 2017, 04:01:36 am »

Alright, hopefully this closes all of this:

After a lot of testing and world generation, it would seem that the following two tags do not like to be the values I set them at...

Code: [Select]
[HEAVY_BRANCH_RADIUS:4]
[BRANCH_RADIUS:6]

I'm probably going to file a bug report with what I know. Thank you all!
Logged