Page 1 of 2

[VERY RARE] Some dropped items by players get bugged

Posted: Sun Apr 18, 2010 4:02 pm
by Pere
I don't post this at bugs because I bring a lot of info about it to [Discuss about], a temp fix for it and added to this I'm too lazy to search my rev numbers xD

You know that sometimes, when a player drops an item, it stays on the floor unable to be picked up again. Even more, when you try to pick it up you get "bugged" and have to target yourself to be able to walk again.

Ok, today I've began to study a case of bugged dropped item (a Triton Pole ^^) and I've found out a lot of useful information about it, just sniffing my pickup packet and using L2World.getInstance().findObject().
The object is not null, and it is instance of l2iteminstance... but!! It has itemLocation = INVENTORY, owner = 27XXXXXX and lastChange != REMOVED. Something happened during its drop, and my first suspicious is Inventory.dropItem() because here is where all these variables are set:

Code: Select all

		synchronized (item)		{			if (!_items.contains(item))				return null; 			removeItem(item);			item.setOwnerId(process, 0, actor, reference);			item.setLocation(ItemLocation.VOID);			item.setLastChange(L2ItemInstance.REMOVED); 			item.updateDatabase();			refreshWeight();		}
I don't know how that could happen, so I'm here to ask for your opinions about it.

Here my temp fix patch:

Code: Select all

### Eclipse Workspace Patch 1.0#P L2_GameServerIndex: java/com.l2jserver/gameserver/ai/L2CharacterAI.java===================================================================--- java/com.l2jserver/gameserver/ai/L2CharacterAI.java	(revision 209)+++ java/com.l2jserver/gameserver/ai/L2CharacterAI.java	(working copy)@@ -502,7 +502,23 @@ 		clientStopAutoAttack();  		if (object instanceof L2ItemInstance && ((L2ItemInstance)object).getLocation() != ItemLocation.VOID)-			return;+		{+			if (_actor.getKnownList().knowsObject(object))+			{+				//TODO: Temp fix for bugged items on the floor.+				_log.warning("A bugged item has just been picked up!" ++						" Its owner id was " + ((L2ItemInstance)object).getOwnerId() + +						" and its item id is " + ((L2ItemInstance)object).getObjectId() + ".");+				+				((L2ItemInstance)object).setOwnerId("Bugged item pick up", 0, (L2PcInstance)_actor, null);+				((L2ItemInstance)object).setLocation(ItemLocation.VOID);+				((L2ItemInstance)object).setLastChange(L2ItemInstance.REMOVED);++				((L2ItemInstance)object).updateDatabase();+			}+			else+				return;+		}  		// Set the Intention of this AbstractAI to AI_INTENTION_PICK_UP 		changeIntention(AI_INTENTION_PICK_UP, object, null); 
By the way, there's another kind of bugged items where your character doesn't get bugged when trying to pick it up, but it is caused because the item is not contained by L2World._allVisibleObjects. This bug has an easier temp fix, but I don't know how is it caused neither...


Thank you ^^

Re: [VERY RARE] Some dropped items by players get bugged

Posted: Sun Apr 18, 2010 7:22 pm
by JIV

Re: [VERY RARE] Some dropped items by players get bugged

Posted: Sun Apr 18, 2010 7:41 pm
by Pere
These items are not stackable. By the way, now that you say... since then I don't see more stackable items on the floor o.O

Re: [VERY RARE] Some dropped items by players get bugged

Posted: Sun Apr 18, 2010 7:55 pm
by janiii
all the magic is to find out when it happens, to have a scenario what the player exactly did, also which item it was - check the item logs, maybe they could help to understand what was happening.

- stackable/non-stackable ?
- equipped/not equipped ?
- having same item more times in inventory / paperdoll ? / dropping only a part of stackable ?
- is it for sure on player drop from inventory ? (or is it also on mob drop ? auto loot on ?)
- drop config ? item deletion config ?
- item log of the bugged item ?

JUST GET MORE INFO so that we can reproduce it

Re: [VERY RARE] Some dropped items by players get bugged

Posted: Sun Apr 18, 2010 8:05 pm
by jurchiks
just had an idea: maybe it's caused by SaveDroppedItems function, like you drop the item, the saving runs and something goes wrong...?

Re: [VERY RARE] Some dropped items by players get bugged

Posted: Sun Apr 18, 2010 8:10 pm
by lion
jurchiks wrote:just had an idea: maybe it's caused by SaveDroppedItems function, like you drop the item, the saving runs and something goes wrong...?
i see some time this on my server and i don't use SaveDroppedItems function

Re: [VERY RARE] Some dropped items by players get bugged

Posted: Sun Apr 18, 2010 9:34 pm
by Pere
janiii wrote:- stackable/non-stackable ?
- equipped/not equipped ?
- having same item more times in inventory / paperdoll ? / dropping only a part of stackable ?
- is it for sure on player drop from inventory ? (or is it also on mob drop ? auto loot on ?)
- drop config ? item deletion config ?
- item log of the bugged item ?
- sometimes yes sometimes not
- sometimes yes (PK drop like this time) sometimes not
- only from players drop, never from mobs (autoloot off server)
- item deletion has nothing to do here, sometimes players drop to trade and then this happens (xD)
- I don't have item logs :oops:

Re: [VERY RARE] Some dropped items by players get bugged

Posted: Mon Apr 19, 2010 7:19 am
by denser
i can reproduce...

enable tvt
//tvt_advance - spawn noc for register
//tvt_advance - despawn lack of registration
now try to walk through that place where was spawned npc...

also if you drop there something - it will stuck...


also very rare stuck items on floor in goddarg on stairs near teleporter...

Re: [VERY RARE] Some dropped items by players get bugged

Posted: Mon Apr 19, 2010 10:52 am
by badriniki
These items are not buged for me o.O, thanks by the way ^^

Re: [VERY RARE] Some dropped items by players get bugged

Posted: Mon Apr 19, 2010 2:44 pm
by janiii
- does the player who cannot pick up the item get a system message? or just nothing happens?
- still waiting for the drop/save/delete configs if you dont have default values..

Re: [VERY RARE] Some dropped items by players get bugged

Posted: Mon Apr 19, 2010 5:04 pm
by denser
janiii wrote:- does the player who cannot pick up the item get a system message? or just nothing happens?
- still waiting for the drop/save/delete configs if you dont have default values..
1 - nothing...if you see item from far - you run to it to some distance and stand still
2 - config in default values for drop

Re: [VERY RARE] Some dropped items by players get bugged

Posted: Mon Apr 19, 2010 6:03 pm
by janiii
denser wrote:i can reproduce...

enable tvt
//tvt_advance - spawn noc for register
//tvt_advance - despawn lack of registration
now try to walk through that place where was spawned npc...

also if you drop there something - it will stuck...


also very rare stuck items on floor in goddarg on stairs near teleporter...
could not reproduce.. i can pickup all with a pickup shortcut .

Re: [VERY RARE] Some dropped items by players get bugged

Posted: Tue Apr 20, 2010 4:56 am
by denser
janiii, after npc despawn - you can walk through that place where stay npc? i have invis obstacle, when i run there player jumps..

Re: [VERY RARE] Some dropped items by players get bugged

Posted: Tue Apr 20, 2010 5:59 am
by janiii
denser wrote:janiii, after npc despawn - you can walk through that place where stay npc? i have invis obstacle, when i run there player jumps..
yes, there is some untargetable space, but i can still pick up items using the pickup command/shortcut.

Re: [VERY RARE] Some dropped items by players get bugged

Posted: Tue Apr 20, 2010 9:29 am
by Pere
You are talking about a client glitch, but I am talking about a server one:

The item is perfectly shown in the server, but when someone activates the Action packet something goes wrong, and this is because the L2ItemInstance has Location = INVENTORY, not VOID (nothing happens and your char can't move anymore without targetting itself).

In other cases it simply isn't in the L2World _visibleObjects list (but yes on the region's one) and the onAction returns an ACTIONFAILED packet (nothing happens).