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

bug: item swap #180

Open
Jafah opened this issue Oct 6, 2024 · 4 comments · May be fixed by #268
Open

bug: item swap #180

Jafah opened this issue Oct 6, 2024 · 4 comments · May be fixed by #268
Labels
area/game The game app is affected type/bug Something isn't working

Comments

@Jafah
Copy link
Collaborator

Jafah commented Oct 6, 2024

What happened?

Swapping an item with another one, by i.e. right clicking armor in your inventory, both items dissappear and the connection is non-responsive

How to reproduce?

right click an item i.e. a weapon when another weapon is equipped

Stacktrace

No response

OS Platform

Windows

Additional Information and Notes

No response

@Jafah Jafah added type/bug Something isn't working area/game The game app is affected labels Oct 6, 2024
@Jafah
Copy link
Collaborator Author

Jafah commented Oct 10, 2024

Game connection crashes at ItemRepository.cs at line 73 when the swap is called
await _cacheManager.Set(key, item);
The previous write to the database, line 70, goes through and it is persistent between restarting after a crash
So the problem is likely in / with Redis and or caching.

@uutkukorkmaz
Copy link
Collaborator

I'll take a look for the Redis part. But my strongest guess is server-client packet order for equip-unequip actions

@Jafah
Copy link
Collaborator Author

Jafah commented Oct 10, 2024

The packet handeling was my first guess, but it ended on line 73 and i have almost no experience with memory so i thought its probably wrong.
But it still needed a restart of the server to be able to rejoin the game since it stated that the user was already connected, so server-sided it may have stopped registering new packets because of a faulty predecessor.

@uutkukorkmaz
Copy link
Collaborator

You don't need to restart the server after getting the "you already logged in" message; just try logging in again, and it will succeed. That's another bug related to the unexpected drop of connection. I haven't had a chance to take a deep look yet, but packet order is still my strongest candidate for this issue's root cause.

I also discovered a significant number of bugs with item and inventory management. I’ll open respective issues for those as soon as possible.

@uutkukorkmaz uutkukorkmaz self-assigned this Oct 12, 2024
@uutkukorkmaz uutkukorkmaz removed their assignment Nov 7, 2024
@MeikelLP MeikelLP added this to the 0.1 The Baseline milestone Nov 24, 2024
@MeikelLP MeikelLP linked a pull request Dec 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/game The game app is affected type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants