altv-athena icon indicating copy to clipboard operation
altv-athena copied to clipboard

Objects not always fully removed from client-side.

Open Stuyk opened this issue 1 year ago • 2 comments

This bug is really difficult to reproduce; but also fix. We've tried dozens of solutions with no fix in sight.

The simplest way to reproduce the bug is to give yourself a full inventory of single items.

Drop all of the items in one place.

Then pick them all back up.

If reproduced correctly you will see 1 object with no text label above it.

Stuyk avatar Sep 22 '22 15:09 Stuyk

I had the same issue when created a "farming" kind of system, where you spawn objects randomly in different pos on the map and a player has to interact with the object. Once interacted - object gets removed. Each object has label, interaction point and object model itself. Sometimes, absolutely randomly, label and interactions get destroyed but the object remains. So it awfully sounds like the issue described, meaning it's not directly linked to an implementation of an inventory but something more underlying than that. p.s. haven't found any solution though, unfortunately

OlegGulevskyy avatar Sep 23 '22 09:09 OlegGulevskyy

@OlegGulevskyy Yea. It's a very strange but. I've tried investigating it for a long time and have rewritten object streamers and all sorts of things in hopes it would resolve the issue; but I think the only solution that is left is waiting for the alt:V Object API to come out of the dev branch. Until then this sits in the backlog.

Stuyk avatar Sep 23 '22 14:09 Stuyk

@Stuyk Xm, i had same issue in one of my plugins. Object didn't removed from world after calling all of natives which can delete entity, i even tried copy natives from streamer remove method, object was still there, and actually only 1 of 10 objects weren't removed while the others were removed fine all the time. To fix this i actually had to call setEntityVisible after entity deletion, may be this will help in this case? Because i didnt used any athena function, clean natives from altv, i think issue may be not related to athena at all.

game.setEntityVisible(entity, false, false);

gotgameio avatar Oct 12 '22 02:10 gotgameio

@gotgameio Definitely not a great solution since all you're doing is hiding the object. Eventually client-side will run out objects and hit limitations because they're simply hidden and not fully deleted.

Stuyk avatar Oct 12 '22 15:10 Stuyk

@gotgameio Definitely not a great solution since all you're doing is hiding the object. Eventually client-side will run out objects and hit limitations because they're simply hidden and not fully deleted.

I think if we hide entity after we delete it successfully isn't it a problem? If there is only one entity left which somewhy not being deleted we can hide it as i did for such case? i mean hidding deleted entity will not cause some limitations problem cause its deleted and for last one limit will reach only with big entity spawn delete each second i think or no?

gotgameio avatar Oct 13 '22 00:10 gotgameio