Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006635 [DCSS] Bug Report minor random 2013-02-12 19:40 2014-09-10 22:55
Reporter HilariousDeathArtist View Status public  
Assigned To wheals
Priority normal Resolution done  
Status resolved   Product Branch 0.12 ancient branch
Summary 0006635: Abyss: "Unlinked item" error upon changing level
Description Playing Trunk WebTiles on CSZO as HilariousDeathArtist, I encountered this error when I moved from Abyss:4 to Abyss:5.

I've attached a character dump at the time of the error.

Below is the text of the error:

 There is a gateway leading deeper into the Abyss here.
 You plunge deeper into the Abyss.
 Unlinked item:
 bread ration
     item #0: base: 4; sub: 1; plus: 0; plus2: 0; special: 0
     quant: 1; colour: 6; ident: 0x00400000; ident_type: 0
     x: 50; y: 56; link: 27000; Igrd(50,56) = 27000
 You sense a powerful magical force warping space.
Additional Information
Tags No tags attached.
Attached Files txt file icon HilariousDeathArtist.txt [^] (167,617 bytes) 2013-02-12 19:40
txt file icon blackcustard.txt [^] (66,404 bytes) 2013-03-20 23:35 [Show Content]
? file icon blackcustard-2013-03-20.22_19_04.ttyrec [^] (77,136 bytes) 2013-03-20 23:36
? file icon blackcustard.rc [^] (30,835 bytes) 2013-03-20 23:41
? file icon 0001-Fix-Unlinked-item-errors-in-Abyss.patch [^] (834 bytes) 2013-04-03 00:44 [Show Content]

- Relationships

-  Notes
(0021724)
blackcustard (reporter)
2013-03-20 23:31
edited on: 2013-03-20 23:41

Same bug. I'm blackcustard on CDO trunk. Playing 0.12-a0-2859-g855fd10 when the bug occurred just a few minutes ago. OpVM of Vehumet.

I went downstairs from Abyss:4 to Abyss:5.

 You plunge deeper into the Abyss.
 Unlinked item:
 8 bolts of flame
     item 0000015:  base: 1; sub: 3; plus: 0; plus2: 0; special: 1
     quant: 8; colour: 9; ident: 0x00400000; ident_type: 0
     x: 36; y: 58; link: 27000; Igrd(36,58) = 27000


It's a VERY short ttyrec. I ate a pear, killed a large abomination, apported some gold, cast shroud of golubria, and went downstairs. Then I made a note, saved, backed up the save, made a dump, and came here. Yes, I made the dump after saving. Sorry. I wasn't thinking. I also didn't show enough screens in the ttyrec, but at least you can see the bug itself.

SAVE:
http://crawl.develz.org/saves/dumps/blackcustard-855fd10-130320-2225.tar.bz2 [^]

TTYREC, DUMP, RC attached to ticket. See above. Please note this line in my rc: "char_set = unicode". If the TTYREC renders as a mess, that might be why.

TTYREC link:
http://crawl.develz.org/ttyrecs/blackcustard/2013-03-20.22:19:04.ttyrec [^]
(Probably you will have to add ".bz2". Or just get it up above.)

(0022057)
rchandra (reporter)
2013-04-01 01:16

Same thing:
 http://dobrazupa.org/saves/rchandra-crawl-git-b96d59c944-130331-2314.tar.bz2 [^]

tv available from !lm rchandra tefe xl=27 br.end=abyss

 Unlinked item:
 leather armour
     item #21: base: 2; sub: 1; plus: 2; plus2: 0; special: 0
     quant: 1; colour: 6; ident: 0x00400000; ident_type: 0
     x: 59; y: 53; link: 27000; Igrd(59,53) = 27000
(0022101)
blackcustard (reporter)
2013-04-03 00:37
edited on: 2013-05-11 15:59

PATCHED. Attached above. But it's sort of old at this point, so if someone tries to apply it and it fails I'll happily rebase it for you.

Basically: When you place a vault you need to call fixup_misplaced_items and link_items. Sometimes, Abyss would place a vault but not do this. I made it so it does.

These code paths can place vaults in abyss:
1. Normal vaults: _generate_area -> _abyss_place_vaults -> _abyss_place_map

2. Specifically rune vaults: _generate_area -> _abyss_create_items -> _abyss_place_rune -> _abyss_place_rune_vault -> _abyss_place_vault_tagged -> _abyss_place_map

3. Specifically exit vaults:
_generate_area -> _abyss_apply_terrain -> _abyss_check_place_feat -> _abyss_place_vault_tagged -> _abyss_place_map

The first two code paths correctly link new items. The third does NOT. My patch fixes this.

Here are some more interesting details:
1. The first two code paths are never followed in a chaos knights starting Abyss, because the starting Abyss never places normal vaults or the rune.

2. Every single one of the unlinked items had the ISFLAG_NO_PICKUP flag set, because they all came from this function, who's purpose is to ensure that stairs are never placed on Abyss 5:
{{
function init_abyss_exit(e, glyph)
  if you.depth() == dgn.br_depth(you.branch()) then
    if crawl.random2(10) > 3 then
      e.kfeat(glyph .. " = exit_abyss")
    else
      crawl.mpr("foo shit happened dude!")
      e.kitem(glyph .. " = any no_pickup")
    end
  else
    e.kfeat(glyph .. " = exit_abyss w:6 / abyssal_stair w:4")
  end
end
}}


3. Only one of the Abyss exit vaults explicitly places items. (bh_abyss_fiendish_exit). If an item is in them it was randomly generated or else it replaced the exit/stairs.

4. As a consequence of 1, 2, and 3: this error pretty much only ever occurred on Abyss:5.

This bug came about because something that NEEDED to be happening was not happening automatically. There is even a comment above fixup_misplaced_items that says "link_items() must be called after this function."

I do not fully understand how vault placement works, so I made the simple fix. HOWEVER, it seems to me that the proper solution is to move the calls to fixup_misplaced_items and link_items into _abyss_place_map. Or even farther, how about into dgn_safe_place_map?

(0022371)
morik (reporter)
2013-04-22 01:06
edited on: 2013-04-22 01:06

I just got this. (CAO webtiles, trunk, 0.13-a0-415-g168e9a3)
You plunge deeper into the Abyss.
 Unlinked item:
 10 arrows of flame
     item #0: base: 1; sub: 2; plus: 0; plus2: 0; special: 1
     quant: 10; colour: 1; ident: 0x00400000; ident_type: 0
     x: 47; y: 46; link: 27000; Igrd(47,46) = 27000

(0022540)
rchandra (reporter)
2013-05-04 06:39

still happening in 0.12 stable, as I reached abyss:5.

http://dobrazupa.org/saves/rchandra-crawl-0.12-130504-0438.tar.bz2 [^]

!lm rchandra br.end=abyss trhu 1

 Unlinked item:
 pair of boots
     item 0000047: base: 2; sub: 12; plus: 0; plus2: 0; special: 0
     quant: 1; colour: 1; ident: 0x00400000; ident_type: 0
     x: 36; y: 60; link: 27000; Igrd(36,60) = 27000
(0022643)
raskol (reporter)
2013-05-12 16:43

Still happening as of tourney time :( abyss:5 as well.
 You plunge deeper into the Abyss.
 Unlinked item:
 10 gold pieces
     item #0: base: 13; sub: 0; plus: 0; plus2: 0; special: 0
     quant: 10; colour: 14; ident: 0x00400000; ident_type: 0
     x: 49; y: 46; link: 27000; Igrd(49,46) = 27000

 http://dobrazupa.org/saves/raskol-crawl-0.12-130512-1443.tar.bz2 [^]
(0022652)
mumra (developer)
2013-05-14 19:45

Thanks for the patch, I've pushed this to 0.13 and cherry-picked to 0.12 now.

@blackcustard are you in the CREDITS.txt already and if not what name do you want to be credited as?
(0027200)
wheals (administrator)
2014-09-10 22:55

Fixed, according to the final comment by mumra? not sure if there's a reason he didn't resolve, but i haven't seen this error in this context recently,

- Issue History
Date Modified Username Field Change
2013-02-12 19:40 HilariousDeathArtist New Issue
2013-02-12 19:40 HilariousDeathArtist File Added: HilariousDeathArtist.txt
2013-03-20 23:31 blackcustard Note Added: 0021724
2013-03-20 23:32 blackcustard Note Edited: 0021724
2013-03-20 23:32 blackcustard Note Edited: 0021724
2013-03-20 23:33 blackcustard Note Edited: 0021724
2013-03-20 23:34 blackcustard Note Edited: 0021724
2013-03-20 23:35 blackcustard Note Edited: 0021724
2013-03-20 23:35 blackcustard File Added: blackcustard.txt
2013-03-20 23:36 blackcustard File Added: blackcustard-2013-03-20.22_19_04.ttyrec
2013-03-20 23:36 blackcustard Note Edited: 0021724
2013-03-20 23:41 blackcustard File Added: blackcustard.rc
2013-03-20 23:41 blackcustard Note Edited: 0021724
2013-04-01 01:16 rchandra Note Added: 0022057
2013-04-03 00:37 blackcustard Note Added: 0022101
2013-04-03 00:40 blackcustard Note Edited: 0022101
2013-04-03 00:43 blackcustard Note Edited: 0022101
2013-04-03 00:44 blackcustard File Added: 0001-Fix-Unlinked-item-errors-in-Abyss.patch
2013-04-03 00:45 blackcustard Note Edited: 0022101
2013-04-03 00:46 blackcustard Note Edited: 0022101
2013-04-22 01:06 morik Note Added: 0022371
2013-04-22 01:06 morik Note Edited: 0022371
2013-05-04 06:39 rchandra Note Added: 0022540
2013-05-11 15:59 blackcustard Note Edited: 0022101
2013-05-12 16:43 raskol Note Added: 0022643
2013-05-14 19:45 mumra Note Added: 0022652
2014-09-10 22:55 wheals Note Added: 0027200
2014-09-10 22:55 wheals Status new => resolved
2014-09-10 22:55 wheals Fixed in Branch => 0.13 old branch
2014-09-10 22:55 wheals Resolution open => done
2014-09-10 22:55 wheals Assigned To => wheals


Mantis 1.1.8[^]
Copyright © 2000 - 2009 Mantis Group
Powered by Mantis Bugtracker