View Issue Details

IDProjectCategoryView StatusLast Update
0012894Dwarf FortressPathfindingpublic2024-06-14 17:09
ReporterElem Assigned To 
Status newResolutionopen 
PlatformpcOSwindowsOS Version10
Summary0012894: 50.13 Pathing breaks after some times in the fortress, making some jobs or buildings inaccessible, blocking any forwarding
Description50.11 50.13 51.01
Global Year 9 (Year 7 for the fortress)
10x10 embark (happens with 12x12 and 16x16)
Pathing breaks randomly after few minutes since around year 8, and refreshes after a Save/reload to "crash" again after few minutes.
No job cancellation, just stuck tiles blocking every job in them (hauling, passing, mining, building).
When this pathing problem happens, every dwarf having something to do in those tiles become stuck (no job) or just do other tasks.
Pathability group becomes 1 around built structures.
Pathability becomes 328XX incrementaly on each new freshly dug tile.
Animals become stuck too
Sometimes dwarfs get over fortifications/walls and fall in moat just to path to their job location
Pathing seems to crash deifferent ways sometimes: dwarfs consider their NEAREST job to be as nearest real coordinates and not as path length (miners and stonecutters for exemple go from floor 30 to 31 to dig/smooth a square and travel back to smooth/dig square near their real location.
Steps To ReproduceBuild, dig, wait and things go wrong as time passes.
Don't know how to reproduce precisely.
Happens with every saves i try to make.
Additional InformationAlmost the same as Gorge with report N°0012665

Happens with every save i do after some times.
Save Used most recently:

10x10, 12x12, 14x14 and 16x16 embark. Same
Worldgen depth between layers, 100 between layers, 30 between layers and 5 between layers. Same
Embark on world with aquifers, no aquifers, heavy aquifers, untamed wilds, wilderness, calm. Same
Worldgen with 3x more megabeasts, demons, caves etc. Same
Worldgen with mineral scarcity 100, 1000, 2000, 2500. Same
Population limit 10, 20, 30, 50, no limit . Same
One can see on my save : i usually put some markers like unreachable dig jobs just to remember the size of my fortress (and tried not to put these). same

Access Barony, refuse barony. Same
version 50.11, 50.13, 51.01. same

carefully : No stockpile or "place" on a staircase tile
Tags50.11, 50.13, 51.01, build, job, number, pathing



2024-06-13 07:53

reporter   ~0042249

Locking and unlocking a door in the main path re-initiates the pathing, getting it working again.
Then pathing bugs anew when trying to build things.
Blocked buildings don't unblock when reload save


2024-06-13 08:53

reporter   ~0042250

Last edited: 2024-06-13 08:59

Carefully tracking the pathing number, every action in the main pathing group seems to make it go 1 number above, and it seems that the pathing group can't go above something like 32999.

As soon as it reaches this number, the last pathing becomes group 1 and can't reach other pathing groups, even if open just near them.

So, counting every trunk in the map (lot of trees... lot of mushrooms in caves... damn...unreachable solo pathing group 1x1...)
Counting every closed cavern/grotto/cave/ know what i mean
Counting every sparse floating rock on magma, etc etc,
We, on a 10x10 or 16x16 heavily forested map, get to a maximum of 32999 pathing groups very very quickly.

THIS IS A TEST, i don't really know if it is as is but on my observations that's it.

Edit: 32768 is main, then becomes 32769 and bug. will try with close/open door and refresh that
Edit 2: closing a door, reopening it and doing an action on digging/building in path group makes it become number 32141


2024-06-13 09:14

reporter   ~0042251

Ok i think i figured why this happens.
32768 becomes the last pathing group.
32769 and nexts become unreachable by anyone or anything.
Buildings made after crash number become pathing group 1
Dig squares made after crash number become incrementaly unreachable pathing groups (32769, 32670, 32771, etc etc)

So, my take on it is that reducing the number of trees in the embark can make it longer to happen.
Reducing the Embark dimension makes it longer to happen, because of the number of caves, trees, mushrooms, and so on.

Thanks DFhack for pathing informations, then we'll see next patch if something comes out for this misbehavior


2024-06-13 11:21

reporter   ~0042252

"Above pathing group 32768 natural places" like trees or rocks underground in "16x16 forest embarks" has constant collapses on the west edge of the map, where last places are created i guess.
Trees have sort of clay collapsing if they are counted above 32768 "something collapsed above the surface" and rocks underground do as "a section of the cavern collapsed" with some soil involved too.
But if there are natural collapses like those , main pathing group number reloads his place in all pathing groups, making it never having any bug like mentionned in the exposed bug above.


2024-06-14 09:35

reporter   ~0042253

The map block "levelmap" field (known as "walkable" in DFHack) is a signed 16-bit value, so it's not surprising that things would go wrong if there were somehow more than 32,767 mutually inaccessible "pathability" regions.

Though exactly how you'd get that many separate regions is another question - maybe tree branches are to blame?


2024-06-14 10:24

reporter   ~0042255

Last edited: 2024-06-14 17:09

A 10x10 map makes so that in year 7-8, every possible tree has grown and there is a LOT of tree.
Tree branches are 1-to-6-tiles "separated-from-the-rest" walkable paths, so, if at the start there are a very small amount of trees,
after even 6 years the main pathability group jumps from 1 to 25000 (tried again on a new save earlier that day in a "sparse trees" 10x10 environment).

The real problem is that everything you build refreshes the Pathability Group from the MAIN (let's call the base surface where the 3x3 caravan is stranded like that, and all the grassland accessible by the way)
This makes that, at the start, the MAIN is the first pathability group, then, from down right to up left, numbers go up.

After building something in the MAIN, becomes the LAST of every pathability groups, including tree branches and so on.

This refresh with buildings makes so that the incremental number of the MAIN forcibly becomes buggy after some time, just because of these trees growing.

Like in the notes before, a 16x16 forest land with more than 32768 natural Pathability groups becomes buggy too but building in it never bugs because of the constant collapses of the pathgroups in the left edge of the map (collapses destroy more than 1 pathability group each time).

Add Note


Issue History

Date Modified Username Field Change
2024-06-13 05:34 Elem New Issue
2024-06-13 05:34 Elem Tag Attached: 50.11
2024-06-13 05:34 Elem Tag Attached: 50.13
2024-06-13 05:34 Elem Tag Attached: 51.01
2024-06-13 05:34 Elem Tag Attached: build
2024-06-13 05:37 Elem Tag Attached: job
2024-06-13 07:53 Elem Note Added: 0042249
2024-06-13 08:53 Elem Note Added: 0042250
2024-06-13 08:54 Elem Note Edited: 0042250
2024-06-13 08:57 Elem Note Edited: 0042250
2024-06-13 08:59 Elem Note Edited: 0042250
2024-06-13 09:14 Elem Note Added: 0042251
2024-06-13 09:42 Elem Tag Attached: pathing
2024-06-13 09:42 Elem Tag Attached: number
2024-06-13 11:21 Elem Note Added: 0042252
2024-06-14 09:35 Quietust Note Added: 0042253
2024-06-14 10:24 Elem Note Added: 0042255
2024-06-14 17:09 Elem Note Edited: 0042255