Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0000070Dwarf FortressGeneralpublic2010-04-01 19:032010-06-09 06:45
Toady One 
lowminorhave not tried
Dell Latitude D830Windows7
0000070: Negative distance for building materials
I built a wall with a fairly new fortress (10 Dwarves) and I have three building materials (siltstone, kaolinite, and olivine) that are negative large (-2500 ~ -5000) distances away. They are also displayed in quantities > 99 (271, 901, 930, etc)
I don't know, but it now happens when I want to build a wall.
Very mountainy terrain. brook in area, large underground cavern with underground lake and lava pipe. Early Autumn in the first year. One wave of 3 migrants and 2 animals and no trade yet.
No tags attached.
has duplicate 0000134closed Footkerchief Negative count on available rocks 
has duplicate 0000226closed Footkerchief Neg distance values on materials 
has duplicate 0000272closed Footkerchief when building things underground after pathing issues over ramps the materials got negitive distances 
has duplicate 0000396closed Footkerchief Constructing a floor/wall/etc. at this place causes a Dist bug of -25000-ish. 
has duplicate 0000513closed Footkerchief When selecting building material, rarely there are positions with large negative distance. 
has duplicate 0000914closed Footkerchief Odd item counts after discovering a new underground section. 
has duplicate 0001073closed Footkerchief distance bug 
child of 0000018closed Toady One Pathfinding fails to update after map changes 
Issue History
2010-04-01 19:03ArkiveNew Issue
2010-04-02 11:12aimozgNote Added: 0000241
2010-04-02 11:24aimozgIssue Monitored: aimozg
2010-04-02 18:45HadokenNote Added: 0000357
2010-04-03 08:49FootkerchiefRelationship addedchild of 0000018
2010-04-03 09:45FootkerchiefRelationship addedhas duplicate 0000134
2010-04-03 11:24FootkerchiefRelationship addedhas duplicate 0000226
2010-04-03 11:24FootkerchiefRelationship addedhas duplicate 0000272
2010-04-03 19:07Logical2uNote Added: 0000744
2010-04-04 10:12FootkerchiefRelationship addedhas duplicate 0000396
2010-04-05 13:36FootkerchiefRelationship addedhas duplicate 0000513
2010-04-05 13:36FootkerchiefSummary-distance for building materials => Negative distance for building materials
2010-04-05 19:27tigger89Note Added: 0001301
2010-04-05 19:28tigger89Note Edited: 0001301bug_revision_view_page.php?bugnote_id=0001301#r411
2010-04-05 19:38shadow_slicerNote Added: 0001305
2010-04-06 01:14ShadowlordNote Added: 0001378
2010-04-06 01:15ShadowlordNote Edited: 0001378bug_revision_view_page.php?bugnote_id=0001378#r425
2010-04-06 13:32FootkerchiefSticky IssueNo => Yes
2010-04-06 14:01ShadowlordIssue Monitored: Shadowlord
2010-04-08 07:15evisceratorNote Added: 0002018
2010-04-10 00:39FootkerchiefRelationship addedhas duplicate 0000914
2010-04-10 06:43bloodystumpIssue Monitored: bloodystump
2010-04-11 04:35Toady OneNote Added: 0002783
2010-04-11 04:35Toady OneAssigned To => Toady One
2010-04-11 04:35Toady OneStatusnew => acknowledged
2010-04-11 05:10GauphastusNote Added: 0002785
2010-04-11 06:06Logical2uNote Added: 0002789
2010-04-11 06:06Logical2uIssue Monitored: Logical2u
2010-04-11 09:25evisceratorNote Added: 0002815
2010-04-11 10:36DoctorZuberNote Added: 0002831
2010-04-11 15:03MaDeR LevapIssue Monitored: MaDeR Levap
2010-04-11 16:22VDOgamezNote Added: 0002900
2010-04-11 17:22Toady OneNote Added: 0002908
2010-04-11 17:26Toady OneNote Edited: 0002908bug_revision_view_page.php?bugnote_id=0002908#r937
2010-04-11 17:29Logical2uNote Added: 0002912
2010-04-11 18:06Toady OneNote Added: 0002923
2010-04-11 18:17Toady OneNote Added: 0002926
2010-04-11 18:17Toady OneStatusacknowledged => resolved
2010-04-11 18:17Toady OneFixed in Version => 0.31.03
2010-04-11 18:17Toady OneResolutionopen => fixed
2010-04-11 19:41Logical2uIssue End Monitor: Logical2u
2010-04-11 21:55bloodystumpIssue End Monitor: bloodystump
2010-04-11 23:54ShadowlordIssue End Monitor: Shadowlord
2010-04-12 10:37MaDeR LevapIssue End Monitor: MaDeR Levap
2010-04-13 01:40FootkerchiefRelationship addedhas duplicate 0001073
2010-06-02 13:07FootkerchiefSticky IssueYes => No
2010-06-09 06:45Toady OneStatusresolved => closed

2010-04-02 11:12   
I have inaccessible stone marked with negative distance when building wall
2010-04-02 18:45   
This is also happening to me. New fortress (Mid-summer first year), -16330 distance on gabbro, olivine, and kimberlite. It seems to happen no matter what I'm building (as long as it is made from stone) or where I build it. The numbers are also wrong: 500+ of each rock when I've only mined enough to show 300? stones in Stocks.

Hitting 'x' to expand and trying to build with one of those specific stones yields "Could not find path".
2010-04-03 19:07   
I've managed to discover this bug, I think it's easy to replicate too.

Floor one - DDDH
Floor two - DDD
(D - dig, H, channel)
The dwarf that ends up on the bottom can't path back out, and any materials not accessible from Floor 2 will be marked with negative numbers. Likewise, on floor one, any materials on Floor 2 will be marked with negative numbers.
2010-04-05 19:27   
(edited on: 2010-04-05 19:28)
I had this bug. I'd had some pathing issues while building a cistern in some rock salt. After I unstuck my miners, I went to designate a bridge on the ground level, and it told me I had 114 rock salt at something like -22000 distance away. When I canceled the bridge and tried again later(after finding and counting the rock salt) it accurately reported that I had 7 rock salt at 92 distance away. It looks as if dwarves can path properly in the cistern now, however, but as the bug fixed itself I can't investigate any more.

None of the other stone located in the cistern is affected by this bug.

2010-04-05 19:38   
I also experienced this bug when I used a floodgate to block off an area with some stone. When I went to build something there was a negative distance for a type of rock. I don't remember the path cost, but there were exactly the number of rocks in the inaccessible area as it listed.
2010-04-06 01:14   
(edited on: 2010-04-06 01:15)
I had this in a very simple situation: I dug a channel at the end of a 6-wide hallway, and DF created ramps leading down there. A dwarf went down into the channel, and I had him dig out an area under the hallway connected to the channelled out area with the up ramps. Then he tried to path to somewhere on the upper level and went "ACK I CAN'T GET THERE" as if he didn't know how to go up the ramps. He also showed negative distances to the rocks in the same area that he was in, and when I tried to dig an up stairway, it kept getting cancelled. Saving and reloading fixed the distances to the rocks in the same area that he was in, but when I dismantled the ramps, and then had him start building new ones, the distances broke again after he built a few of the ramps (before he finished all of them).

I removing the ramps again, and was then able to get a dwarf on an upper level to dig stairs to that level, and the pathfinding stopped erroring. I then dug a bunch more multi-level stairs without any problems and concluded that the problem (at least the specific one I saw) must be specifically with ramps.

2010-04-08 07:15   
I've had this happen twice in the same game. The first was channeling down on channeled ramps, which resolved by tunneling out of the bottom, and stairs up.

The second was as I was building a ramp road downward, I struck the caves earlier than expected (-10 z levels from surface). I was using 3 tile wide ramps, only one successfully completed on a wall at the edge of the cave roof. I'd already designated more ramps previously, some of which seemed to be dug out with no dwarf able to reach the area. Anyway, massive pathway error, tried to fix by save/load. That works until you do anything in the area of the buggy ramp. Tried to make a tunnel and stair connecting cave ceiling to the upper level with the road, and lost the ramp. Issue may be unresolvable on this fort.
Toady One   
2010-04-11 04:35   
I'm unable to get this to show up. I've trapped miners by digging out the ramp wall in the DDDH/DDD way described above (digging down below removes the only ramp wall), but the miner can only build with the rocks on his own level and they all report the correct distances. I'll need to get this to show up somehow before I can fix it.
2010-04-11 05:10   
I remember sending a report into Toady about this well over a year ago, but I had already reloaded the game to see if I could fix it (and yeah, it fixed it).
I think he said to me that he's been looking to squash this one for a long time. :P

It's definitely hard to reproduce as I've only ever seen it once in all my hours of playing the game.
http://img293.imageshack.us/img293/5277/dwarffortresswhatthe.png [^]

Looks like it's sticking out a lot more though with the current release. The only way to get it might be to just alt tab if you see it and like.. get Toady to send you some debug tools and relay him the info?
I don't know. All I know is that it's terribly hard to reproduce, and you can't seem to send saves.
2010-04-11 06:06   
Alright Toady, I've got a save that the DDDH/DDD method works on. It's in .31.01 RAWS but the issue is consistent between .31.02 and .31.01

The method doesn't actually work on all maps, which surprised me.

Steps: Go up to the Z level above the depot, designate a path into the cliffside with the DDDH/DDD method, try to build in the recently dug lower level with the trapped miner.

Should display a bunch of negative distances.

(This is the same map where I got the construction idea from, actually)

Available from the DFFD at http://dffd.wimbli.com/file.php?id=2059 [^]
2010-04-11 09:25   
Try this:

Channel out a 2X2 square on the surface. Next, have the ramps removed. This will leave a miner at the bottom. Order a up stair on one of the pit walls, and a down stair on the surface. The up stair will be dug out, but the down stair on the surface never will, even by other miners. Instead, you'll get a path error message and have the down stair canceled. Seems to be an issue with squares adjacent to ramps to me.

You won't ever be able to dig out the down stair.
2010-04-11 10:36   
that sounds like a short version of the steps from 0000235 which is not so much a pathfinding problem as a labor conflict with the stuck dwarves and the unstuck dwarves canceling tasks on each other because they're picking an inaccessible task in favor of the one right in front of them.
2010-04-11 16:22   
I had that happen to me as well. I selected to use the material anyway, and the distance went back to a reasonable 53. I had no interesting setups either, just one room in my noble housing where I mined out a few extra squares to get some gems. I tried to fill it in with a wall. Could it have something to do with the fact that dwarves tend to build from the left side? Picture: http://img641.imageshack.us/img641/2752/dfwtf.png [^]
Toady One   
2010-04-11 17:22   
(edited on: 2010-04-11 17:26)
Logical2u, okay, that did it. Cool. Hopefully I can work that out now, and hopefully it'll have something to do with all the other pathing bugs, although that'll depend on it being a component error.

edit: it reproduced in debug mode, and it appears it is a component error -- every floor tile around it is said to be in component 1, no matter where it is. This is good... might fix everything, once I fix it.

eviscerator, which wall did you dig the stair in? I did the north wall on the left side and the miner got out.

2010-04-11 17:29   
Since it appears to be save/map specific you might not be able to find anything really juicy, Toady, but glad to hear that it's not just all in my head/computer. Good luck!
Toady One   
2010-04-11 18:06   
It appears that it is assigning a different connected component to every liquid floor/flow tile -- this came from a liquid placement short-cut I took to speed up local map generation not respecting pathing flags properly. Once there are that many connected components (~45000 on that map) it blows out a short which is normally very happy as a short, and the quick connectivity updates get confused, and these mostly come up during ramp operations. Also, the blow-out wraps, so it would only get confused on about half the maps, depending on how many magma flows and water layers you have. My propensity for playing 2x2s to expedite testing means I wouldn't normally see it -- and even some 4x4s would be immune, though it would happen on most of them (0009762:0036000 possible magma flow squares -- many of them are walls so it could get under the 32000 threshold, but with swamps and a water layer you can get back up). This save is exactly in the sweet-spot for behaving horribly.

Theoretically this will be fixed for next time. I just need to compile and test a bit more, and make sure old saves are patched properly on load. I'm also going to add an error log message for this kind of blowout.
Toady One   
2010-04-11 18:17   
Okay, that's all done, and the save works now.