Bug - Fixed Apparent (valuable) item loss

Lumeria

New member
KoLmafia v14.5 r9201
Running on Linux Ubuntu 10.10
Using Java v1.6.0_20-b20
I was playing through the login option, not through relay.

AFAIK I was not logging anything at the time, unless there is some level of auto-logging going on (in which case do tell me where to find the output!).

I submitted a KoL bug report. Multi Czar confirmed that the items were not put in stash, but also did not see that they had been in my possession, and thinks this is a Mafia-related bug. I've since requested that a closer look be taken at what had been in my display.

Short version: I discovered (aack!!) that I'd forgotten about some valuable stash equipment - two ultra-rares. Soon thereafter I also noticed that in addition to the two Mr. Store items I had borrowed, a second pair appeared to be in my display. I made a couple errors by re-putting items back into display rather than stash, reflected in the GLI transcript. Below, first the transcript of the Graphical GLI, followed by the Clan Activity log:


--- begin Mafia Graphical GLI output ---

> display take talisman

talisman of baio
talisman of bakula

[talisman] has too many matches.

> display take bakula

Removing items from display case...
Requests complete.

> display take baio

Removing items from display case...
Requests complete.

> inv baio

Talisman of Baio
Players in channel clan:*Lumeria (1*total)
System Message: The system will go down for nightly maintenance in 15 minutes.

> stash put baio

Dropping items into stash...
Requests complete.

> display put bakula

Placing items in display case...
Requests complete.

> display take bakula

Removing items from display case...

> CURRENT: display take bakula
> QUEUED 1: stash put bakula

> stash put bakula

Dropping items into stash...
Requests complete.

> inv maypole

miniature gravy-covered maypole

> inv bakula

> inv baio

System Message: The system will go down for nightly maintenance in 10 minutes.

> inv talisman

Talisman o' Nam

--- end Mafia Graphical GLI output ---

BUT:

---begin clan stash activity---

Stash Activity:
04/03/11, 08:14PM: Lumeria (#1142700) added 1 miniature gravy-covered maypole.
04/03/11, 08:12PM: Lumeria (#1142700) added 1 plastic pumpkin bucket.
04/03/11, 08:10PM: Lumeria (#1142700) added 1 tiny plastic sword.
04/03/11, 08:09PM: Lumeria (#1142700) added 1 flaming pink shirt.
04/03/11, 08:09PM: Lumeria (#1142700) added 1 hypnodisk.
04/03/11, 08:09PM: Lumeria (#1142700) added 3 Jekyllin hide belts.
04/03/11, 07:45PM: Lumeria (#1142700) added 1 Platinum Yendorian Express Card.
04/03/11, 07:43PM: Lumeria (#1142700) took 1 Platinum Yendorian Express Card.

---end clan stash activity---

And the worst part is they weren't even mine. They were borrowed from stash.

I've checked my display, store, closet and inventory, as well as the clan's stash contents. None provide any solace.

I recognize that Mafia is only an interface and doesn't on its own have the power to, say, wreak havoc with pointers to files representing the items. I've been puzzling over what *could* - at least in theory - happen to items which appear to disappear:

1) Pulverizing. I'm a PM this run, though, and don't see any ultimate wads in inventory.
2) Auto-selling. (Is that possible with URs and Mr. Store items, though?)
3) Mailing the items to a player ID.
Anything else?

Many thanks,
Lumeria
 

slyz

Developer
As you said, Mafia can't make an item vanish.

It can think the item isn't in your possession anymore or it can think you have an item that isn't really in your inventory, and the "inv" command can give a result that is out of synch with your real KoL inventory, but in no case will the item really vanish in KoL.

Some of Mafia's logging can be misleading, and could be considered buggy. For example, I don't have a Baio in my inventory, or in my display case, and here is what I get by using the same commands you did:
Code:
> display take talisman

talisman of baio
talisman of bakula

[talisman] has too many matches.

> display take baio

Removing items from display case...
Requests complete.

> inv baio

Talisman of Baio

> stash put baio

Dropping items into stash...
Requests complete.

If Multi Czar says these items were never in your possession, my guess is that they never were in your display case in the first place. You simply stumbled upon a Mafia bug that leads it to think that an item has been moved from your DC to your inventory even if the request failed:
Code:
> inv baio

> display take 50 baio

Removing items from display case...
Requests complete.

> inv baio

Talisman of Baio (50)

> refresh inv

Refreshing closet...
Updating inventory...
Requests complete.

> inv baio
 

Veracity

Developer
Staff member
Agreed. I'll look into detecting transfer failures, to/from stash/display and giving appropriate error messages while leaving your purported inventory untouched.
 

slyz

Developer
I had a look at TransferItemRequest.java, and apparently it simply deducts items from Mafia's inventory/display case/etc... based on the URL submitted, not on the response text, so it's more a matter of making sure the right request is made in the first place.

What I don't understand is that the display command should pass on a list of items that Mafia thinks are in your inventory/DC, instead of trying to transfer 50 Baios that it knows I don't have.

Is the issue in ItemFinder.getMatchingItemList() ?
 
Last edited:

fronobulax

Developer
Staff member
FWIW, when I was developing DCQuest et. al. I discovered that mafia could give misleading messages about transfers between the closet, inventory and display case. This feature request may bear on this as might this one. Since one inventory mistake can "propagate" in mafia, the thing to do in cases like this is to log in directly to KoL, without mafia and look for the items there.
 

Veracity

Developer
Staff member
Revision 9222 will parse the actual Results from a transfer to or from the stash or the display case.

When pulling items from the stash, KoL tells you "You acquire xxx" and we already logged that for you to see. When pulling items from the display case, KoL does not give that message, but we now log "You acquire xxx" in the CLI so you can see what you got.

I notice that when you move multiple items from inventory to stash, KoL will log it as "You add 2 Alice's Army Alchemists, 1 Alice's Army Bowman, and 3 Alice's Army Clerix to the Goodies Hoard." In other words, it uses the plural form if you deposit more than one. If we don't know the plural, that will confuse us.

I suppose I should recognize when ItemDatabase.getItemId can't figure out a name and log something about an unknown plural.
 
Top