View Issue Details

IDProjectCategoryView StatusLast Update
0005994Dwarf FortressDwarf Mode -- Jobs, Building Construction and Destructionpublic2014-08-11 18:12
Reportermillman Assigned ToToady One  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version0.34.11 
Fixed in Version0.40.04 
Summary0005994: Destroying a construction teleports nearby items
DescriptionDestroying a wall empties the wood stockpile.

For example, I'm trying to destroy this wall:
http://i.imgur.com/w3clU.png

Notice that It uses only 4 wood. When is destroyed, some wood from my wood stockpil is autoteleported to the destroyed zone. Now there are 10 woods in the destroyed area instead of only four.
http://i.imgur.com/LnDZc.png
Steps To ReproducePlace a wood stock pile.
Build a wooden wall.
Destroy the wall.
Additional InformationI don't know if this happens only outside.
Tagsbinary patch, deconstruct, teleport

Relationships

related to 0006970 resolvedToady One Strange mood items are teleported into the workshop 
has duplicate 0006005 resolvedLogical2u dertroying stone wall teleports items from stockpile 
has duplicate 0006046 resolveduser6 Items teleport ontop of a restrain after removing a wall below it. 
has duplicate 0006065 resolveduser1294 Deconstructing construction can teleport items nearby 
has duplicate 0006095 resolveduser1294 Deconstruction of floor over lava pit causes black hole. 
has duplicate 0006137 resolvedLogical2u removing constructed floor bungles nearby stockpiles 
has duplicate 0006182 resolveduser1294 Wall deconstruction causes stockpile teleportation 
has duplicate 0006223 resolveduser1294 Spontanious item compaction. 
has duplicate 0006266 resolveduser11 Deconstructed constructions creating more materials than they were constructed out of. 
has duplicate 0006313 resolveduser1294 Removing any floor bordering a stockpile causes stockpile to empty. 
has duplicate 0006366 resolveduser1294 Deconstructed wall materials vanishing 
has duplicate 0006502 resolveduser1294 Items instantly teleporting when blocking wall deconstructed 
has duplicate 0006599 resolveduser1294 Removing a construciton (in this case a wall) causes all items, including stones, to be teleported to an adjacent tile 
has duplicate 0007147 resolveduser11 Stockpiled food teleporting 
has duplicate 0007320 resolveduser6 Removing a construction causes all nearby items to teleport to the deconstructor 
has duplicate 0007350 resolveduser6 Metal ore vanished from stockpile 
has duplicate 0007383 resolveduser6 teleporting items to deconstructing building 

Activities

Rafal99

2012-06-07 04:24

reporter   ~0022883

Last edited: 2012-06-07 04:26

Do you have any utilities like DFHack plugins enabled that could cause this?

Also please upload a save which demonstrates this bug to DFFD:
http://dffd.wimbli.com/

millman

2012-06-07 04:30

reporter   ~0022884

I don't use any plugin or tool, but DwarfTherapist.
I have not dumping zone, by the way.

How could I demonstrates this bug? It needs a "before" and an "after". How could I save two times?

Snaake

2012-06-07 04:34

reporter   ~0022885

Last edited: 2012-06-07 04:39

Probably the same issue, so not making a separate post.

Pretty much the same, except for me it happens at least with walls and floor (so maybe all constructions?), and teleports the contents of my nearby 1-square garbage dump there when deconstruction finishes. A lot more than 6 wood, loads of stone, some skeletons, body parts etc. This was also outside.

Using Phoebus' tileset and some modified init settings, no other mods to the game.

Uploaded the save folder to DFFD: http://dffd.wimbli.com/file.php?id=6443

The game should load up on the right level (top, outside). There are 3 points marked: a square to where it teleported before, the garbage dump, and a floor tile being deconstructed.


Edit: It actually teleported both the contents of the dump, and the previously teleported stuff (in the save the dwarves are still busy hauling the stuff back to the dump, from the previous teleport).

Also, the teleport with the deconstructed floor actually happens to where the deconstructor is standing, not to the deconstructed tile itself.

Edit2: I just realized that it must have also emptied the refuse stockpile the first time it happened. I was wondering why it was empty, only made the connection now.

millman

2012-06-07 04:38

reporter   ~0022886

Uploaded my save folder too: http://dffd.wimbli.com/file.php?id=6444

Rafal99

2012-06-07 04:43

reporter   ~0022887

>> How could I demonstrates this bug? It needs a "before" and an "after". How could I save two times?

You backup the save by copying the region folder. It is located in <DFfolder>\data\save\.
The save from before the bug, which after load reliably replicates the bug would be best (and enough).

millman

2012-06-07 05:08

reporter   ~0022888

Last edited: 2012-06-07 05:11

Thans Rafal99, file updated. Now just destroy the tower-cap wall to test the bug:
http://i.imgur.com/GwjM8.png

I have disabled the wood hauling labor. It will make it easier to test.

Another bug: If you have a garbage dump zone set, some logs are dumped and destroyed (you can test it in my saved game).

Rafal99

2012-06-07 08:33

reporter   ~0022893

Last edited: 2012-06-07 08:34

Ok I tested your save http://dffd.wimbli.com/file.php?id=6444
And I confirm the bug.

If you load the save and deconstruct any wall then about 46-47 items gets teleported to where the deconstructing dwarf stood.
The items teleported included wood logs, vermin remains and even empty barrels.

Deconstructing more walls later causes various amount of items being teleported, usually the very same items or a subset of them are getting teleported every time.

Building a new wall from either wood or stone and then deconstructing it also causes the bug.

I noticed that most of your already built walls had its materials set to Dump or Forbid. No idea if this was the initial cause of the bug, but removing the dump and forbid designations from these wall materials didn't prevent the bug from happenning further.
(I had to build a chair and assign a bookkeeper to get accurate counts in Stocks screen, so I could view the materials from there)

Lazygun

2012-06-07 12:47

reporter   ~0022896

Ahhh... this probably explains why there are half a dozen granite blocks in my caverns next to where I was walling off the cavern lake. I deconstructed the wall and ramp I was using to access the upper levels of the wall and only later noticed far more than 2 blocks on that tile.

dwarfler

2012-06-08 09:25

reporter   ~0022922

Last edited: 2012-06-08 09:25

I also have this same bug occurring when deconstructing walls. It was quite a shock when I noticed it, because the items that were relocated were locked inside sealed "cells" with no way in or out. I have uploaded a save to DFFD as well. The walls have been marked for deconstruction before save, so just unpause and watch the magic as the three nearby corpses and their equipment are moved out of their cells upon wall deconstruction:

http://dffd.wimbli.com/file.php?id=6453

(Oh, and I use no mods or utilities of any kind, strictly vanilla DF.)

nidpants

2012-06-12 14:46

reporter   ~0022971

Last edited: 2012-06-12 14:47

Only using native DF 34.11 and DT, no tilesets, no utilities

I have a giant quantum stockpile of stone and a nearby legit stockpile of wood, and three times the quantum stockpile has been moved about 12 tiles and most if not all of the wood stockpile moved in the manner described above.

First two deconstructs were dolomite mine tracks, the third was a diorite door. I've only noticed this happening in the same Z-level.

krenshala

2012-06-13 16:57

reporter   ~0022983

I didn't realize it at the time, but this appears to have bit me as well. Changed my mind on where some surface walls were to be located and when some of the walls were deconstructed I noticed "extra" logs (wooden wall) where I expected to only see one. It does not happen every time for me, however, as I have just deconstructed a few wooden walls underground (working through an aquifer) without it happening.

v34.11 Phoebus, no mods unless Phoebus made them, and I don't believe his changes could account for this.

Rafal99

2012-06-17 21:57

reporter   ~0023043

I just this happen in a new fort in vanilla 0.34.11.
It teleported about 20 dumped items from nearby garbage pile, and about 30 iron bars from nearby bars stockpile.

It seems to trigger this bug you need to deconstruct a wall near a pile of forbidden items, or near garbage dump zone.

Scandinavian

2012-06-18 09:21

reporter   ~0023047

In that case, "near" means "within (at least) 40 steps," because that's the distance from the nearest garbage dump or forbidden object that I have observed the behaviour.

peregarrett

2012-06-20 04:59

reporter   ~0023061

Confirm that in my fortress. Deconstructing floor made half of bar stockpile teleport to one tile, as well as quantum pile of ore.

Also, dwarf deconstructing stairs from above gets hit by stone block that stars was made of. I think it has same nature.

Snaake

2012-06-20 10:16

reporter   ~0023067

>> Also, dwarf deconstructing stairs from above gets hit by stone block that stars was made of. I think it has same nature.

Intended behaviour, not related and not a bug.

Drazinononda

2012-06-22 08:36

reporter   ~0023083

Last edited: 2012-06-22 08:38

Actually it was considered a bug before it was fixed, and it could become related if a dwarf deconstructs a stair above him- or herself and a whole stockpile comes crashing down on their head. The fix that causes the dwarf to place the deconstructed item at their feet wouldn't apply to teleporting objects, and you could end up with a real problem of deadly avalanches of stone while removing scaffolding.

Related to the bug: I had this going on in my fort, but the only thing being teleported was a single ocelot hair earring that I think came from a dead goblin. It wasn't dumped or forbidden at the time, and the last time it had been forbidden was after the goblin was killed a la 0000903

greycat

2012-06-22 09:20

reporter   ~0023084

I just saw this bug in action, too. (Sorry, no save.)

I was setting up to test some melting, so I embarked on a volcano, and started building stone block floors over the lava, with holes for the smelter and forge. But I had the forge's hole in the wrong place, so I deconstructed a floor tile in the correct place. As soon as that happened, the contents of the stone block stockpile, and the contents of the tetrahedrite stockpile, were all teleported to a single point next to the deconstructed floor spot. I think it might have been the same spot the dwarf was standing on while deconstructing.

uggi

2012-06-22 10:00

reporter   ~0023085

Last edited: 2012-06-22 10:28

0.34.11: I was removing boulders from the path to the new trading depot, by first building walls on top of the boulders and then deconstructing the walls. When the walls were deconstructed, piles of forbidden junk from nearby weapon traps were teleported into the tile where the dwarf was standing.

I uploaded a movie demonstrating the bug, you can see the nearby items suddenly vanishing:
http://mkv25.net/dfma/movie-2450

Also an older save of the fortress, you can reproduce the bug with it (just remove the civilian alert first):
http://dffd.wimbli.com/file.php?id=6538

ag

2012-06-22 12:11

reporter   ~0023088

Hmm, now I wonder if this teleporting problem is caused by the fix for that block crashing on the head bug. It potentially could be incorrectly computing the subset of items that should be placed at dwarf's feet. I need to find time to finally investigate this :)

ag

2012-06-23 03:04

reporter   ~0023092

Yeah, there is a loop that vacuums up all on_ground items in the 16x16 block that contained the construction and places them in the tile of the unit. It's obviously missing a coordinate check to make it apply only to items in the construction tile.

krenshala

2012-06-24 13:37

reporter   ~0023104

Last edited: 2012-06-24 13:40

More info on this one: Deconstructing two sections of wood wall about 60 tiles from my wood stockpile. 0.34.11 Phoebus, linux.

O1OO  O = unconstructed wall designation
+XXW  X = walls to be deconstructed
2W_W  W = constructed wall
+WWW  + = floor (grass), _ = channelled hole

1 is a floor tile where a new wall is designated to be built and Dwarf A was standing
2 is a floor tile where Dwarf B was standing

Dwarves A and B ran over to deconstruct the walls (Xs). Dwarf A (at 1) finished first, and the wood from the right hand X appeared in his tile as expected. A few seconds later Dwarf B finished tearing down the left X and when the wall disappeared, the logs at 1 disappeared as well. When I checked 2, which showed logs, using [k] it showed both sets of logs were present, even though there should have been one at each position (1 and 2).

munki

2012-06-30 08:44

reporter   ~0023128

Is there a known work-around for this bug, then? I can post my save as well, but it looks like we already have a number of demonstrative saves so it's probably not necessary. Phoebus, Therapist, Mac.

freerangedwarf

2012-07-02 05:05

reporter   ~0023139

Reported a similar bug.

Was clearing soil of young saplings and shrubs by constructing floors and deconstructing them. Deconstructing the floors somehow teleported all the seeds barrels from nearby stockpiles as well as a Forgotten Beast corpse from the caverns. The caverns are sealed off from the fortress. The FB was killed by a tribe of batmen living there.

ag

2012-07-04 07:16

reporter   ~0023149

Since this is such a weird bug, and from the scale of changes currently being made it doesn't seem that there will be a new release any time soon, with some help from Quietust I've made binary patches that fix it.

Linux v0.34.11:
1) http://pastebin.com/DBHzubUg
2) http://pastebin.com/PRDcnjeu

Windows v0.34.11:
1) http://pastebin.com/SVCEU3N3
2) http://pastebin.com/Y8Br5hHU

They fix the following problems with the code:

1) When the game intends to move items located in the tile of the construction to the tile of the unit in order to avoid bug 5907, it forgets to check the item coordinates, and ends up moving a whole 16x16 tile area worth of items.

2) In addition to that, due to the way it loops over the list of items, if there are multiple items on the down stair being deconstructed from below, up to 50% of them will still fall and injure the worker.

Expressed in C++, the combined change is from:

for (int i = 0; i < block->items.size(); i++) {
  item = findItemById(block->items[i])
  if (!item || !item->flags.on_ground)
    continue;
  /* move item */
  ...
}

to:

for (int i = block->items.size()-1; i >= 0; i--) {
  item = findItemById(block->items[i])
  if (!item || !item->flags.on_ground || item->pos != job->pos)
    continue;
  /* move item */
  ...
}

Warning: beware of mistakes applying the patches, proceed with care, etc.

Snaake

2012-07-09 07:06

reporter   ~0023191

I've posted here before, but just wanted to note that whereas previously I had only seen this with items in garbage dumps or stockpiles, I just had some minecarts which had been moving(!) nearby teleport to a tile that I deconstructed some tracks from.

user1294

2012-07-16 02:49

  ~0023234

ZestDwarf posted a save at 0006095.

Aescula

2012-08-02 01:02

reporter   ~0023395

Uhm... As for the binary patches... Can someone share a download for this that's patched? I don't know what to do with all that text, but this bug is real annoying to me as well.

nshapter

2012-09-01 18:38

reporter   ~0023520

I have seen this with a constructed floor hosting an animal stockpile.

Constructed floor
designated animal stockpile
used p-->x to remove a portion of the animal stockpile
deconstructed floor where the animal stockpile was removed
CAGE CHAOS!

Tark

2013-01-13 22:48

reporter   ~0023829

Stuff still happens, blah. How do I apply the binary patches, exactly? Kinda forgot to tell us dude :(.

TerryDactyl

2013-04-15 07:39

reporter   ~0023945

AG - your binary patch is not working with python v3 in windows. Results in syntax error. I had to:
- install python 2.7.4
- save the pastebin text as fix.dif
- save http://stalkr.net/files/ida/idadif.py
- I put both files in my dwarf fortress folder
- executed the script using "idadif.py 'dwarf fortress.exe' fix.dif"

It appears to have patched correctly and objects no longer seem to be warping. I'll follow up in case I notice anything fishy going on.

lethosor

2014-07-07 19:28

manager   ~0024896

Still occurs in 0.40.01

krenshala

2014-07-10 19:43

reporter   ~0025655

... and 0.40.02.

crossmr

2014-07-15 03:29

reporter   ~0026447

and 0.40.03 i thought this had been resolved before?

Issue History

Date Modified Username Field Change
2012-06-07 04:10 millman New Issue
2012-06-07 04:24 Rafal99 Note Added: 0022883
2012-06-07 04:24 Rafal99 Tag Attached: AWAITING UPDATE
2012-06-07 04:26 Rafal99 Note Edited: 0022883
2012-06-07 04:30 millman Note Added: 0022884
2012-06-07 04:34 Snaake Note Added: 0022885
2012-06-07 04:36 Snaake Note Edited: 0022885
2012-06-07 04:38 millman Note Added: 0022886
2012-06-07 04:39 Snaake Note Edited: 0022885
2012-06-07 04:43 Rafal99 Note Added: 0022887
2012-06-07 05:08 millman Note Added: 0022888
2012-06-07 05:09 millman Note Edited: 0022888
2012-06-07 05:11 millman Note Edited: 0022888
2012-06-07 08:33 Rafal99 Note Added: 0022893
2012-06-07 08:34 Rafal99 Note Edited: 0022893
2012-06-07 08:34 Rafal99 Note Edited: 0022893
2012-06-07 08:35 Rafal99 Tag Detached: AWAITING UPDATE
2012-06-07 12:47 Lazygun Note Added: 0022896
2012-06-08 09:25 dwarfler Note Added: 0022922
2012-06-08 09:25 dwarfler Note Edited: 0022922
2012-06-10 14:15 Logical2u Relationship added has duplicate 0006005
2012-06-12 14:46 nidpants Note Added: 0022971
2012-06-12 14:47 nidpants Note Edited: 0022971
2012-06-13 16:57 krenshala Note Added: 0022983
2012-06-17 21:57 Rafal99 Note Added: 0023043
2012-06-18 09:21 Scandinavian Note Added: 0023047
2012-06-20 04:59 peregarrett Note Added: 0023061
2012-06-20 10:16 Snaake Note Added: 0023067
2012-06-21 10:06 user6 Relationship added has duplicate 0006046
2012-06-21 14:15 Rafal99 Tag Attached: deconstruct
2012-06-21 14:15 Rafal99 Tag Attached: teleport
2012-06-22 08:36 Drazinononda Note Added: 0023083
2012-06-22 08:38 Drazinononda Note Edited: 0023083
2012-06-22 09:20 greycat Note Added: 0023084
2012-06-22 10:00 uggi Note Added: 0023085
2012-06-22 10:28 uggi Note Edited: 0023085
2012-06-22 12:11 ag Note Added: 0023088
2012-06-23 03:04 ag Note Added: 0023092
2012-06-24 13:37 krenshala Note Added: 0023104
2012-06-24 13:37 krenshala Note Edited: 0023104
2012-06-24 13:39 krenshala Note Edited: 0023104
2012-06-24 13:39 krenshala Note Edited: 0023104
2012-06-24 13:40 krenshala Note Edited: 0023104
2012-06-30 08:44 munki Note Added: 0023128
2012-07-02 05:05 freerangedwarf Note Added: 0023139
2012-07-04 07:16 ag Note Added: 0023149
2012-07-04 12:14 user1294 Relationship added has duplicate 0006065
2012-07-09 07:06 Snaake Note Added: 0023191
2012-07-16 02:49 user1294 Relationship added has duplicate 0006095
2012-07-16 02:49 user1294 Note Added: 0023234
2012-07-16 07:25 Quietust Tag Attached: binary patch
2012-07-31 14:20 Logical2u Relationship added has duplicate 0006137
2012-08-02 01:02 Aescula Note Added: 0023395
2012-08-30 04:04 user1294 Relationship added has duplicate 0006182
2012-09-01 18:38 nshapter Note Added: 0023520
2012-10-14 04:58 user1294 Relationship added has duplicate 0006223
2012-12-17 15:19 user1294 Relationship added related to 0006266
2013-01-13 22:48 Tark Note Added: 0023829
2013-03-03 21:16 user11 Relationship replaced has duplicate 0006266
2013-04-15 07:39 TerryDactyl Note Added: 0023945
2013-05-05 00:51 user1294 Relationship added related to 0006313
2013-05-08 05:08 user1294 Relationship deleted related to 0006313
2013-05-08 05:09 user1294 Relationship added has duplicate 0006313
2013-08-12 04:37 user1294 Relationship added has duplicate 0006366
2014-03-25 13:20 user11 Assigned To => user11
2014-03-25 13:20 user11 Status new => acknowledged
2014-06-09 02:11 user1294 Relationship added has duplicate 0006502
2014-07-07 19:28 lethosor Note Added: 0024896
2014-07-08 09:10 user1294 Relationship added has duplicate 0006599
2014-07-08 09:36 lethosor Summary Destroying a wall empties the wood stockpile. => Destroying a construction teleports nearby items
2014-07-10 19:43 krenshala Note Added: 0025655
2014-07-12 12:27 user11 Relationship added has duplicate 0007147
2014-07-14 12:49 user6 Relationship added related to 0006970
2014-07-14 23:28 user6 Relationship added has duplicate 0007320
2014-07-15 03:29 crossmr Note Added: 0026447
2014-07-15 15:15 user6 Relationship added has duplicate 0007350
2014-07-16 08:37 user6 Relationship added has duplicate 0007383
2014-07-16 08:38 user6 Sticky Issue No => Yes
2014-07-18 08:47 Toady One Status acknowledged => resolved
2014-07-18 08:47 Toady One Fixed in Version => Next Version
2014-07-18 08:47 Toady One Resolution open => fixed
2014-07-18 08:47 Toady One Assigned To user11 => Toady One
2014-07-18 13:02 user11 Sticky Issue Yes => No