Open Bale001 opened 4 years ago
Hi, first of all, thank you for your detailed explanation and research into this bug, and apologies for my delayed response.
Unfortunately I am unable to replicate what you're experiencing.
I sent 110 buddies in the b#gb
packet response but all 110 buddies show up.
Replaced line 88 with
await p.send_xt('gb', *buddies, *[f'{i}|P{i}|0' for i in range(110)])
In buddies.py.
And the result:
Also, your explanation doesn't really make sense since, my buddies API has no handler for rpfi
. It is mentioned in the original client but it leads nowhere, it has no client-side handlers. So I guess I don't really understand how that is solving the issue!
// airtower.as
var REFRESH_PLAYER_FRIEND_INFORMATION = "rpfi";
// shell.as
function sendRefreshPlayerFriendInfo()
{
AIRTOWER.send(AIRTOWER.PLAY_EXT,AIRTOWER.PLAYER_HANDLER + "#" + AIRTOWER.REFRESH_PLAYER_FRIEND_INFORMATION,[],"str",getCurrentServerRoomId());
}
To confirm this, I sent half the buddies with b#gb
and the rest with u#rpfi
.
await p.send_xt('gb', *buddies, *[f'{i}|P{i}|0' for i in range(50)])
await p.send_xt('rpfi', *[f'{i}|P{i}|0' for i in range(50, 110)])
And I only got the first 50 buddies (sent in the gb
(get buddy) handler):
To push this further, I tried with 1000 buddies, and they still all showed up.
First of all, I said to send the rest of the buddies in response to the rpfi packet, as in the client sends the rpfi packet, and I respond to it with a gb packet. I'm not really sure why yours works fine... i'll try recreating the bug later
maybe this issue isn't caused by the dependency/packet itself, maybe its caused by the db throttled or something?
maybe this issue isn't caused by the dependency/packet itself, maybe its caused by the db throttled or something?
Does it matter? Either way it is bad and must be fix the ben!
maybe this issue isn't caused by the dependency/packet itself, maybe its caused by the db throttled or something?
Surely if the db was throttled from getting buddies the same thing would happen with items, powercards, furniture and anything else that gets a load of entries from the db at the same time though?
Yes but both of them doesn't use db_transaction
maybe this issue isn't caused by the dependency/packet itself, maybe its caused by the db throttled or something?
Surely if the db was throttled from getting buddies the same thing would happen with items, powercards, furniture and anything else that gets a load of entries from the db at the same time though?
Yes but NVM they diditems, powercards, furniture
doesn't use db_transaction
I sent 230 buddies and the buddy list refuses to work at all, so i guess there's another lead on this story
If a user has more than 100 buddies the client will break. Here is a screenshot of the bug happening (from a player in newcp)
To fix the bug, send the first 100 buddies in response to b#gb, the client will see you didnt send all their buddies and will send a u#rpfi packet. Send the rest of the users buddies in response to that (in a gb packet like before). Also, you still cannot send more then 100 buddies in response to the rpfi packet, so if the user has 230 buddies, send another 100 buddies in response to rpfi, and the client will keep sending an rpfi packet until all buddies are received.