Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Players cannot unlock items in slots they unlocked in a previous game when they are not logged in when generating a new card #56

Closed
gbegerow opened this issue Jun 20, 2021 · 8 comments
Labels
bug Something isn't working

Comments

@gbegerow
Copy link
Contributor

Played a self hosted game with my wife Tanlaith. She got some items. I crafted a flowerpot at 21:03. She crafted a flowerpot short time after and it dit not register.
FlowwerpotNotRegisterted

Dropping and get it again did not register. Crafting a new one did not register. We got one item (Spruce Sapling) both earlier in the game.

If you want the savegame drop me a line.

Here are the relevant entries from the logfile:

[16:22:18] [Render thread/INFO]: [CHAT] Local game hosted on port 62395
[16:25:30] [User Authenticator #1/INFO]: UUID of player Tanlaith is 70d3df22-adbd-4b03-aa98-ed0ea619e869
[16:25:31] [Server thread/INFO]: Tanlaith[/192.168.178.28:52516] logged in with entity id 14269 at (-8.5, 2.0, 7.5)
[16:25:31] [Server thread/INFO]: Tanlaith joined the game
[16:25:31] [Render thread/INFO]: [CHAT] Tanlaith joined the game
[16:25:58] [Render thread/INFO]: [CHAT] Tanlaith joined the lime green team
[16:26:03] [Render thread/INFO]: [CHAT] gbegerow joined the red team
[16:27:45] [Server thread/INFO]: Tanlaith lost connection: Disconnected
[16:27:45] [Server thread/INFO]: Tanlaith left the game
[16:27:45] [Render thread/INFO]: [CHAT] Tanlaith left the game
[16:39:38] [User Authenticator #2/INFO]: UUID of player Tanlaith is 70d3df22-adbd-4b03-aa98-ed0ea619e869
[16:39:38] [Server thread/INFO]: Tanlaith[/192.168.178.28:57533] logged in with entity id 14271 at (-18.915658608343332, 3.0, 7.5680854267267925)
[16:39:38] [Server thread/INFO]: Tanlaith joined the game
[16:39:38] [Render thread/INFO]: [CHAT] Tanlaith joined the game
[16:39:47] [Server thread/INFO]: Tanlaith lost connection: Disconnected
[16:39:47] [Server thread/INFO]: Tanlaith left the game
[16:39:47] [Render thread/INFO]: [CHAT] Tanlaith left the game
[16:41:27] [User Authenticator #3/INFO]: UUID of player Tanlaith is 70d3df22-adbd-4b03-aa98-ed0ea619e869
[16:41:27] [Server thread/INFO]: Tanlaith[/192.168.178.28:56295] logged in with entity id 14273 at (-18.915658608343332, 3.0, 7.5680854267267925)
[16:41:27] [Server thread/INFO]: Tanlaith joined the game
[16:41:27] [Render thread/INFO]: [CHAT] Tanlaith joined the game
[16:42:26] [Server thread/INFO]: Tanlaith lost connection: Disconnected
[16:42:26] [Server thread/INFO]: Tanlaith left the game
[16:42:26] [Render thread/INFO]: [CHAT] Tanlaith left the game
[16:42:34] [User Authenticator #4/INFO]: UUID of player Tanlaith is 70d3df22-adbd-4b03-aa98-ed0ea619e869
[16:42:34] [Server thread/INFO]: Tanlaith[/192.168.178.28:57996] logged in with entity id 14275 at (-18.915658608343332, 3.0, 7.5680854267267925)
[16:42:34] [Server thread/INFO]: Tanlaith joined the game
[16:42:34] [Render thread/INFO]: [CHAT] Tanlaith joined the game
[16:42:41] [Server thread/INFO]: Tanlaith lost connection: Disconnected
[16:42:41] [Server thread/INFO]: Tanlaith left the game
[16:42:41] [Render thread/INFO]: [CHAT] Tanlaith left the game
[16:44:15] [User Authenticator #5/INFO]: UUID of player Tanlaith is 70d3df22-adbd-4b03-aa98-ed0ea619e869
[16:44:15] [Server thread/INFO]: Tanlaith[/192.168.178.28:56918] logged in with entity id 14277 at (-18.915658608343332, 3.0, 7.5680854267267925)
[16:44:15] [Server thread/INFO]: Tanlaith joined the game
[16:44:15] [Render thread/INFO]: [CHAT] Tanlaith joined the game
[16:44:46] [Render thread/INFO]: [CHAT] Tanlaith joined the lime green team
[16:44:58] [Render thread/INFO]: [CHAT] Preparing Spawn...
[16:45:01] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 2005ms or 40 ticks behind
[16:45:32] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 16193ms or 323 ticks behind
[16:45:43] [Render thread/INFO]: [CHAT] Loading terrain
[16:45:43] [Render thread/INFO]: [CHAT] Your game mode has been updated to Adventure Mode
[16:46:10] [Server thread/WARN]: Tanlaith moved too quickly! 0.0,-10.188594643186804,0.0
[16:46:10] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 2121ms or 42 ticks behind
[16:46:12] [Render thread/INFO]: [CHAT] 3
[16:46:13] [Render thread/INFO]: [CHAT] 2
[16:46:14] [Render thread/INFO]: [CHAT] 1
[16:46:15] [Render thread/INFO]: [CHAT] GO!
[16:46:15] [Render thread/INFO]: [CHAT] Click here to go back to the lobby.\nHint: You can use the command /trigger bingo.lobby at any time manually to return to the lobby as well.
[16:50:13] [Render thread/INFO]: [CHAT] [3:57.35 | #1] gbegerow got [Spruce Sapling]
[16:51:31] [Server thread/INFO]: Tanlaith lost connection: Timed out
[16:51:31] [Server thread/INFO]: Tanlaith left the game
[16:51:31] [Render thread/INFO]: [CHAT] Tanlaith left the game
[16:51:31] [Server thread/WARN]: handleDisconnection() called twice
[16:51:53] [User Authenticator #6/INFO]: UUID of player Tanlaith is 70d3df22-adbd-4b03-aa98-ed0ea619e869
[16:51:53] [Server thread/INFO]: Tanlaith[/192.168.178.28:55132] logged in with entity id 18238 at (-2.9555213281067543E7, 65.0, -5448644.349384)
[16:51:53] [Server thread/INFO]: Tanlaith joined the game
[16:51:53] [Render thread/INFO]: [CHAT] Tanlaith joined the game
[16:53:06] [Render thread/INFO]: [CHAT] [6:50.25 | #1] Tanlaith got [Spruce Sapling]
[17:01:02] [Render thread/INFO]: [CHAT] [14:46.50 | #2] gbegerow got [Blast Furnace]
[17:01:18] [Render thread/INFO]: [CHAT] [15:02.15 | #2] Tanlaith got [Green Dye]
[17:03:57] [Render thread/INFO]: [CHAT] [17:41.90 | #3] gbegerow got [Hopper]
[17:07:19] [Render thread/INFO]: [CHAT] [21:03.70 | #4] gbegerow got [Flower Pot]
[17:09:30] [Render thread/INFO]: [CHAT] [23:14.95 | #5] gbegerow got [Vines]
[17:09:52] [Render thread/INFO]: [CHAT] [23:37.05 | #6] gbegerow got [Bucket of Cod]
[17:09:52] [Render thread/INFO]: [CHAT] [23:37.05] gbegerow got a bingo in row 1!
[17:09:52] [Render thread/INFO]: [CHAT] Click here to go back to the lobby.\nHint: You can use the command /trigger bingo.lobby at any time manually to return to the lobby as well.
[17:10:17] [Render thread/INFO]: [CHAT] [24:01.25 | #3] Tanlaith got [Mushroom Stew]

Greetings and thanks for the Game,
Georg Begerow

@NeunEinser
Copy link
Owner

NeunEinser commented Jun 20, 2021

This really sounds a lot like #22 again.

Since this is the first time this got reported for beta1, it definitely is much rarer now then it used to be, which is also why #22 was declared fixed :D.

I never figured out what caused it in the first place. It seems to be that the game is somehow unable to award the item for the team, while it should have been successful.
I assume, in case you haven't generated a new card since then, she will have the tag bingo.has_slot2 (which you can check with tag Tanlaith list, though I don't think it's necessary). That tag is given to all players of the team, when someone of that team receives an item.

Additionally to that, there is a separate storage for the slots the team as a whole has gotten, which is used for card display, but also to check the team's state. I can't rely on player tags here, since someone could disconnect with an an unfortunate timing and thus de-syncing their tags with the actual team card.

The player tags are only there since checking the team state is quite expensive in terms of performance, and if someone carries an item the team has already completed, that check would be done every tick for that player. If the player has the tag, checking the team's state is skipped.

So the only explanation I have is that, for some reason, in this case when the game ran the function for her, the check went somehow wrong, but the player tag was still given.

If this is anything like it used to be back when it happened more frequently, it is random and can't be reproduced with the same Bingo seed and the same sequence of events. If it is true that it can only happen when another team already completed the item, this makes even less sense, since the check is essentially just looking if the team had completed status for the slot before and setting completed status in the same go. So if it was reading from the wrong team sometimes, you would expect it also sometimes writing to the wrong team and setting an item to completed for the wrong team. That does not seem to happen though and was never reported for any version.

In order to figure this one out, I'd essentially need some way of reproducing it. I could still take a look at the world file I suppose, but I doubt I will find anything unexpected given the observed result.

@NeunEinser NeunEinser added the bug Something isn't working label Jun 20, 2021
@gbegerow
Copy link
Contributor Author

Will keep an eye open if it repeats. Here is the tag list, bingo has_slot2 is :there
tag_list

She did had a network disconnect earlier in the game.

@gbegerow
Copy link
Contributor Author

She just tried some items in that savegame. Blastfurnace worked but powered rail and hopper not. If you want I can try to put the original savegame on our family server. Then you can join us and we try to reproduce it. Might take some days as I will have a very busy week ahead.

@NeunEinser
Copy link
Owner

She already has tags for slot19 (activator rail) and 3 (hopper) -- presumably without having had those in her inventory this round?

So here is something that could have potentially happened: Was she online the instant you clicked the sign to generate the card?
All the cleanup stuff happens then, so if she was not online then, and you already previously played a round on the server where she got items in these slots, that would mess things up.

@gbegerow
Copy link
Contributor Author

I think I generated before she joined. Maybe it would make sense to clear again when switching to adventure mode: At that point every player has to be online

@NeunEinser NeunEinser changed the title Item on card did not register Players cannot unlock items in slots they unlocked in a previous game when they are not logged in when generating a new card Jun 20, 2021
@NeunEinser
Copy link
Owner

NeunEinser commented Jun 20, 2021

Since that is at least a bug that can happen from the code, I am going to assume that's what happened for now.

In case you can reproduce this another way as well, please open a new ticket 🙂

And thanks for your help figuring this one out 👍

@gbegerow
Copy link
Contributor Author

Thanks for bringing Bingo to modern MC. A pleasure to help.

@NeunEinser
Copy link
Owner

Will be fixed in the next release 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants